1/5
## What is a Rebase Token? A rebase token is a type of token or cryptocurrency where the total supply adjusts based on a specific algorithm to reflect changes in underlying value or accrued rewards rather than the price of the token changing. These adjustments are called rebases. There are two main types of rebased tokens: 1. Rewards rebase tokens: These tokens are designed for earning rewards, like interest in lending or borrowing. 2. Stable value tokens: These tokens are designed to keep their value stable regardless of market fluctuations. Let's take a real-world example. Look at Aave's aToken. This is an example of a rebase token as you can see this _balance of_ function. With rebase tokens, the _balance of_ function will be dynamic. So you can see here is calculating the accumulated interest and returning this calculation. ```javascript function balance(address user) public view returns (uint256) { // dev: calculate the balance of the user, which is the principal + interest generated by the redirected balance // principal balance: interest generated by the principal balance // prepare: user for the interest which is being calculated // return the total balance of the user uint256 currentPrincipalBalance = super.balanceOf(user); uint256 balanceRedirectedByOthers = redirectedBalance[user]; // balance redirected by other users for user at rate accrual uint256 redirectedBalanceInterest = redirectedBalance[user] * userInterestRate; if (currentPrincipalBalance + redirectedBalanceInterest == 0) { // if the user is not redirecting the interest to anybody, across return 0; } else if (interestRedirectionAddress[user] == address(this)) { // if the user redirected the interest, then only the redirected // balance generates interest. It is due to the interest generated // by the balance redirected is added to that current principal balance. return getRedirectedInterestBalanceInternal(); } else { return currentPrincipalBalance + redirectedBalanceInterest; } } ``` When you deposit into Aave, you're essentially lending the amount to earn some interest. In return, you receive aTokens like aUSDC or aDAI, which represent your deposit. These tokens automatically adjust their supply to reflect the interest you earn and allow you to withdraw your deposit and accrued interest anytime. For example, let's say you deposit 1,000 USDC into Aave and the annual interest rate is 5%. Your aUSDC balance will grow to 1,050 over the course of a year.
A simple explainer to rebase tokens - This lesson covers the basic concepts of rebase tokens and how they differ from typical cryptocurrencies. We'll also explore some real-world examples including Aave, and how rebase tokens are used in DeFi.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Advanced smart contract development
How to develop a stablecoin
How to develop a DeFi protocol
How to develop a DAO
Advanced smart contracts testing
Fuzz testing
Manual verification
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on March 11, 2025
Solidity Developer
Advanced FoundryDuration: 36min
Duration: 3h 06min
Duration: 5h 02min
Duration: 6h 02min
Duration: 2h 47min
Duration: 1h 23min
Duration: 4h 28min
Duration: 1h 19min
Duration: 1h 10min
Course Overview
About the course
Advanced smart contract development
How to develop a stablecoin
How to develop a DeFi protocol
How to develop a DAO
Advanced smart contracts testing
Fuzz testing
Manual verification
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on March 11, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar