When users deposit collateral, the protocol should first securely receive the collateral tokens and only then update internal accounting.
This ensures DSC can only be minted against collateral that has actually been transferred into the protocol.
The contract updates user collateral balances before performing the external ERC20 transfer.
Because ERC20 transfers are external calls, a malicious token can reenter the protocol during execution and mint DSC while the system already believes collateral has been deposited, even though the transfer has not completed.
This breaks the Checks-Effects-Interactions pattern and allows collateral accounting to be manipulated during reentrancy.
Likelihood:
Occurs when a collateral token performs callbacks during transferFrom execution.
Occurs when a non-standard or upgradeable ERC20 token is included in the collateral basket.
Impact:
Attacker can mint DSC backed by collateral that was never transferred.
Protocol collateralization invariant is broken, potentially causing insolvency and stablecoin depeg.
The protocol trusts internal accounting instead of verifying that tokens were successfully received before allowing minting. Reentrancy allows the attacker to exploit this temporary inconsistent state.
Follow Checks-Effects-Interactions ordering.
Additional hardening:
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.