FloorDAO / floor-v2

Floor aims to create a fully onchain governance mechanism for sweeping and deploying NFTs to profitable NFT-Fi strategies as well as seeding liquidity for its own NFT-Fi products.
https://floor.xyz
2 stars 0 forks source link

[UVS-01C] Redundant External Self-Calls #73

Closed tomwade closed 1 year ago

tomwade commented 1 year ago

UVS-01C: Redundant External Self-Calls

Type Severity Location
Gas Optimization UniswapV3Strategy.sol:L205, L216

Description:

The referenced statements make use of the this specifier to invoke the UniswapV3Strategy::validTokens function improperly.

Example:

tokens_ = this.validTokens();

Recommendation:

We advise the code to directly invoke the UniswapV3Strategy::validTokens (by specifying it as public instead of external) function, significantly optimizing the gas cost of UniswapV3Strategy::_withdraw and UniswapV3Strategy::available invocations.