Set initial value for lastFee #91
Labels
bug
Warden finding
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
pauliax
Vulnerability details
Impact
function handleFees can become cheaper by eliminating this surrounding if/else statement if you initially assign the value to the lastFee upon creation or initialization.
Recommended Mitigation Steps
uint256 public override lastFee = block.timestamp;
or in function initialize as it will get this value anyway when doing the initial mintTo. But then you would probably need to skip handleFees if the timeDiff is 0.
The text was updated successfully, but these errors were encountered: