A vulnerability exists in the way the system calculates and updates the RAAC token emission rate. By exploiting the calculation of the utilization rate, an attacker can manipulate the system into increasing the RAAC emission rate. This is achieved by withdrawing a large portion of rToken
deposits to artificially spike the utilization rate, and then redepositing to benefit from the increased emissions.
The RAACMinter contract determines the emission rate based on the utilization rate, which is calculated using:
Here, totalDeposits
represents the total rToken
deposits in the StabilityPool
. When a user withdraws a large amount via the withdraw()
function, totalDeposits
drops significantly, causing the calculated utilization rate to spike. During the next call to the tick()
function—which anyone can invoke—the system updates the emission rate based on this inflated utilization rate, thereby increasing the number of RAAC tokens minted per block.
In updateEmissionRate()
, the system calls calculateNewEmissionRate()
, which increases the rate if the utilization rate is above the target. Even though each update is capped at a 5% increase and the overall emission rate is limited to 2000 RAAC per day, an attacker can repeatedly:
Withdraw a large deposit to spike the utilization rate.
Trigger tick()
to update the emission rate upward.
Redeem and redeposit their funds so that the pool’s deposits return to normal while retaining the higher emission rate.
This cycle can be repeated over time, gradually pushing the emission rate to its cap and allowing the attacker to benefit from the extra minted RAAC tokens.
The attacker earns extra RAAC tokens by repeatedly forcing the system to increase its emission rate. Even with a 5% cap per update, cumulative manipulation over multiple cycles results in significant over-minting. Furthermore, this leads to an unfair reward distribution, undermines trust, and can destabilize the protocol’s incentive structure
Manual code review
To mitigate this, you should enforce a cooldown period or deposit locking mechanism to prevent rapid withdrawal and redeposit cycles.
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.