Open code423n4 opened 2 years ago
hrkrshnn
barFee
_barFeeTo
The public state variable https://github.com/sushiswap/trident/blob/9130b10efaf9c653d74dc7a65bde788ec4b354b5/contracts/pool/IndexPool.sol#L43 and https://github.com/sushiswap/trident/blob/9130b10efaf9c653d74dc7a65bde788ec4b354b5/contracts/pool/IndexPool.sol#L20 seems to be never used anywhere in the contract. Removing them will save gas for (almost) all external calls because of their presence in function dispatch.
Yes, however, this will be used in future for fee calculation for the bar.
Handle
hrkrshnn
Vulnerability details
Unused state variable
barFee
and_barFeeTo
in IndexPoolThe public state variable https://github.com/sushiswap/trident/blob/9130b10efaf9c653d74dc7a65bde788ec4b354b5/contracts/pool/IndexPool.sol#L43 and https://github.com/sushiswap/trident/blob/9130b10efaf9c653d74dc7a65bde788ec4b354b5/contracts/pool/IndexPool.sol#L20 seems to be never used anywhere in the contract. Removing them will save gas for (almost) all external calls because of their presence in function dispatch.