Burning DSC is a escape valve for users to prevent liquidation and also helps the protocol to maintain its solvency. After a user burns DSC tokens their health factor checked but in normal circumstances after burning DSC the health factor never decreases, the health factor should always remains the same or increase.
Assume a user deposits 10 WETH tokens and each token has a value of 2,000 dollars and mints 5000 DSC tokens. The value of the collateral in USD is 20,000. The user decides to burn DSC, even though prices are changing constantly due to multiple reasons, during the execution of DSCEngine::burnDsc
the value of the collateral of the user should remain close to 20,000 dollars. This means the amount of collateral will be divided by a smaller number resulting the same or greater health factor depending on the amount tokens that were burnt.
The result is shown below.
During the execution of DSCEngine::burnDsc
a transaction could take longer than expected to be included in a block and a drastic swing in price may occur, the health factor go below MIN_HEALTH_FACTOR
and users will not be able to burn their tokens; I consider this bad user experience and also detrimental to the protocol because could potentially make it prone to insolvency. For these reasons I evaluate the severity to MEDIUM.
Visual Studio Code and Foundry
Remove check for the user health factor in DSCEngine::burnDSC
.
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.