The mint
function's return values are out of order, making them incompatible with expected outputs and can potentially lead to broken integrations.
In the NatSpec, the documentation clearly states the expected return order as:
isFirstMint
amountScaled
totalSupply()
amountToMint
However, the actual return statement swaps amountScaled
and amountToMint
:
In the ReserveLibrary
contract, the deposit function relies on the return values of this mint function and expects the correct values but will end up using the wrong ones because of this incorrect order.
External systems or contracts like the ReserveLibrary
relying on the expected return order will misinterpret values and use them for the wrong calculations, leading to inconsistencies in the system.
Manual code review
Fix the return statement to match the documented order.
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.