👻
Aave Book
  • Introduction
  • TradFi vs DeFi: Lending
  • Market forces x Interest Rate Models
  • On Indexes
    • Why use indexes?
  • Scaling and ATokens
  • Deposit & Borrow Interest
  • Stable borrowing
    • 🚧Under construction
  • Liquidation
    • 🚧TODO: Full example
    • 🚧Under construction: oracles
  • Primer
    • Bitmap & Masks
      • 🚧padding and bytes
    • WadRayLibrary
      • Math Operations
      • 🚧WIP: Scaling different decimal representations
      • 🚧WIP: 2's complement
      • 🚧casting: to uint128
    • PercentageMath
    • Embedded vs Linked Libraries
  • Functions
    • General Execution flow
    • Architecture & Design choices
      • 🚧Upgradability and Proxies
    • Common Functions
      • getReserveFactor, getDecimals
      • .cache
      • .updateState
      • .updateInterestRates
      • SupplyCap, BorrowCap
      • getFlags
        • 🚧more on flags
      • calculateUserAccountData
    • supply
      • validateSupply
      • transfer & mint
      • isFirstSupply
        • isUsingAsCollateralOne, isUsingAsCollateralAny
      • On check-effects-interactions pattern
    • withdraw
      • get user balance & withdraw amount
      • validateWithdraw
      • collateral check
      • burn ATokens
      • Ensure existing loans are collateralized
    • borrow
      • getIsolationModeState
      • .validateBorrow
      • Mint debt token
      • setBorrowing
      • update IsolationMode debt
      • transfer underlying to user
    • repay
      • get current debt
      • validateRepay, paybackAmount
      • burn debt tokens
      • Cleanup + Collect repay
    • liquidate
      • _calculateDebt
      • validateLiquidationCall
      • getConfigurationData
      • calculateAvailableCollateralToLiquidate
      • 🚧_burnDebtTokens
      • liquidate/burn collateral
      • liquidation Fee
      • Wrap-up
    • 🚧swapBorrowRateMode
    • 🚧setUserUseReserveAsCollateral
  • Contracts
    • AToken
      • Simple example: mint & balanceOf
    • StableDebtToken
      • Implementation explained
    • VariableDebtToken
    • DefaultReserveInterestRateStrategy
    • L2
      • 🚧PriceOracleSentinel
  • Audit findings
    • 🚧Under construction
  • Appendix
    • Simple, Compound, APR, APY
  • Aave Features
    • Risk Management
      • Supply & Borrow Caps
      • Isolation Mode
      • Siloed Borrowing
    • Other features
      • Repay with ATokens
      • eMode: High efficiency Mode
      • 🚧Aave Vault
      • 🚧Portal
Powered by GitBook
On this page
  • The Aave Book
  • A Comprehensive Guide to Lending and Borrowing

Was this helpful?

Edit on GitHub

Introduction

The Aave Book

A Comprehensive Guide to Lending and Borrowing

Welcome to the world of decentralized finance (DeFi) where traditional financial concepts intertwine with cutting-edge blockchain technology. In this guidebook, we embark on a journey to demystify one of the fundamental pillars of DeFi: Aave protocol.

In traditional finance, interest rates play a pivotal role in shaping economic activities, influencing lending decisions, and stimulating growth. Similarly, within the DeFi ecosystem, interest rates serve as a essential building block enabling other financial "legos" to be build upon on it.

Lending/Borrowing protocols act as the foundation for numerous other DeFi applications and protocols. They provide liquidity, facilitate leveraged trading, enable collateralization, and power intricate financial instruments.

Delving into the intricacies of on-chain lending will not only deepen your understanding of the mathematics and engineering principles that power DeFi protocols but also enhance your capabilities as a smart contract developer. By exploring Aave's architecture, interest rate models, and lending mechanisms, you will gain invaluable insights that can be applied to your own smart contract projects, ensuring their robustness and efficiency.

In the chapters that follow, we will unravel the inner workings of the Aave protocol, examining its core components, governance mechanisms, risk management strategies, and the intricate interplay between borrowers, lenders, and liquidity providers. We will also explore the various interest rate models, the concept of collateralization, and the novel features that set Aave apart in the rapidly evolving DeFi landscape.

Get ready to embark on a journey that merges the realms of finance and blockchain, as we unravel on-chain lending. By the end of this guidebook, you will be equipped with the knowledge to navigate the intricacies of Aave, harness its power, and contribute to the exciting world of DeFi innovation.

Let's dive in!

NextTradFi vs DeFi: Lending

Last updated 1 year ago

Was this helpful?