Root Cause: The _mint_dsc() and _burn_dsc() functions call external DSC token functions without checking the return values. The code explicitly comments that success is not being checked.
Impact: If mint fails, users have debt recorded but receive no tokens, effectively stealing their collateral value. If burn fails, users get debt reduction without tokens being destroyed, allowing them to extract unbacked value from the protocol and causing undercollateralization.
Normal Behavior: When a user mints DSC, the engine should record their debt and transfer newly minted tokens to them. When burning, tokens should be destroyed and debt reduced. Both operations should succeed atomically.
Issue: The _mint_dsc() and _burn_dsc() functions call external DSC token functions but explicitly do not check return values. If the external call fails silently, the internal accounting becomes desynced from actual token balances.
Likelihood:HIGH
Reason 1 : DSC token's mint function could fail if minter is not properly set
Reason 2 : DSC token's burn_from could fail if insufficient allowance is set
Impact:
Impact 1 : Burn failure: User's debt is reduced but tokens are not burned - user gets free debt reduction, protocol becomes undercollateralized
Impact 2 : Mint failure: User's debt is recorded but they receive no tokens - funds are effectively stolen from user
When a user calls burn_dsc(500e18) without first approving the DSCEngine to spend their DSC tokens, the internal accounting reduces their debt by 500 DSC, but the burn_from call fails due to insufficient allowance. The user now has 500 DSC less debt but still holds all their tokens, effectively creating 500 unbacked DSC in circulation.
Capture the return value from external calls and assert that the operation succeeded. This ensures internal accounting only persists when the actual token operations complete successfully.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.