Omniscia Xcaliswap Audit
Gauge Static Analysis Findings
Gauge Static Analysis Findings
GEG-01S: Inexistent Sanitization of Input Addresses
Type | Severity | Location |
---|---|---|
Input Sanitization | ![]() | Gauge.sol:L83-L88 |
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:
contracts/periphery/Gauge.sol
83constructor(address _stake, address _bribe, address __ve, address _voter) {84 stake = _stake;85 bribe = _bribe;86 _ve = __ve;87 voter = _voter;88}
Recommendation:
We advise some basic sanitization to be put in place by ensuring that each address
specified is non-zero.
Alleviation:
The Xcaliswap team has introduced a require
check ensuring that each address specified is non-zero.