15,000 USDC
View results
Submission Details
Severity: high
Valid

The protocol may have a lot of dust bad debts

Summary

Compared with deposit and mintDsc function, liquidate needs to cycle statistics of all collateral prices of an account and calculate the liquidation threshold, which requires more gas consumption.
The 10% dust incentive is not enough to incentivize the liquidator to liquidate, so a further drop in the price of dust collateral below 100% would damage the protocol.

Vulnerability Details

function mintDsc(uint256 amountDscToMint) public moreThanZero(amountDscToMint) nonReentrant {
s_DSCMinted[msg.sender] += amountDscToMint;
// if they minted too much ($150 DSC, $100 ETH)
_revertIfHealthFactorIsBroken(msg.sender);
bool minted = i_dsc.mint(msg.sender, amountDscToMint);
if (!minted) {
revert DSCEngine__MintFailed();
}
}

The code does not put a mint limit on the dust amount, the user may mint a small amount of DSC, the collateral price drops, no keeper is willing to liquidate, and the protocol may take a loss.

Impact

A large dust account could bring bad debts to the protocol

Tools Used

Manual review

Recommendations

Add a minimum mint limit

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.