The pool reward users with 1**18 of one of the tokens every 10 swaps, without taking care of how much was swapped. This can drain the pool if the attacker is just doing small swaps.
The attacker keeps calling the swap function with very low input, every 10 swaps he is rewarded with 1**18 of the output token.
Pool can be drained of tokens.
Unit test
Instead of rewarding users every 10 swaps, the protocol can reward the users after x amount of poolToken swapped and y amount of weth swapped.
When the x and y reaches predefined value then reward the user.
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.