DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: high
Invalid

Shorters can lose collateral after sudden asset price changes

Summary

The protocol has not implemented any feature to protect shorters from sudden asset prices falls that can expose their positions/collateral. Sudden price falls are usually a reflection of market crushes caused by Oracles hacks, massive token minting and dumping etc

Vulnerability Details

When the price of assets used in the protocol collapses, shorters have no protection against liquidation except by further collaterization. Even the 10h allowance given to shorter before liquidation to reinstate equilibrium might not be sufficient.

Impact

Shorters risk losing collateral to liquidators, further jeopardizing the protocol

Tools Used

Manual review

Recommendations

We recommend adding a pause functionality that can be activated during emergency times that will halt all liquidations until a situation of normalcy in the markets is regained. This can be implemented as follows:

  1. Add a state variable in AppStorage.sol

`
bool liquidationPaused;

`

  1. Add an access controlled function that enables admin to pause/unpause liquidations

`
function pauseUnpauseLiquidations() external onlyDAO {
if(liquidationPaused)
liquidationPaused = false;
else
liquidationPaused = true;
}

  1. Inside the liquidate function, check that liquidations are allowed

`
require(!liquidationPaused, "Liquidations are not allowed at this time");

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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