medium

No incentive to liquidate small positions could result in protocol going unde...

Contest
Reward

Total

869.87 USDC

161.09 USDC
161.09 USDC
Selected
225.52 USDC
161.09 USDC
161.09 USDC
Selected Submission

No incentive to liquidate small positions could result in protocol going underwater

Severity

High Risk

Relevant GitHub Links

https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/SmartVaultV3.sol#L114

Summary

The protocol allows to create vaults and provide collateral for minting EUROs with no lower limit. As such, multiple low value vaults can exist. However, there is no incentive to liquidate low value vaults because of gas cost.

Vulnerability Details

Liquidators liquidate users for the profit they can make. If there is no profit to be made than there will be no one to call the liquidate function. For example a vault could exist with a very low collateral value. This user is undercollateralized and must be liquidated in order to ensure that the protocol remains overcollateralized. If a liquidator wishes to liquidate this user, they will first need to stake some TST/EUROs which involves gas cost. Because the value of the collateral is so low, after gas costs, liquidators will not make a profit liquidating this user. In the end these low value vaults will never get liquidated, leaving the protocol with bad debt and can even cause the protocol to be undercollateralized with enough small value accounts being underwater.

Attack Vector & Similar Issues

  • See a similar issue raised in the past rated as high impact & high likelihood. It additionally highlights how this can become an attack vector (even by non-whales) on chains which aren't costly. The attack can be done by a malicious actor/group of actors who short the protocol and then open multiple such positions to attack the protocol.

  • Another description of the same issue.

Impact

  • The protocol can go underwater, complete loss of funds.

Tools Used

Manual review

Recommendations

  • A potential fix would be to set a minimum threshold for collateral value which has to be exceeded in order for a user to mint EUROs