The RToken contract's mint function contains a critical vulnerability where it uses the unscaled amount (amountToMint
) instead of the scaled amount (amountScaled
) when minting tokens. This results in users receiving more RTokens than they should, leading to protocol fund loss.
In RToken contract, mint function:
The function correctly calculates the scaled amount by dividing amountToMint
by the liquidity index using ray math (27 decimal precision). However, it then incorrectly uses the original amountToMint
value in the _mint
function instead of the calculated amountScaled
value.
HIGH - The vulnerability leads to direct fund loss for the protocol
Users receive more RTokens than they should based on their deposited collateral
These excess RTokens represent claims on the underlying assets that exceed the actual deposited amount
When users redeem their RTokens, they can withdraw more funds than they should be entitled to
This creates a deficit in the protocol's reserves, potentially leading to insolvency
Manual review
Modify the mint function to use the scaled amount:
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.