The mint function returns amountToMint as the second value in the tuple, but it should return amountScaled instead and it returns amountScaled as the fourth value when it should return amountToMint. (Essentially amountToMint and amountScaled need to be swapped around in the return tuple.) This discrepancy can lead to incorrect off-chain calculations or integrations.
Impact:
Off-chain systems relying on the return value of mint may misinterpret the scaled amount.
This could lead to incorrect accounting, reporting, or integration with external systems.
Code Reference:
Steps to Reproduce:
Deploy the RToken contract.
Call mint with a non-zero amountToMint.
Observe that amountToMint and amountScaledneed to be swapped around.
Update the mint function to return amountScaled as the second value in the tuple and amountToMint as the fourth value :
This ensures that the scaled amount is accurately reported, preventing off-chain calculation errors.
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.