Submitted by cmichel
The LPIssuer.deposit/withdraw function charges protocol&management&performance fees through inflating the LP supply in the _chargeFees function.
However, this LP fees minting is skipped if the elapsed time is less than the managementFeeChargeDelay:
This allows a user to avoid paying any fees if they deposit right after a charge fee interaction and withdraw within again managementFeeChargeDelay time period.
This can be abused heavily on networks where the gas fees are a lot cheaper than the three vault fees:
In the worst case, nobody pays fees by repeating the above actions.
Fees must always be charged on each deposit and withdrawal, even within the same block as it could be that a huge interest harvest comes in that an attacker sandwiches.
Remove the if (elapsed < vg.delayedProtocolParams().managementFeeChargeDelay) { return; } code.
MihanixA (Mellow Protocol) disputed:
0xleastwood (judge) commented:
MihanixA (Mellow Protocol) commented:
0xleastwood (judge) commented:
