In the _swap
function, for each 10 swaps executed, the user is rewarded with 1_000_000_000_000_000_000
extra tokens. This extra incentive breaks the protocol invariant of x * y = k
meaning that over time the protocol funds will be drained.
Block where for each 10 swaps executed, user is rewarded with extra tokens.
PoC - Copy this test into TSwapPool.t.sol
A user could maliciously drain the protocol's funds by repeatedly executing swaps and collecting the extra incentives provided by the protocol.
Manual review
Remove the extra rewards implementation (as this mechanism is not described in the documentation)
Implement a system similar to fee collection.
Change the protocol invariant to incorporate this extra reward.
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.