If you mint
0 amount in the Rtoken Contract, an invalid value will be returned.
This is a Rtoken::burn
function.
Since the second return value is total supply, the totalSupply() function is doing a good job of returning it.
However, where the total supply of the Rtoken::mint
function should be returned, it returns 0
instead of totalSupply()
.
Annotation for the return value of the Rtoken::mint
function.
Also, the mint function unconditionally returns false for the bool: True if this is the first mint for the recipient, false otherwise
when amountToMint is 0. And this problem also exists in the DebtToken::mint
function.
LendingPool using rTokens prevents minting amounts less than or equal to 1, but this is an obvious misimplementation and a low vulnerability.
Manual Code Review and Foundry
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.