Omniscia Morpho Labs Audit
UniswapV3Swapper Static Analysis Findings
UniswapV3Swapper Static Analysis Findings
SRU-01S: Illegible Numeric Value Representation
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | UniswapV3Swapper.sol:L34 |
Description:
The linked representation of a numeric literal is sub-optimally represented decreasing the legibility of the codebase.
Example:
34uint24 public constant MAX_UNISWAP_FEE = 1_000_000; // 100% in UniswapV3 fee units.Recommendation:
To properly illustrate the value's purpose, we advise the following guidelines to be followed.
For values meant to depict fractions with a base of 1e18, we advise fractions to be utilized directly (i.e. 1e17 becomes 0.1e18) as they are supported.
For values meant to represent a percentage base, we advise each value to utilize the underscore (_) separator to discern the percentage decimal (i.e. 10000 becomes 100_00, 300 becomes 3_00 and so on).
Finally, for large numeric values we simply advise the underscore character to be utilized again to represent them (i.e. 1000000 becomes 1_000_000).
Alleviation:
The underscore character has been relocated according to the specification we shared with the Morpho Labs team thus alleviating this exhibit.
SRU-02S: Inexistent Sanitization of Input Address
| Type | Severity | Location |
|---|---|---|
| Input Sanitization | ![]() | UniswapV3Swapper.sol:L44-L46 |
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:
44constructor(address _wrappedNativeToken) {45 wrappedNativeToken = _wrappedNativeToken;46}Recommendation:
We advise some basic sanitization to be put in place by ensuring that the address specified is non-zero.
Alleviation:
A zero-address check has been properly introduced for the relevant input argument as advised.

