RToken.sol
currently implements the _update()
function as:
While this implementation works for correct minting and burning RTokens
it can lead to unexpected behaviour and wrong internal accounting in the RAAC protocol and any other protocol that interacts with and transfers RTokens
.
The issue arises from the fact that _update()
is called not only when minting and burning tokens, but when a transfer happens. Because RToken.sol
is an ERC20 contract there is a high chance that protocols assume transferring of RTokens
works normal with no scaling of parameters taking place.
Unexpected behaviour and wrong account in protocols that transfer and interact with RTokens
.
manual review
Handle the logic for scaling in the public mint and burn function in RToken.sol
and remove the overridden _update()
function.
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.