Omniscia Euler Finance Audit
SwapHandlerUniAutoRouter Static Analysis Findings
SwapHandlerUniAutoRouter Static Analysis Findings
SHA-01S: Inexistent Sanitization of Input Address
Type | Severity | Location |
---|---|---|
Input Sanitization | SwapHandlerUniAutoRouter.sol:L11-L13 |
Description:
The linked function accepts an address
argument yet does not properly sanitize it.
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:
contracts/swapHandlers/SwapHandlerUniAutoRouter.sol
11constructor(address uniSwapRouter02_, address uniSwapRouterV2, address uniSwapRouterV3) SwapHandlerCombinedBase(uniSwapRouterV2, uniSwapRouterV3) {12 uniSwapRouter02 = uniSwapRouter02_;13}
Recommendation:
We advise some basic sanitization to be put in place by ensuring that the address
specified is non-zero.
Alleviation:
The Euler Finance team evaluated this exhibit but opted to retain the current code in place as the contracts can be re-deployed in case a misconfiguration in the address
input variables was identified. As a result, we consider this exhibit acknowledged.