Omniscia vfat Audit
NuriV3Connector Code Style Findings
NuriV3Connector Code Style Findings
NVC-01C: Redundant Increment of Deadline
Type | Severity | Location |
---|---|---|
Gas Optimization | ![]() | NuriV3Connector.sol:L26 |
Description:
The deadline parameter of a Ramses NFT position manager interaction can be the block.timestamp
itself.
Example:
contracts/connectors/nuri/NuriV3Connector.sol
15INuriNonfungiblePositionManager.MintParams({16 token0: addLiquidityParams.pool.token0,17 token1: addLiquidityParams.pool.token1,18 fee: addLiquidityParams.pool.fee,19 tickLower: addLiquidityParams.tickLower,20 tickUpper: addLiquidityParams.tickUpper,21 amount0Desired: addLiquidityParams.amount0Desired,22 amount1Desired: addLiquidityParams.amount1Desired,23 amount0Min: addLiquidityParams.amount0Min,24 amount1Min: addLiquidityParams.amount1Min,25 recipient: address(this),26 deadline: block.timestamp + 127});
Recommendation:
We advise this to be set so, omitting the addition by one in the referenced instance and thus optimizing the code's gas cost.
Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):
The redundant increment of the operation deadline has been omitted as advised.