Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

Wrong liquidation assumption in StabilityPool::liquidateBorrower will throw the protocol into bad debt easily

StabilityPool::liquidateBorrower has the following comment: @custom:throws InsufficientBalance If the Stability Pool doesn't have enough crvUSD to cover the debt. and the following line that reverts in the case that Stability Pool doesn't have enough crvUSD to cover the debt for real.

uint256 crvUSDBalance = crvUSDToken.balanceOf(address(this));
if (crvUSDBalance < scaledUserDebt) revert InsufficientBalance();

This just can’t be. Liquidation should always be possible. Liquidation of a user who’s in bad debt cannot be invalidated with constrains like this one.

What will happen if the pool does not have enough crvUSD to cover the debt, say that the debt is really large?

Liquidation should always be possible. Otherwise, the protocol will go into bad debt.

Impact

It is super easy for the protocol to go into bad debt, it is even facilitated by the protocol’s own logic.

Recommendation

Do not put a constraint on a user’s liquidation. Liquidate them if they’re in bad debt. Put the protocol’s solvency to a prior importance.

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Validated
Assigned finding tags:

StabilityPool has no ability to liquidate large positions due to all-or-nothing design - partial liquidation not supported, risking protocol insolvency

Support

FAQs

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