The amount redeemed is only checked if equal to infinity (max uint). This check is insufficient since any amount greater than the sender balance would revert the transaction.
The ThunderLoan:redeem()
function contains the following check:
If the amount redeemed (e.g. amountOfAssetToken
) is greater than the sender balance (e.g. assetToken.balanceOf(msg.sender)
) the transaction reverts on asset tokens burn.
Transaction reverts
foundry
If the amount to be redeemed is greater than the sender balance, cap it to the sender balance. Suggested change:
From:
To:
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.