Omniscia vfat Audit
VelodromeStakingRewardsRegistry Static Analysis Findings
VelodromeStakingRewardsRegistry Static Analysis Findings
VSR-01S: Inexistent Sanitization of Input Addresses
Type | Severity | Location |
---|---|---|
Input Sanitization | ![]() | VelodromeStakingRewardsRegistry.sol:L18-L24 |
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:
18constructor(19 IStakingRewardsFactory stakingRewardsFactory_,20 VelodromeGaugeConnector velodromeGaugeConnector_21) {22 stakingRewardsFactory = stakingRewardsFactory_;23 velodromeGaugeConnector = velodromeGaugeConnector_;24}
Recommendation:
We advise some basic sanitization to be put in place by ensuring that each address
specified is non-zero.
Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):
The vfat team evaluated this exhibit but opted to acknowledge it in the current iteration of the codebase.
VSR-02S: Multiple Top-Level Declarations
Type | Severity | Location |
---|---|---|
Code Style | ![]() | VelodromeStakingRewardsRegistry.sol:L8, L14 |
Description:
The referenced file contains multiple top-level declarations that decrease the legibility of the codebase.
Example:
8interface IStakingRewardsFactory {9 function poolForGauge(10 address gauge11 ) external view returns (address);12}13
14contract VelodromeStakingRewardsRegistry is ICustomConnectorRegistry {
Recommendation:
We advise all highlighted top-level declarations to be split into their respective code files, avoiding unnecessary imports as well as increasing the legibility of the codebase.
Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):
The vfat team evaluated this exhibit but opted to acknowledge it in the current iteration of the codebase.