SmartVaultV3::undercollateralised
is used to determine the collateralization status of a vault when attempting to liquidate its collateral.
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:
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.
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.
Considering a collateral rate of :
Alice deposits 1000 EUR in LINK into her vault.
maxMintable
is 833 EURO.
Alice mints 833 EUR.
The price of LINK decreases such that her collateral is now worth 950 EUR.
maxMintable
is now 791 EURO.
minted
exceeds maxMintable
, so Alice's vault is considered undercollateralized and susceptible to liquidation despite the value of her collateral exceeding her outstanding debt.
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.