Curriculum·G201 Invariant Thinking·about 30 min

Writing the invariants of a position you hold

By the end of this lesson you can

  • →Write the full set of invariants for a leveraged position you hold, not just the one that is obvious
  • →Explain how the Aave CRV event turned one trader's failed attack into bad debt the protocol's other users carried
  • →Compute the health factor and the liquidation buffer that a solvency invariant depends on, and where a thin market breaks it
  • →Distinguish an invariant you can enforce yourself from one you are trusting somebody else to enforce

Graduate · enrolled learners

This lesson opens with Aave v2 CRV bad debt, 22 November 2022.

What happened
Avraham Eisenberg, the trader behind the Mango Markets exploit a month earlier, borrowed about 92 million CRV tokens on Aave v2 against roughly 50 million dollars of USDC collateral and sold the borrowed CRV, an attempt, as Kaiko describes it, to drive the price down and make Curve founder Michael Egorov's large CRV-backed loan liquidatable. CRV fell briefly and then rose sharply, Eisenberg's own borrowed position became undercollateralized, and it was liquidated at a loss to him that Decrypt put at roughly 10 million dollars on what could be seen on chain. But CRV was thinly traded relative to the position size, so liquidators could not clear his debt at the prices the protocol assumed, and Aave was left holding about 1.6 million dollars of bad debt, roughly 2.6 million CRV. The shortfall sat in the pool until Aave's treasury covered it: governance later approved buying the CRV to clear it.
The decision point
A depositor in Aave was trusting one invariant above all: the protocol stays solvent, so the assets backing the pool are always worth at least the deposits. That invariant was not enforced by anything the depositor controlled. It was enforced by an oracle, a liquidation engine, and an assumption that any position could be liquidated into the market fast enough and deep enough to cover its debt. A single position large relative to its token's liquidity broke the assumption, the liquidation left a hole in the pool everyone had deposited into, and it was closed only because Aave's treasury paid for it. The depositor who wrote down only the obvious invariant, my deposit earns yield, missed the one that actually determined whether they got their money back, and missed that they were not the one enforcing it.
Recorded loss
$1,600,000

What you will be able to answer

  • →The invariants of a leveraged position?
  • →How did a failed attack become bad debt for others on Aave?
  • →The assumption behind pool solvency?
  • →Enforced versus trusted invariant?

Orientation and Year One are open: anyone can read them without an account. From Year Two onward the lessons are for enrolled learners, because progress through the later years only means anything if it is tracked against a record.

It is free. We do not sell the list and there is nothing to buy at the end of it.

Sources and review

Confidence high·Volatility medium·Reviewed 2026-09-14·Owner unassigned

Contested

The bad debt is about 1.6 million dollars in Aave's own announcement as reported by The Defiant, The Block and Decrypt. In tokens it was about 2.6 million CRV (Kaiko) or 2.7 million CRV (AMBCrypto, on the proposal that cleared it), so a dollar figure depends on the CRV price used.

Sources differ on the position: Decrypt reports 92 million CRV borrowed against 50 million dollars of USDC, The Block 92 million CRV worth 57 million dollars, and The Defiant an initial deposit of about 39 million dollars of USDC that was then looped. The 10 million dollar loss is Decrypt's estimate from on-chain liquidations only; what Eisenberg did on centralized exchanges is not known.

That Eisenberg was aiming at Egorov's loan is Kaiko's reading; The Defiant notes he may also have held offsetting positions off chain, so his intent is contested.

J304 owns liquidation mechanics as a borrower's numeracy problem. This lesson owns the invariant framing from the depositor's side. Keep the split.