Omniscia vfat Audit
NuriGaugeConnector Code Style Findings
NuriGaugeConnector Code Style Findings
NGC-01C: Redundant Code Duplication
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | ![]() | NuriGaugeConnector.sol:L32-L42 |
Description:
The NuriGaugeConnector implementation is identical to the RamsesGaugeConnector with the main difference being the NuriGaugeConnector::deposit function and specifically the reversion of the function to the original VelodromeGaugeConnector::deposit implementation.
Example:
14function deposit(15 Farm calldata farm,16 address token,17 bytes memory // _extraData18) external payable override {19 uint256 amount = IERC20(token).balanceOf(address(this));20 SafeTransferLib.safeApprove(token, farm.stakingContract, amount);21 INuriGauge(farm.stakingContract).deposit(amount);22}Recommendation:
We advise the contract to inherit from the RamsesGaugeConnector and to override the RamsesGaugeConnector::deposit function by invoking the superlative VelodromeGaugeConnector function (i.e. VelodromeGaugeConnector.claim(farm, _extraData)).
Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):
The vfat team evaluated the potential restructure of the project as described in the exhibit and opted to retain a clear distinction between the Nuri contract stack and the Ramses contract stack so as to ensure a certain level of consistency and coherency between vastly different implementations even though they might resemble each other.
