MarketCreator
allows users to deposit quote assets and redeem them for RAAC rewards. However, the code never decrements market.reward
after redemption, letting multiple participants claim more rewards than intended.
In MarketCreator.sol
, the calculateReward
function uses:
But market.reward
never changes after user redemption. Multiple participants can repeatedly deposit and redeem, each effectively receiving a fraction of the full market.reward
, which can exceed the intended total.
An attacker or normal user can infinitely claim RAAC tokens, draining the contract.
Manual code inspection
Logical modeling of deposit/redeem flows
Deduct the claimed portion from market.reward
to ensure the total distributed reward cannot exceed the initial allocation.
Alternatively, track user shares at deposit time and reduce market.reward
accordingly.
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.