The RAACMinter's mintRewards()
function has a critical arithmetic flaw where it mints (amount - excessTokens
) but transfers the full amount, leading to insufficient funds when excessTokens
is less than amount.
mintRewards
mints toMint = amount - excessTokens
but transfers amount
, risking underflow if excessTokens < amount
.
Looking at this attack Path:
StabilityPool requests reward mint of 1000 tokens
excessTokens = 400
Contract mints only 600 (1000 - 400)
Attempts to transfer 1000
Transfer fails due to insufficient balance
Transfers may fail, locking rewards.
manual
Adjust logic to mint amount
directly or ensure sufficient excessTokens
.
We can implement either of these solutions to fix the RAACMinter's reward distribution logic
Direct Minting Approach
ExcessTokens Balance Check
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.