Further Reading: Lending, Borrowing, and Yield

Primary Sources and Protocol Documentation

Aave

  • Aave v3 Technical Paper (2022). The official technical specification of Aave v3, covering the pool architecture, interest rate models, isolation mode, efficiency mode, and portal system. Essential reading for understanding the protocol at the implementation level. Available at: https://github.com/aave/aave-v3-core/blob/master/techpaper/Aave_V3_Technical_Paper.pdf
  • Aave v3 Documentation. The living documentation for Aave v3, including parameter tables for all supported assets, risk methodology, and governance processes. Available at: https://docs.aave.com/
  • Aave Flash Loan Documentation. Technical guide to implementing flash loans on Aave v3, including code examples and fee structures. Available at: https://docs.aave.com/developers/guides/flash-loans

Compound

  • Compound v3 (Comet) Documentation. Technical documentation for Compound's simplified v3 architecture, explaining the single-borrowable-asset model and migration from v2. Available at: https://docs.compound.finance/
  • Leshner, Robert & Hayes, Geoffrey. "Compound: The Money Market Protocol" (2019). The original Compound whitepaper describing the pool-based lending model, cToken mechanics, and interest rate architecture. A foundational document for DeFi lending.
  • Compound Governance Forum. Archive of governance proposals, parameter change discussions, and community debates. The Proposal 117 incident (token distribution bug) is documented extensively here. Available at: https://www.comp.xyz/

MakerDAO

  • MakerDAO Technical Documentation. Covers the vault (CDP) system, liquidation mechanics, and DAI stability mechanisms. Relevant to this chapter because MakerDAO's overcollateralized lending model predates and influenced Compound and Aave. Available at: https://docs.makerdao.com/
  • "Black Thursday" Post-Mortem Report (March 2020). MakerDAO's official analysis of the March 12, 2020 liquidation crisis, including root cause analysis, data on zero-bid auctions, and remediation steps. Essential reading for understanding liquidation risk.

Academic and Research Papers

  • Gudgeon, Lewis, et al. "DeFi Protocols for Loanable Funds: Interest Rates, Liquidity and Market Efficiency" (2020). Academic analysis of interest rate models in DeFi lending protocols, comparing algorithmic rate-setting to traditional money markets. Published in the Proceedings of the 2nd ACM Conference on Advances in Financial Technologies.

  • Qin, Kaihua, et al. "Attacking the DeFi Ecosystem with Flash Loans for Fun and Profit" (2021). Comprehensive academic analysis of flash loan attack vectors, including a taxonomy of exploit types and a framework for assessing flash loan vulnerability. Essential reading for understanding the security implications of flash loans. Published in Financial Cryptography and Data Security 2021.

  • Perez, Daniel, et al. "Liquidations: DeFi on a Knife-edge" (2021). Empirical study of liquidation events across major DeFi protocols, analyzing the efficiency of liquidation bots, the impact of gas prices, and the frequency of cascading liquidations. Published in Financial Cryptography 2021.

  • Werner, Sam, et al. "SoK: Decentralized Finance (DeFi)" (2022). Systematic survey of the DeFi ecosystem, including a thorough treatment of lending protocols, their risks, and their relationship to traditional finance. Published in the proceedings of IEEE S&P.

  • Xu, Jiahua & Vadgama, Nikhil. "From Banks to DeFi: The Evolution of the Lending Market" (2022). Comparative analysis of traditional banking and DeFi lending, covering capital efficiency, risk management, and regulatory implications. Available on SSRN.

Books

  • Harvey, Campbell R., Ramachandran, Ashwin, & Santoro, Joey. DeFi and the Future of Finance (2021). Wiley. Chapter 4 covers decentralized lending in detail, with a focus on Compound and Aave. Accessible to readers with a finance background. Provides useful comparisons to traditional banking structures.

  • Schär, Fabian & Berentsen, Aleksander. Bitcoin, Blockchain, and Cryptoassets (2020). MIT Press. While focused more broadly on crypto fundamentals, includes a rigorous treatment of smart contract-based financial systems that contextualizes DeFi lending within the broader blockchain architecture.

  • Antonopoulos, Andreas M. & Wood, Gavin. Mastering Ethereum (2018). O'Reilly. The foundational text for Ethereum development. While it predates most DeFi protocols, its chapters on smart contract programming and the EVM are essential background for understanding how lending protocols work at the code level.

