Omniscia Avocado Fund Audit
VaultRewards Static Analysis Findings
VaultRewards Static Analysis Findings
VRS-01S: Multiple Top-Level Declarations
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | VaultRewards.sol:L11, L27 |
Description:
The referenced file contains multiple top-level declarations that decrease the legibility of the codebase.
Example:
contracts/src/VaultRewards.sol
11interface IAVOToken {12 function mint(address to, uint256 amount) external;13}14
15/// @title VaultRewards16/// @author Avocado Labs17/// @notice Distributes AVO token emissions to users who stake avUSDC vault shares.18/// Emission rate is dynamic — it decreases as TVL grows, smoothing APY.19///20/// @dev Based on the Sushi MasterChef v2 reward accounting pattern.21/// Users deposit avUSDC shares → earn AVO proportional to their stake.22///23/// Dynamic emission formula:24/// effectiveRate = baseEmissionPerSecond × scaleFactor / (totalStaked + scaleFactor)25/// When staked is low, emission approaches baseEmission.26/// When staked is high, emission tapers down → stable APY regardless of TVL.27contract VaultRewards is Ownable2Step, Pausable, ReentrancyGuard {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 (a859cd2191d509cbc6d47508bdd44ec6d3cc9844):
The IAVOToken interface has been relocated to its dedicated file and is now imported properly, addressing this exhibit.
