The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Incorrect use of `SmartVaultV3::maxMintable` as the liquidation point

Description

SmartVaultV3::undercollateralised is used to determine the collateralization status of a vault when attempting to liquidate its collateral.

function undercollateralised() public view returns (bool) {
return minted > maxMintable();
}

This function checks whether the number of EURO tokens minted is greater than the maxMintble value and returns a boolean indicating whether or not the vault is undercollateralized. SmartVaultV3::maxMintable is defined by the following:

function maxMintable() private view returns (uint256) {
return euroCollateral() * ISmartVaultManagerV3(manager).HUNDRED_PC() / ISmartVaultManagerV3(manager).collateralRate();
}

This takes the vault's entire collateral value in Euros and scales it by the collateral rate, meaning that if the owner were to take the maximum loan, then it is highly likely that their vault would become immediately liquidatable as any small fluctuation in the collateral value could result in the minted amount exceeding the maxMintable value.

Therefore, while maxMintable defines some restriction on the Loan to Value (LTV) it should not also be used as the point at which vaults are to be liquidated; otherwise, it is possible to borrow the maximum allowed loan and be immediately liquidated even though the Euro value of the collateral still significantly exceeds the value of the debt.

Impact

The incorrect validation of vault collateralization status by conflating LTV and liquidation parameters means that a fully collateralized vault could be immediately liquidated when borrowing the maximum loan. This is a high-severity issue and has downstream effects in other areas of the protocol, which should be fixed accordingly.

Proof of Concept

Considering a collateral rate of :

  1. Alice deposits 1000 EUR in LINK into her vault.

  2. maxMintable is 833 EURO.

  3. Alice mints 833 EUR.

  4. The price of LINK decreases such that her collateral is now worth 950 EUR.

  5. maxMintable is now 791 EURO.

  6. minted exceeds maxMintable, so Alice's vault is considered undercollateralized and susceptible to liquidation despite the value of her collateral exceeding her outstanding debt.

Recommended Mitigation

SmartVaultV3::undercollateralised should not validate the liquidation status of a vault against the maxMintable value since it is not guaranteed that the vault is actually undercollateralized at this point. The condition for liquidation should instead lie somewhere between maxMintable and the Euro collateral value at which the vault would become truly undercollateralized.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

Support

FAQs

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