Deri Protocol Hack

Liquidity-pool loss $144K
Maintenance-margin design flaw

What happened

On 28 October 2022, Deri Protocol’s everlasting-options market on Arbitrum lost 143,622 USDC. Deri’s own postmortem says its maintenance-margin model covered changes in the underlying asset price but did not fully cover changes in the trading mark price caused by the protocol’s DPMM mechanism. The attacker used opposing positions to move the mark price, trigger liquidation and pass losses to the liquidity pool.

Deri says it compensated affected liquidity providers.

Technical root cause

Maintenance margin did not bound trade-driven mark-price changes

How it happened

  1. The attacker deposited 750 USDC and 16 USDC of margin into two accounts, A and B.
  2. Over hundreds of rounds, A bought a small amount of BTCUSD-40000-C and B immediately sold the same amount, returning the mark price to where it was. Deri's very low margin requirement for far out-of-the-money options let this build to about 100,192 BTC notional long in A and about 96,940 BTC short in B, leaving A at maximum leverage.
  3. The attacker made A's volume slightly larger than B's, pushing the funding rate up so A kept paying funding to B and drifted toward liquidation.
  4. When BTC fell, A dropped below maintenance margin and was liquidated. The liquidation sold the entire position at once and, with no lower bound on price during liquidation, drove the mark price below zero. A's theoretical loss of about $144,000 was capped at its margin balance.
  5. The attacker closed B's short against the collapsed price for a profit of about $144,000 and withdrew it; because A's matching loss could not be collected, the pool took the loss.

Protocol details

Classification Exchange (DEX)
Protocol Type Options
Protocol links Website @DeriProtocol

Security review history

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.