LiquidationPool fees distribution is vulnerable to frontrunning attacks
An attacker can stake in the last minute and rip all the rewards.
Attack steps:
Attacker will monitor the mempool and wait for LiquidationPoolManager receives funds
Frontrun with increasePosition() with a high stake to rip most of the rewards.
Incorporate this gist in the tests folder.
Execute: forge test --mt testSandwichFees -vvv
Manual review
Implement a mechanism to distribute rewards linearly to prevent such attacks.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.