Curriculum·Junior·J304

Lending, Borrowing, and Collateralized Leverage

MakerDAO, 12 and 13 March 2020. Ether fell 43 percent on 12 March alone, from $194 to $111, and the protocol was swamped with liquidations while network congestion drove gas prices up.

Taught in G104-03 ›Source ↗

Start with lesson 15 lessons · about 2.9 hours · 1 lab · free account to read in full

Lesson 1 opens on

The Compound DAI oracle, 26 November 2020

Compound priced its markets from prices reported by Coinbase, accepted on-chain when they sat within 20 percent of a Uniswap time-weighted average.30, while trading near a dollar elsewhere. Because Compound valued DAI debt at the reported price, every DAI borrower's liability was revalued upward at once, while ETH also fell about 8 percent in the same hour, and about $89M of positions were liquidated.

The lessons

  1. J304-01Overcollateralized lendingCompute a health factor and the price move that takes it to oneabout 31 min · opens on The Compound DAI oracle, 26 November 2020
  2. J304-02The liquidation eventCompute what a liquidation takes from you, including the penaltyabout 43 min · opens on The Aave CRV liquidation, November 2022
  3. J304-03Interest rate mechanicsCompute a borrow rate from a utilization curve above and below its kinkabout 33 min · opens on Michael Egorov's CRV-backed loans, July and August 2023
  4. J304-04Looping and recursive strategiesCompute the total exposure and leverage a loop produces from its loan to valueabout 33 min · opens on The stETH loops on Aave, June 2022
  5. J304-05Systemic riskExplain why a protocol accepting its own token as collateral is reflexiveabout 32 min · opens on Venus Protocol, 18 May 2021

Labs

  • J304-L

    The Liquidation Drill

    Open a collateralized borrow on paper: compute the health factor and the liquidation price by hand before the path starts, then follow a ten-day price path to the liquidation and account for it in full: what was repaid, what was taken with the bonus, what is left, and the band where nobody comes.