In the mint function, when amountToMint == 0, the function returns (false, 0, 0, 0). However, the third value in the tuple (total supply) should return totalSupply() instead of 0.
Impact:
Off-chain systems or integrations relying on the return value of mint may misinterpret the total supply.
This could lead to incorrect accounting or reporting of the protocol's state.
Code Reference:
Steps to Reproduce:
Deploy the RToken contract.
Call mint with amountToMint == 0.
Observe that the third return value is 0 instead of totalSupply().
Update the mint function to return totalSupply() as the third value in the tuple when amountToMint == 0:
This ensures that the total supply is accurately reported, even for zero-amount mints.
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.