RTokenis an interest bearing token, as such, it should appreciate in value vs the reserve asset crvUSD. When a user deposits crvUSDthey are minted rTokenand that token should be interest bearing and the interest accumulated, able to be redeemed by the user. The interest is calculated using the liquidityIndex.
But the user never receives this interest, whenever they withdraw their crvUSD back and burn rTokens, they get exactly the amount of rTokens that they burn, meaning they never receive any interest.
The user withdraws crvUSD by burning rTokens through this process:
call LendingPool::withdraw- specifying the amount of reserveTokento withdraw
ReservePool::withdraw-> RToken::burn
The issue is in RToken::burn
side note : in ReservePool::withdrawthere is documentation that shows that the amount of rTokens burned should be the scaled amount needed to burn. Also, the return value from calling mintin the RTokencontract is expecting the scaled amount of rTokens burned.
In RToken::burn
amountis the user requested amount of reserveAssetto receive
amountis used (the same value) for the amount to burn of rTokensand the amount of reserveAssettransferred to the user.
Because of this, the user receives 0 interest that they have earned from holding rToken.
The amount of rTokento be burned should be scaled by the index.
This scaled amount will represent the appreciation in value of rTokenand the interest the user has earned.
Less rTokenshoud be burned for the amount of reserveAssetthat the user receives because the rTokenshould have appreciated in value and that would represent the interest the user earned.
There is clear documentation that the protocol is expecting to burn the scaled amount of rTokensbut that is never done.
The user receives no interest that has been generated from depositing the reserveAsset and receiving the minted rTokens.
This removes any incentive for anyone to deposit into the protocol to receive rToken as they will get no reward for it, leaving the protocol unnattractive and having no reason for a user to deposit and provide liquidity to the protocol.
manual review
Scale the amount of rTokensto burn for the amountof reserveAsset being withdrawn. Ensuring the user receives the interest that they have accumulated.
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.