Aave

A beginner's guide to Aave (V3) and its over-collateralized loans. This lesson covers the basics of how Aave works, including the two user types (suppliers and borrowers), the protocol's over-collateralized lending model, and how interest is earned and paid.

Join the Rocket Pool Discord Server

Stay in the loop with the latest Rocket Pool updates and connect with over 5,000 developers in the community.

1. Flash Leverage Intro
A technical guide to flash leverage on Aave. The lesson covers the basics of flash leverage including how it works, it's various uses cases, and how to implement flash leverage on Aave. Duration: 0min
2. Aave
A beginner's guide to Aave (V3) and its over-collateralized loans. This lesson covers the basics of how Aave works, including the two user types (suppliers and borrowers), the protocol's over-collateralized lending model, and how interest is earned and paid. Duration: 2min
3. Loan To Value
A practical guide to loan-to-value (LTV) - This lesson introduces loan-to-value (LTV) as a concept in DeFi lending. The LTV setting defines the maximum amount of tokens you can borrow against a specific collateral, ensuring adequate risk mitigation for the lending protocol. The lesson uses an example to illustrate how the LTV is calculated in a real-world scenario. Duration: 2min
4. Health Factor
A detailed explanation of the health factor in the Arbitrum protocol. This lesson breaks down how the health factor is calculated and what it means when a user's health factor falls below 1. It also covers the relationship between health factor, liquidation threshold, and loan-to-value (LTV). Duration: 6min
6. Leverage
A basic introduction to leverage in DeFi - Leverage can be used to amplify both profits and losses in DeFi. This lesson covers the basics of leverage by using a simplified example to illustrate how leverage can be utilized in a DeFi protocol like Aave. Duration: 5min
7. Max Leverage
A detailed explanation of maximum leverage in over-collateralized lending. The lesson covers why the maximum leverage is defined by the equation 1/(1-L), where L is the loan-to-value ratio. It also covers an example demonstrating the calculation of maximum leverage with a given loan-to-value ratio. Duration: 4min
8. Flash Leverage Opening A Position
A technical explanation of flash leverage to open a position - This lesson explains how to open a leveraged position in the Aave protocol using a flash loan and then repaying the loan with stablecoins. Duration: 1min
9. Flash Leverage Closing A Position
A comprehensive guide to closing a leveraged position using flash loans. This lesson covers the steps required to close a leveraged position, including taking a flash loan of a stablecoin, repaying the stablecoin debt, withdrawing collateral, selling collateral on a DEX, repaying the flash loan, and claiming your profits. Duration: 1min
10. Flash Leverage Math
A beginner's guide to understanding flash loan amounts. The lesson covers how flash loans can be used to leverage a position and derive the maximum amount you can flash loan based on initial collateral and LTV. Duration: 6min
11. Flash Leverage Contract Design
A beginner's guide to Flash Loans - This lesson will teach you the basics of flash loan and how to create smart contracts that use flash loan. You will learn the logic and reasoning behind the different contracts as well as the concepts of creating a flash loan position and closing the loan. Duration: 2min
13. Exercise Get Max Flash Loan
An intermediate coding exercise to getMaxFlashLoanAmountUsd. The exercise is designed to test your understanding of the math for how the max flash loan amount is calculated, given the collateral amount, so you can implement logic to calculate the max flash loan amount in USD. Reading Time: 0min
14. Solution Get Max Flash Loan
A comprehensive guide to calculating the maximum flash loan amount in USD - This lesson teaches you how to fetch the price and LTV (Loan-to-Value) of an asset using the Aave protocol. Then, you'll learn how to use these values to calculate the maximum flash loan amount in USD, taking into account the necessary adjustments for decimals. Duration: 8min
15. Exercise Open Leverage
An insightful guide to implementing `FlashLev.open` and `_flashLoanCallback` This lesson focuses on structuring a smart contract function for initializing a leveraged position using a flash loan. It covers transferring collateral, initiating a flash loan, checking health factors, opening a position, and repaying the flash loan. Reading Time: 0min
16. Solution Open Leverage
A comprehensive guide to creating a Flash Leverage contract. The lesson covers implementing a Flash Leverage contract that interacts with the Aave protocol. It shows you how to transfer collateral to the Aave protocol, initiate a flash loan, and use the SwapHelper contract to swap tokens. Duration: 13min
17. Exercise Close Leverage
An in-depth guide to `FlashLev.close` exercise - Implementing `close` function with flash loan callback to close a leveraged position. This lesson provides step-by-step instructions on how to get debt owed to Aave, initiate a flash loan using `AaveHelper`, handle profit and loss, and repay the flash loan within the `_flashLoanCallback` function. Reading Time: 0min
18. Solution Close Leverage
A comprehensive guide to understanding flash loan operations and how they can be used to open and close leveraged positions in a DeFi protocol. This lesson provides a deeper understanding of flash loan operations, demonstrating how a developer can implement flash loan logic within a smart contract. The code is discussed in detail, including the use of external contracts and functions for the purposes of opening a leveraged position, repaying the flash loan, and then finally closing the leveraged position. Duration: 7min

Course Overview

About the course

What you'll learn

Rocket Pool rETH staking, yield mechanisms, trading options, and contract architecture

How to distribute rewards and calculate rETH/ETH exchange rate

How to acquire and redeem rETH

Integrating rETH into DeFi protocols like AAVE V3

How to how to create leveraged ETH positions using rETH

How to provide rETH as liquidity to Balancer and Aura

Getting the USD price of rETH using Rocket Pool NAV oracle

Re-staking with EigenLayer

Course Description

Who is this course for?

  • Web3 Developers
  • Software Engineers
  • Financial Analysts
  • Finance developers
  • Smart Contract Security Researchers

Potential Careers

DeFi Developer

$75,000 - $200,000 (avg. salary)

Smart Contract Engineer

$100,000 - $150,000 (avg. salary)

Web3 developer

$60,000 - $150,000 (avg. salary)

Smart Contract Auditor

$100,000 - $200,000 (avg. salary)

Blockchain Financial Analyst

$100,000 - $150,000 (avg. salary)

Web3 Developer Relations

$85,000 - $125,000 (avg. salary)

Meet your instructors

Tasuku Nakamura

Tasuku Nakamura

Founder at smartcontract.engineer

Smart contract engineer and educator.

Last updated on July 8, 2025