Omniscia Mean Finance Audit
BasePermit2Adapter Static Analysis Findings
BasePermit2Adapter Static Analysis Findings
BPA-01S: Inexistent Sanitization of Input Address
Type | Severity | Location |
---|---|---|
Input Sanitization | BasePermit2Adapter.sol:L19-L21 |
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:
src/base/BasePermit2Adapter.sol
19constructor(IPermit2 _permit2) {20 PERMIT2 = _permit2;21}
Recommendation:
We advise some basic sanitization to be put in place by ensuring that the address
specified is non-zero.
Alleviation:
The Mean Finance team evaluated this exhibit and opted not to apply a change for it in the current iteration of the codebase as the contract can always be re-deployed if misconfigured.