Omniscia Euler Finance Audit
Dispatch Static Analysis Findings
Dispatch Static Analysis Findings
DHC-01S: Inexistent Sanitization of Input Addresses
Type | Severity | Location |
---|---|---|
Input Sanitization | Dispatch.sol:L52-L61 |
Description:
The linked function(s) accept address
arguments yet do not properly sanitize them.
Impact:
The presence of zero-value addresses, especially in constructor
implementations, can cause the contract to be permanently inoperable. These checks are advised as zero-value inputs are a common side-effect of off-chain software related bugs.
Example:
src/EVault/Dispatch.sol
52constructor(Integrations memory integrations, DeployedModules memory modules) Base(integrations) {53 MODULE_INITIALIZE = modules.initialize;54 MODULE_TOKEN = modules.token;55 MODULE_VAULT = modules.vault;56 MODULE_BORROWING = modules.borrowing;57 MODULE_LIQUIDATION = modules.liquidation;58 MODULE_RISKMANAGER = modules.riskManager;59 MODULE_BALANCE_FORWARDER = modules.balanceForwarder;60 MODULE_GOVERNANCE = modules.governance;61}
Recommendation:
We advise some basic sanitization to be put in place by ensuring that each address
specified is non-zero.
Alleviation (fb2dd77a6ff9b7f710edb48e7eb5437e0db4fc1a):
The code was updated to utilize a newly introduced AddressUtils
contract that will verify the address contains code instead, acting as a superset of the non-zero check and providing better sanitization of the referenced arguments.