In a rebase token system, the total supply is expanded or contracted at regular intervals, often daily. This process is executed by a smart contract function, commonly named rebase(), which recalculates the balance of every holder's wallet. The key principle is that while the number of tokens in a wallet changes, the holder's percentage ownership of the total supply and the dollar value of their holdings relative to the target price remain constant. This is distinct from a traditional stablecoin like USDC, which maintains a fixed supply and a 1:1 reserve backing.
Rebase Function
What is a Rebase Function?
A rebase function is a smart contract mechanism that algorithmically adjusts the total token supply to maintain a target price peg, typically without changing the proportional holdings of wallets.
The rebase function operates by comparing the token's current market price to its intended price target, such as $1.00. If the price is above the target, the contract initiates a positive rebase, minting new tokens and distributing them proportionally to all holders, effectively increasing the total supply. Conversely, if the price is below the target, a negative rebase (or contraction) occurs, burning tokens from each wallet to reduce the supply. This elastic supply mechanism is designed to create arbitrage incentives that push the market price toward the peg.
A canonical example of this mechanism is Ampleforth (AMPL), which targets the 2019 US Dollar Consumer Price Index. Its rebase function executes once every 24 hours based on oracle-reported price data. The function's logic can be represented in simplified form as: newSupply = oldSupply * (priceOracle / targetPrice). This calculation determines the new total supply, and every wallet balance is multiplied by this same rebase coefficient. It's crucial to understand that rebase adjustments are not transactions; they are state updates recorded directly on the blockchain, which means they do not incur gas fees for users but do generate an event log.
For developers and integrators, rebase tokens present unique challenges. Exchanges, wallets, and DeFi protocols must listen for the Rebase event and update their internal accounting accordingly. A holder's balance can change between two block queries, so applications should use the token's balanceOfUnderlying or similar functions to get a rebase-adjusted value. Furthermore, the elastic supply can complicate liquidity provision in automated market makers (AMMs) like Uniswap, as the pool's token reserves are also subject to rebase, affecting the constant product formula k = x * y.
The rebase model is often contrasted with seigniorage or algorithmic stablecoin designs that use a multi-token system (e.g., governance and share tokens) to absorb volatility. In a pure rebase system, the elasticity is applied directly to the single circulating token. While designed for stability, rebase tokens can experience significant volatility in their market price during periods of high demand or sell pressure, as the supply adjustment mechanism operates with a time lag, typically of 24 hours.
How a Rebase Function Works
An explanation of the algorithmic process that adjusts token supply to maintain a target price peg, distinct from traditional stablecoin models.
A rebase function is a smart contract mechanism that algorithmically adjusts the total supply of a token in all holders' wallets to maintain a target price peg, typically to another asset like the US dollar. Unlike stablecoins that use collateral reserves or algorithmic minting/burning, a rebase achieves price stability by proportionally increasing or decreasing the number of tokens each holder possesses. This process, often called an elastic supply adjustment, occurs periodically (e.g., every 8 hours) based on the deviation of the token's market price from its target value. The key principle is that while the number of tokens in a wallet changes, the holder's percentage share of the total supply—and thus their share of the network's value—remains constant.
The function's logic is triggered by an oracle price feed. When the market price (P_market) is above the target peg (P_target), the contract calculates a positive rebase, increasing the total supply. Conversely, if P_market is below P_target, it executes a negative rebase, decreasing the supply. The adjustment is calculated as a rebase ratio: newSupply = oldSupply * (P_target / P_market). This ratio is then applied to every wallet and liquidity pool balance. For example, if the target is $1.00 and the market price is $1.20, a positive rebase would increase all balances by 20% to bring the per-token value back down toward the peg. Critically, this happens automatically and programmatically without requiring user interaction.
Implementing a rebase requires careful smart contract design to handle state changes across the entire ecosystem. The function must interact with key components like the token's balance mapping, decentralized exchange (DEX) liquidity pools, and staking contracts to ensure synchronized supply updates. A major technical challenge is ensuring composability—other DeFi protocols must be aware of the rebasing nature of the token to account for balance changes. Furthermore, negative rebases (supply contractions) can be psychologically challenging for users, as they see their token quantity decrease, even though the goal is to preserve the dollar value of their holdings. This distinguishes rebase tokens from more familiar fixed-supply assets.
Key Features of a Rebase
A rebase is an algorithmic adjustment of a token's supply to maintain a target price peg, directly altering the balance in each holder's wallet.
Supply Elasticity
The core mechanism where the total supply of tokens expands or contracts. When the market price is above the target peg, a positive rebase mints new tokens to all holders, increasing supply to lower the price. When below, a negative rebase burns tokens from all wallets, reducing supply to raise the price.
Price-Targeting Algorithm
Rebases are triggered by a pre-defined oracle price feed (e.g., Chainlink) comparing the market price to a target price (e.g., $1.00). The protocol's smart contract calculates the necessary percentage change in supply to move the market price toward the peg, executing the adjustment at a set interval (e.g., every 8 hours).
Proportional Holder Impact
The rebase adjustment is applied proportionally to every wallet address holding the token. This means each holder's percentage ownership of the total supply remains constant. If the supply increases by 10%, a holder with 100 tokens receives 10 new tokens, maintaining their 0.1% share of the network.
Rebase vs. Reward Distribution
Crucially, a rebase is not a dividend or staking reward. It is a balance adjustment. The token's market capitalization (supply * price) aims to stay constant before and after the rebase, unlike yield farming where market cap typically increases with new token emissions.
Accounting & UI Considerations
Rebasing tokens require special handling. Decentralized exchanges (DEXs) must use rebase-aware liquidity pools. Wallets and dashboards must display 'balance' (post-rebase tokens) vs. 'shares' (underlying ownership units). Failing to account for rebases can cause incorrect fee calculations and display errors.
Code Example: Rebase Logic
A practical walkthrough of the core algorithmic logic behind a token rebase operation, demonstrating how supply adjustments are calculated and applied on-chain.
A rebase function is a smart contract method that algorithmically adjusts the total token supply to maintain a target price peg, typically by proportionally increasing or decreasing the balance of every holder's wallet. This function is the core mechanism behind rebase tokens or elastic supply tokens. The logic is triggered periodically or by an oracle price feed, calculating a rebase ratio based on the deviation between the current market price and the target price. This ratio is then applied to the totalSupply and to each address's balance in the contract's internal accounting, leaving the holder's percentage of the total supply unchanged.
The core calculation involves determining a supply delta. For example, if the target price is $1.00 and the current price is $1.10, the contract needs to increase the supply to dilute the price downward. The delta might be calculated as (currentPrice - targetPrice) / targetPrice, resulting in a 10% positive delta. The new total supply becomes oldSupply * (1 + delta). Crucially, the function does not mint or burn tokens in the traditional sense for existing holders; instead, it updates the _balances mapping for every address by the same multiplier, a process often abstracted from users who see their token quantity change in their wallet while their portfolio's USD value relative to the peg remains stable.
A simplified Solidity code snippet illustrates the state update logic:
solidityfunction rebase(uint256 supplyDelta) external onlyOwner { uint256 oldTotalSupply = totalSupply; uint256 newTotalSupply; if (supplyDelta > 0) { newTotalSupply = oldTotalSupply + (oldTotalSupply * supplyDelta) / 1e18; } else { newTotalSupply = oldTotalSupply - (oldTotalSupply * (-supplyDelta)) / 1e18; } totalSupply = newTotalSupply; _gonsPerFragment = TOTAL_GONS / newTotalSupply; emit LogRebase(oldTotalSupply, newTotalSupply); }
This example shows the adjustment of the global totalSupply and a key internal variable _gonsPerFragment, which is used to scale individual balances. The actual balance adjustment for a user is derived by dividing their stored gons balance by the new _gonsPerFragment.
Critical considerations in rebase logic include handling the precision of calculations with high decimal places (often using 1e18 for fixed-point math), ensuring the function is permissioned (e.g., onlyOwner or via an oracle) to prevent manipulation, and managing snapshotting for protocols that need historical data. Developers must also account for interactions with decentralized exchanges (DEXs); a rebase does not automatically adjust liquidity pool reserves, which can create arbitrage opportunities. This disconnect between the token's internal accounting and its DEX representation is a fundamental characteristic of the rebase design pattern.
Understanding this code-level logic is essential for developers integrating rebase tokens, as standard ERC-20 balance queries may not reflect the post-rebase amount until a state-changing transaction (like a transfer) triggers a recalculation. Analysts auditing such contracts must verify the rebase math is free of over/underflow errors and that the delta calculation is resistant to oracle manipulation. This transparent, algorithmic approach to supply elasticity contrasts with centralized stablecoins, offering a unique, if complex, tool for decentralized finance (DeFi) monetary policy.
Protocol Examples Using Rebase Functions
Rebase functions are implemented in various DeFi protocols to manage token supply and maintain price stability. These examples illustrate the primary use cases in practice.
Security Considerations & Risks
A rebase function is a smart contract mechanism that algorithmically adjusts the token supply to maintain a target price peg, introducing unique security and risk vectors distinct from standard tokens.
Oracle Manipulation & Price Feed Risk
The rebase mechanism is typically triggered by an external price oracle. If this oracle is manipulated or provides stale data, the rebase will execute incorrectly, causing the token's supply to expand or contract based on false information. This can lead to significant and immediate loss of value for holders. Attackers may exploit this by manipulating the oracle price to trigger a beneficial rebase for themselves, a form of oracle attack.
Smart Contract Complexity & Audits
Rebase logic adds significant complexity to a token's smart contract. This increases the attack surface and risk of bugs. A single flaw in the rebase calculation, timing, or interaction with other contracts (like staking pools) can be catastrophic. Thorough, multi-firm smart contract audits are essential, but do not guarantee absolute safety. Historical exploits, such as the uint256 underflow bug in early rebase tokens, highlight this critical risk.
Integration Risks with DeFi Protocols
Most DeFi protocols (DEXs, lending markets, yield aggregators) are not natively designed for rebasing tokens. This creates integration hazards:
- Incorrect balance accounting: Protocols may fail to update a user's balance post-rebase.
- Faulty price calculations: Using the rebasing token's supply in TVL or collateral value calculations can be erroneous.
- Liquidation errors: In lending markets, a negative rebase could unexpectedly drop a user's collateral value, triggering unfair liquidations.
Holder Dilution & 'Rebase Traps'
During a negative rebase (supply contraction), a holder's percentage of the total supply remains constant, but their token balance decreases. This can feel like dilution, even though their share of the network is preserved. Furthermore, 'rebase traps' occur when users interact with the token during the rebase transaction window, potentially receiving an unfavorable adjustment. Understanding that value is tied to share of supply, not raw token count, is crucial for users.
Centralization & Admin Key Risk
Many rebase implementations retain privileged functions for the development team, such as the ability to:
- Pause the rebase mechanism.
- Upgrade the contract logic.
- Adjust oracle parameters or switch the price feed. These admin keys represent a central point of failure. If compromised via a hack or acted upon maliciously (a rug pull), they can disable the core stabilizing mechanism or drain funds. Evaluating the timelocks and governance around these controls is a key security step.
Market Volatility & Reflexivity
Rebase mechanisms can create reflexive feedback loops with market sentiment. A falling price triggers a negative rebase (burn), which may be perceived as a failure, causing further sell pressure. Conversely, rapid price increases lead to inflationary rebases, which can be seen as dilution, prompting sells. This reflexivity can exacerbate volatility rather than dampen it, especially in low-liquidity conditions, leading to death spirals or unsustainable hyperinflation.
Rebase vs. Other Peg Mechanisms
A technical comparison of different on-chain mechanisms used to maintain a token's peg to a target value.
| Mechanism / Feature | Rebase (Elastic Supply) | Seigniorage (Algorithmic Stablecoin) | Collateralized (Over/Under) | Oracle-Based (Synthetic) |
|---|---|---|---|---|
Primary Mechanism | Adjusts holder token balances | Mints/Burns supply via treasury policy | Locks/Unlocks collateral at a ratio | Uses price oracle to mint/burn debt |
Peg Target | Specific price (e.g., $1) | Specific price (e.g., $1) | Value of locked collateral (e.g., 1 USD of ETH) | Price of an external asset (e.g., Tesla stock) |
Holder Wallet Balance | Changes automatically | Remains constant | Remains constant | Remains constant |
Supply Adjustment | Global, proportional rebase | Treasury mints/burns from/to protocol | User-initiated mint/burn against collateral | User-initiated mint/burn based on oracle price |
Typical Volatility Buffer | Rebase lag (e.g., 8-48h) | Expansion/Contraction cycles | Collateralization ratio (e.g., 150%) | No buffer, direct oracle price |
Primary Risk Vector | Negative rebase (balance shrinkage) | Death spiral (loss of peg confidence) | Collateral liquidation (price volatility) | Oracle failure (manipulation/lag) |
User Experience Impact | Passive, non-custodial balance change | Active participation in bond/expansion phases | Active management of collateral position | Active minting/burning based on oracle feed |
Example Protocols | Ampleforth, Olympus (early) | Empty Set Dollar, Basis Cash | MakerDAO, Liquity | Synthetix, Mirror Protocol |
Common Misconceptions About Rebase Functions
Rebase functions, often called elastic supply tokens, are frequently misunderstood. This section clarifies their core mechanics, dispelling common myths about their value, security, and purpose.
No, a rebase function does not directly change the value of your holdings; it adjusts the token supply to target a specific price peg. The key mechanism is that your percentage ownership of the total supply remains constant. When a positive rebase occurs (increasing supply), tokens are distributed proportionally to all holders, diluting the price per token back toward the target. Conversely, a negative rebase (decreasing supply) burns tokens from all wallets, increasing the price per token. The net effect on your wallet's total value in a stablecoin equivalent should, in theory, remain aligned with the peg, minus any market volatility or protocol inefficiencies.
Example: If you hold 1% of the total supply and a positive rebase mints 10% more tokens, you will receive new tokens such that you still own 1% of the new, larger supply. The individual token price decreases, but your share of the network is unchanged.
Frequently Asked Questions (FAQ)
A rebase is a unique tokenomic mechanism that algorithmically adjusts token supply to maintain a target price peg, distinct from stablecoins backed by collateral. This section answers common technical and practical questions.
A rebase token is a cryptocurrency with an elastic supply that automatically increases or decreases the number of tokens held in each wallet to maintain a target price peg, typically to an asset like the US dollar. It works through a smart contract that periodically (e.g., every 8 hours) performs a rebase event. During this event, the contract compares the token's market price to its target price. If the market price is above the target, the contract mints new tokens and distributes them proportionally to all holders, increasing supply to push the price down. Conversely, if the price is below target, it burns tokens from each wallet, reducing supply to push the price up. The holder's percentage ownership of the total supply remains constant, but their token balance changes. Popular examples include Ampleforth (AMPL) and Olympus DAO's (OHM) predecessors.
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.