Omniscia vfat Audit
SlipstreamNftConnector Code Style Findings
SlipstreamNftConnector Code Style Findings
SNC-01C: Redundant Increment of Deadline
Type | Severity | Location |
---|---|---|
Gas Optimization | ![]() | SlipstreamNftConnector.sol:L46 |
Description:
The deadline parameter of a Slipstream NFT mint operation can be the block.timestamp
itself.
Example:
contracts/connectors/velodrome/SlipstreamNftConnector.sol
35ISlipstreamNonfungiblePositionManager.MintParams({36 token0: addLiquidityParams.pool.token0,37 token1: addLiquidityParams.pool.token1,38 tickSpacing: extra.tickSpacing,39 tickLower: addLiquidityParams.tickLower,40 tickUpper: addLiquidityParams.tickUpper,41 amount0Desired: addLiquidityParams.amount0Desired,42 amount1Desired: addLiquidityParams.amount1Desired,43 amount0Min: addLiquidityParams.amount0Min,44 amount1Min: addLiquidityParams.amount1Min,45 recipient: address(this),46 deadline: block.timestamp + 1,47 sqrtPriceX96: 048});
Recommendation:
We advise this to be set so, omitting the addition by one and thus optimizing the code's gas cost.
Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):
The redundant increment of the operation deadline has been omitted as advised.