Industry Analysis and Data

  • DeFi Llama (https://defillama.com/). Real-time data on TVL, protocol revenue, yields, and chain deployments for all major DeFi lending protocols. The "Yields" section allows direct comparison of supply rates across protocols, and the "Revenue" section provides the data needed for real yield calculations.

  • Dune Analytics (https://dune.com/). Community-built dashboards tracking liquidation volumes, flash loan usage, interest rate histories, and governance activity for Aave, Compound, and other lending protocols. Search for "Aave liquidations," "flash loan volume," or "Compound utilization" to find relevant dashboards.

  • Token Terminal (https://tokenterminal.com/). Protocol-level financial data including revenue, earnings, and P/E ratios for DeFi lending protocols. Useful for evaluating the real yield and valuation of lending protocol tokens.

  • Gauntlet Network Research. Gauntlet is a DeFi risk management firm that provides risk parameter recommendations to Aave and Compound governance. Their research reports on collateral factor optimization, interest rate model tuning, and liquidation efficiency are among the most rigorous applied analyses in DeFi. Available at: https://www.gauntlet.xyz/research

  • Chaos Labs. Another major risk management firm for DeFi, providing simulation-based analysis of protocol parameters. Their work on Aave v3's risk parameters and E-mode configurations is particularly relevant. Available at: https://chaoslabs.xyz/

Historical Events and Post-Mortems

  • bZx Flash Loan Attacks (February 2020). Multiple post-mortem analyses exist, including bZx's own report and independent analyses by PeckShield and samczsun. Search "bZx flash loan attack post-mortem" for comprehensive technical breakdowns.

  • Cream Finance Exploits (2021). Cream Finance was exploited multiple times in 2021, with the largest ($130M) exploiting a reentrancy vulnerability via flash loans. Rekt News (https://rekt.news/) provides detailed breakdowns of each incident.

  • Euler Finance Exploit and Recovery (March 2023). The $197M exploit and subsequent return of funds is documented by Euler's team, security researchers, and on-chain analysts. The timeline of the attacker's on-chain messages and the negotiation process is itself a case study in DeFi incident response.

  • Mango Markets / Eisenberg Case (October 2022). The $114M oracle manipulation and subsequent criminal prosecution of Avraham Eisenberg. Court documents, DOJ press releases, and on-chain analysis provide a detailed case study in the intersection of DeFi exploits and traditional law enforcement.

  • Compound Proposal 117 Bug (September 2021). A governance proposal that accidentally enabled excessive COMP distribution. Compound's forum archives contain the original proposal, the bug report, and the remediation discussions — a case study in governance risk.

Advanced Topics

  • MEV (Maximal Extractable Value) and Liquidations. Liquidation bots operate within the broader MEV ecosystem. For deeper understanding, see Flashbots' research (https://writings.flashbots.net/) and the paper "Flash Boys 2.0" by Daian et al. (2020), which documents how miners (now validators) can extract value from transaction ordering, including liquidation transactions.

  • Interest Rate Model Optimization. For readers interested in the mathematical foundations, the Aave and Compound governance forums contain extensive debates about parameter optimization — discussions about what Slope2 should be for a particular asset, how reserve factors should be set, and how optimal utilization targets should respond to market conditions.

  • Real-World Asset (RWA) Lending. MakerDAO's expansion into real-world assets (treasury bills, real estate) represents the next frontier of DeFi lending. The MakerDAO Endgame Plan documentation outlines how overcollateralized crypto lending mechanics are being adapted for traditional assets.

  • Undercollateralized Lending Experiments. Protocols like Maple Finance, TrueFi, and Goldfinch have experimented with undercollateralized or reputation-based lending in DeFi. Their approaches — and their failures (Maple had significant defaults in 2022) — provide instructive contrasts to the overcollateralized model.

Tools for Hands-On Learning

  • Aave on Ethereum Testnet. Aave maintains deployments on Ethereum testnets where you can practice supplying, borrowing, and managing positions with test tokens. No real money required.

  • Tenderly Simulation Platform (https://tenderly.co/). Allows you to simulate DeFi transactions — including flash loans — against forked mainnet state. You can test flash loan contracts without deploying them or spending real gas.

  • DeFi Saver (https://defisaver.com/). A position management tool built on top of flash loans. Using it (even just exploring the interface) provides intuitive understanding of how flash loans enable collateral swaps, leverage adjustments, and self-liquidation.

  • The code files accompanying this chapter (interest_rate_model.py, liquidation_simulator.py, flash_loan_example.py, yield_analysis.py) provide hands-on implementations of the key concepts. Run them, modify parameters, and observe how the system behaves under different conditions.