This comment on the redeemCollateral function is misleading
* @notice If you have DSC minted, you will not be able to redeem until you burn your DSC
The redeemCollateral
function does not directly require the user to burn DSC to redeem their collateral. Instead, it checks whether the operation would break the health factor. In cases where a user has a high collateralization ratio, they may redeem some of their collateral without burning DSC while keeping their health factor above the threshold. Therefore, the NatSpec comment may inaccurately represent the redeemCollateral
functionality under certain conditions.
PoC: Add this test to DSCEngineTest.t.sol
and it passes
This comment can lead users and auditors to misunderstand how the function works.
Manual Review
Remove the NatSpec line or further clarify that the redeemCollateral
function may revert if the user has too much DSC minted and will need to burn DSC before calling the function again.
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.