The user deposits rToken to stability pool and receive RAAC token as reward. However, there is not a time tracking mechanism for RAAC distribution in stability pool. Therefore, malicious user can drain RAAC reward of the pool by flash loan attack.
In the both StabilityPool.deposit()
and StabilityPool.withdraw()
function, there is no a time tracking mechanism for user deposit and withdraw. This makes attacker possible to do flash loan attack.
Attack path:
Attacker buy rToken in LendingPool
with flash loan.
Attacker deposit rToken to StabilityPool
.
Attacker invokes StabilityPool.withdraw()
. There is no time track for deposit and withdraw time, attacker can withdraw full deposited amount and receive reward for full deposited amount. Also it drains the RAAC reward of the pool.
Attacker withdraw rToken from LendingPool
and receive flash loan.
Attacker repays the flash loan, all within a single transaction.
This scenario is possible since there is no time delay between deposit and withdraw and also could drain the RAAC rewards.
The RAAC reward of the stability pool can be drained by flash loan attack.
Manual Review
Implement time tracking for deposit and withdraw in stability pool and calculates the RAAC reward based on depositing time.
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.