In the RToken.sol
contract the mint
and burn
functions return incorrect values, which can lead to problems during computing values in the ReserveLibrary
.
The vulnerabilities arise from the mint
and burn
functions in the RToken.sol
contract. These functions return incorrect values, which can lead to issues when computing values in the ReserveLibrary
.
mint
FunctionThe mint
function returns amountToMint
instead of amountScaled
. This leads to incorrect calculations in the ReserveLibrary
, as the scaled amount is necessary for accurate computations.
burn
FunctionThe burn
function returns amount
instead of amountScaled
. Similar to the mint
function, this leads to incorrect calculations in the ReserveLibrary
, as the scaled amount is necessary for accurate computations.
By returning incorrect values, the protocol performs inaccurate calculations in the ReserveLibrary
, leading to financial discrepancies. Users may receive incorrect amounts of RTokens or underlying assets, undermining the integrity and reliability of the protocol. This can result in financial losses for users and the protocol, as well as a loss of trust in the system.
Manual Review
To mitigate these vulnerabilities, update the mint
and burn
functions to return the correct values. Here is an example of how to implement this:
mint
Functionburn
FunctionThe 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.