Omniscia vfat Audit

VelocoreConnector Code Style Findings

VelocoreConnector Code Style Findings

VCR-01C: Redundant Increment of Deadlines

TypeSeverityLocation
Gas OptimizationVelocoreConnector.sol:
I-1: L56
I-2: L65

Description:

The deadline parameter of a Velocore swap via its Uniswap-like interface can be the block.timestamp itself.

Example:

contracts/connectors/VelocoreConnector.sol
50amountsOut = IUniswapV2Router02(swap.router).swapExactETHForTokens{
51 value: swap.amountIn
52}(
53 swap.minAmountOut,
54 extraData.path,
55 address(this),
56 block.timestamp + 1
57);

Recommendation:

We advise this to be set so, omitting the addition by one in each instance and thus optimizing the code's gas cost.

Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):

The vfat team evaluated this exhibit and clarified that Velocore expects the deadline to have been configured in the future.

We were able to confirm this statement and thus consider the optimization to be invalid.