Liquidation Threshold

An insightful dissection to Understanding the Liquidation Threshold in Decentralized Finance - Unpack the Liquidation Threshold, DeFi's critical trigger for selling collateral when loans become too risky. Learn its synergy with Loan-to-Value (LTV) and Max LTV, key for maintaining platform health and over-collateralized lending.

1. Contract Architecture
A foundational tour to A Deep Dive into Aave V3's Contract Architecture - This lesson navigates Aave V3's smart contract ecosystem, explaining the `Pool` contract's central proxy function and its reliance on specialized logic libraries. Learn how user interactions are processed, positions are tokenized via `ATokens` and `DebtTokens`, and key external contracts support the protocol. Duration: 3min
2. Supply Code Walkthrough
An architectural dissection to Aave V3's Supply Mechanism: Contracts, Calls, and ATokens - This lesson breaks down the Aave V3 supply process, tracing calls from the Pool proxy through `SupplyLogic` to the AToken contract. Understand how user assets are transferred and scaled, interest-bearing ATokens are minted on their behalf. Duration: 3min
3. Linear Interest
A foundational breakdown to Interest Mechanics in DeFi: Debt and Supply Accumulators - Unpack the distinct interest calculation methods for borrowed funds (per-second compounding) and supplied liquidity (linear growth with periodic compounding) in Web3 lending. See how adaptable rate accumulator functions provide a unified approach for both. Duration: 4min
4. Supply Exercises
Reading Time: 0min
5. Borrow Code Walkthrough
An illuminating journey to Understanding Aave V3 Borrows: A Deep Dive into `onBehalfOf` and Credit Delegation - This lesson traces the `onBehalfOf` parameter through Aave V3's borrow mechanism, revealing its core function. Understand how it enables Credit Delegation, where debt is assigned to one party while another receives the borrowed assets. Duration: 6min
6. Compound Interest Approximation
A mathematical breakdown to Optimizing Compound Interest Calculations in Aave V3 - Explore Aave V3's ingenious use of binomial expansion to approximate compound interest, slashing on-chain gas costs. Understand the critical role of `RAY` fixed-point arithmetic in maintaining calculation precision within this optimized system. Duration: 4min
7. Reserve Factor
A financial deep-dive to Understanding the Reserve Factor in DeFi Lending - Explore how DeFi protocols engineer their revenue by using the Reserve Factor to direct a share of borrower interest to protocol-owned reserves. Understand its calculation, impact on supplier rates with Aave V3 examples, and its strategic use for growth and security. Duration: 1min
8. LTV
A practical walkthrough to Decoding Max LTV: A Guide to Collateralized Borrowing in Web3 - Master Maximum Loan-to-Value (Max LTV), the key ratio that defines how much you can borrow against your collateral in Web3. This guide explains its calculation with an example and its vital role for both borrowers and lending platforms. Duration: 1min
9. Liquidation Threshold
An insightful dissection to Understanding the Liquidation Threshold in Decentralized Finance - Unpack the Liquidation Threshold, DeFi's critical trigger for selling collateral when loans become too risky. Learn its synergy with Loan-to-Value (LTV) and Max LTV, key for maintaining platform health and over-collateralized lending. Duration: 1min
10. Health Factor
A definitive walkthrough to Understanding Your Health Factor in DeFi Borrowing - This lesson illuminates the Health Factor, DeFi's crucial shield against loan liquidation, clarifying why values below 1 are perilous. Master its calculation, involving the Average Liquidation Threshold, total collateral, and debt, and see how market movements affect your borrowing safety. Duration: 5min
11. Borrow Exercises
Reading Time: 0min
12. Repay Code Walkthrough
A practical explanation to Mastering Full Debt Repayment with Variable Interest in Web3 Lending Protocols - Delve into why repaying variable interest loans in DeFi can leave small "dust" balances due to continuous interest accrual. Learn the smart contract logic and how to use `type(uint256).max` to signal full repayment and clear your entire debt. Duration: 3min
13. Repay Exercises
Reading Time: 0min
14. Withdraw Code Walkthrough
A crucial deep-dive to Understanding Aave V3 Withdrawals: The `type(uint256).max` Solution for Full Retrieval - Uncover why precise withdrawal amounts in Aave V3 often leave "dust" due to accruing interest. Learn how `type(uint256).max` ensures every token, including all interest, is withdrawn by leveraging real-time balance calculations. Duration: 3min
15. Withdraw Exercises
Reading Time: 0min
16. Close Factor
A detailed walkthrough to Aave V3's Liquidation Close Factor: Rules and Rationale - Explore the Aave V3 Close Factor, which defines the maximum debt repayable in one liquidation event. Learn the specific conditions for the 50% total debt cap and its role in preventing "dust" and incentivizing liquidators. Duration: 4min
17. Liquidation Math
An analytical exploration to Determining Collateral Liquidation Amounts in DeFi - This lesson dissects the core equation protocols use to calculate seized collateral during DeFi liquidations. Learn how liquidation bonuses for incentivizing liquidators and protocol fees impact the final amount. Duration: 2min
18. Why My Position Is Not Liquidated
An economic breakdown to The Economics of DeFi Liquidation: Why Small, At-Risk Positions Can Survive - Discover why DeFi loans with minimal collateral can dodge liquidation even when their Health Factor is critical. Understand how transaction gas costs often outweigh the incentives for liquidators, leaving these 'dust' positions untouched. Duration: 1min
19. Liquidation Exercises
Reading Time: 0min
20. Flash Loan
A practical breakdown to Aave V3's `flashLoanSimple`: Single-Token Borrowing - Learn the mechanics of Aave V3's `flashLoanSimple` for uncollateralized, single-asset loans, repaid within one transaction. Understand the receiver contract's role, the `executeOperation` callback, and the crucial token approval step for successful repayment. Duration: 2min
21. Flash Loan Exercises
Reading Time: 0min

Course Overview

About the course

What you'll learn

Aave V3 core functionalities and key features

APY & APR, market forces, utilization rates, interest rate models

Reserves, ATokens, debt tokens, liquidity and borrow index

Aave smart contracts architecture

Supply, borrow, repay, withdrawal, liquidation

Compound interest

Reserve factors, liquidation pricing, credit delegation, LTV

Aave V3 flash loans

How to buy long and sell short using Aave V3

How to build a functional app to buy long, sell short, and close a position.

Course Description

Who is this course for?

  • Smart Contract Developers
  • Blockchain Engineers
  • Web3 Developers
  • Solutions Architects
  • Smart Contract Security Researchers

Meet your instructors

Tasuku Nakamura

Tasuku Nakamura

Founder at smartcontract.engineer

Smart contract engineer and educator.

Last updated on July 20, 2025