Omniscia Xcaliswap Audit

SwapFees Static Analysis Findings

SwapFees Static Analysis Findings

SFS-01S: Inexistent Sanitization of Input Addresses

TypeSeverityLocation
Input SanitizationSwapFees.sol:L13-L17

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/Core/SwapFees.sol
13constructor(address _token0, address _token1) {
14 pair = msg.sender;
15 token0 = _token0;
16 token1 = _token1;
17}

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.