Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Guides

Setting Up a Seigniorage Share Model

A technical guide to implementing a seigniorage share algorithmic stablecoin system, including expansion logic, bond contracts for contraction, and staking rewards.
Chainscore © 2026
introduction
IMPLEMENTATION GUIDE

Setting Up a Seigniorage Share Model

A practical guide to implementing the core smart contracts for a seigniorage share stablecoin system, focusing on the algorithmic expansion and contraction of supply.

A seigniorage share model is a type of algorithmic stablecoin protocol that uses a multi-token system to stabilize a target asset's price. The core components are a stablecoin (e.g., a USD-pegged token), a share token that captures seigniorage profits, and a bond token used for contraction cycles. The protocol algorithmically expands the stablecoin supply when its price is above the peg, minting new stablecoins and distributing a portion to share token stakers as rewards. When the price is below the peg, the protocol sells bonds at a discount, which can be redeemed for stablecoins later, effectively burning supply to restore the peg. This mechanism, pioneered by projects like Basis Cash and Empty Set Dollar, relies on market incentives rather than collateral backing.

The first step in setting up the system is deploying the three core ERC-20 contracts. The stablecoin token (e.g., STABLE) has a minting function restricted to the protocol's treasury contract. The share token (e.g., SHARE) represents governance and profit rights. The bond token (e.g., BOND) is a debt instrument issued during contraction. A critical contract is the Oracle, which provides the time-weighted average price (TWAP) of the stablecoin from a decentralized exchange like Uniswap V2 or V3. Accurate price feeds are essential, as the entire expansion/contraction logic depends on the reported price relative to the target peg (e.g., $1.00).

Next, implement the central Treasury contract. This contract holds the authority to mint STABLE tokens and issue BOND tokens. Its core logic involves two primary functions. In an expansion phase (price > $1.01), the mintStablecoins function is callable, creating new STABLE tokens. A portion (e.g., 90%) is sent to a liquidity pool to strengthen reserves, while the remainder is distributed to users staking their SHARE tokens in a separate staking contract. In a contraction phase (price < $0.99), the issueBonds function becomes active, allowing users to buy BOND tokens with STABLE tokens at a discount, which burns the received STABLE.

The bond redemption mechanism requires careful design. BOND tokens can only be redeemed for STABLE tokens when the protocol is in an expansion phase again and the treasury has accumulated sufficient excess reserves. The redemption rate typically offers a premium, rewarding bond holders for providing stability during the downturn. A common pattern is to process redemptions in a first-in-first-out (FIFO) queue to ensure fairness. Simultaneously, a Staking contract must be deployed to manage SHARE token deposits and distribute the seigniorage rewards minted during expansions, often using a rebasing or reward-claim mechanism.

Key security and parameter considerations include setting appropriate deviation thresholds (e.g., 1% deviation from peg triggers action), expansion/contraction cooldown periods to prevent rapid cycling, and minting limits per epoch. The contracts must be robust against oracle manipulation, which is a historic vulnerability in these systems. Thorough testing with forked mainnet environments using tools like Foundry or Hardhat is essential to simulate price movements and economic attacks before any mainnet deployment.

prerequisites
SEIGNIORAGE SHARE MODEL

Prerequisites and Setup

This guide outlines the technical prerequisites and initial setup required to implement a seigniorage share model, a monetary policy mechanism used by algorithmic stablecoins.

A seigniorage share model is a two-token system designed to maintain a stablecoin's peg. The core components are a stable asset (e.g., a token pegged to $1) and a governance/share token that absorbs volatility and captures system profits. Before development, you must understand the key mechanisms: expansion (minting stablecoins when above peg), contraction (burning stablecoins or selling shares when below peg), and bonding (users lock stablecoins for discounted shares during contraction). Familiarity with these concepts is essential.

Your development environment requires specific tools. You will need Node.js (v18 or later) and a package manager like npm or yarn. Essential libraries include a smart contract framework such as Hardhat or Foundry for compiling, testing, and deploying, along with OpenZeppelin Contracts for secure, audited base implementations like Ownable and ERC20. You'll also need access to a blockchain node for testing; services like Alchemy or Infura, or a local node via Ganache, are suitable.

The core of the system is implemented in smart contracts. You will typically need at least three contracts: a Stablecoin (ERC-20), a ShareToken (ERC-20), and a Treasury or Controller that orchestrates the monetary policy. The Treasury contract holds reserves, manages the minting/burning logic for both tokens, and handles bond sales. It must have precise, permissioned functions to execute expansion and contraction cycles, often triggered by an external oracle or keeper based on the stablecoin's market price.

For initial local setup, clone a boilerplate Hardhat project and install dependencies. Run npm init and then npm install --save-dev hardhat @openzeppelin/contracts. Initialize a sample Hardhat project and structure your contracts directory. Write and compile basic versions of your three core contracts. Use Hardhat's network configuration to connect to a local testnet, and write initial deployment scripts to ensure the foundational setup works before implementing complex bonding or rebase logic.

Security and testing are paramount from the start. Write comprehensive unit tests for all monetary policy functions using Hardhat's testing environment or Foundry's Forge. Test critical scenarios: successful peg maintenance during expansion, bond issuance during contraction, and edge cases like failed oracle updates. Consider integrating a price feed oracle like Chainlink for realistic peg data in tests. Always plan for audits; the complexity of the economic interactions makes formal security reviews a non-negotiable prerequisite for any mainnet deployment.

core-architecture
CORE CONTRACT ARCHITECTURE

Setting Up a Seigniorage Share Model

A technical guide to implementing a seigniorage share model, the foundational mechanism behind algorithmic stablecoins like Olympus DAO.

A seigniorage share model is a DeFi-native monetary policy where a protocol mints and distributes new tokens to stakers as a reward, creating a flywheel for protocol-owned liquidity. Unlike traditional staking, the reward tokens are not taken from transaction fees but are newly minted, similar to a central bank printing currency. The core contract architecture for this model typically involves three key components: a bonding contract for selling discounted tokens in exchange for liquidity, a staking contract for locking tokens to earn rewards, and a treasury contract that holds the accumulated assets and manages minting authority. This structure decouples the protocol's value from pure speculation and ties it to its treasury reserves.

The primary mechanism is governed by a bonding curve. Users can bond assets like LP tokens or stablecoins to the treasury in exchange for the protocol's native token at a discount, with a vesting period. For example, a user might bond $100 worth of DAI-USDC LP tokens and receive $110 worth of OHM tokens, redeemable after 5 days. This process does not dilute existing holders because the tokens are newly minted. The treasury uses the bonded assets to build its protocol-owned liquidity (POL), creating a permanent liquidity base that reduces reliance on external liquidity providers and captures fees for the protocol.

The staking contract distributes the seigniorage, or newly minted tokens, to stakers. A typical implementation uses a rebase mechanism or a vault wrapper to automatically compound rewards. In a rebase system, stakers' token balances increase at each epoch (e.g., every 8 hours) based on the current reward rate and staking APY. The reward rate is calculated by a policy contract, often using a formula like (Treasury Value * Reward Rate) / Staked Supply. This creates a direct incentive to stake, as unstaked tokens are diluted by the new minting. Security here is paramount; the staking contract must have a mint role restricted solely to the policy module.

Setting up the treasury requires careful management of minting permissions and asset valuation. The treasury contract holds all bonded assets (e.g., DAI, ETH, LP tokens) and has the sole authority to mint the protocol token. It must include a robust valuation module to determine the treasury's value in terms of the base currency (e.g., USD). This is often done using decentralized oracles like Chainlink for spot prices and time-weighted average prices (TWAP) for LP tokens. The treasury's backing per token—calculated as Treasury Value / Circulating Supply—is a critical metric for the system's health and is used by the policy contract to adjust the reward rate.

A basic policy contract logic in Solidity might control the minting schedule. It could check if the backingPerToken is above a certain threshold (e.g., 1.1 DAI) and, if conditions are met, calculate the reward for the epoch and instruct the treasury to mint to the staking contract. An example function snippet:

solidity
function mintRewards() external onlyPolicy {
    uint256 reward = (treasury.baseSupply() * rewardRate) / 1e18;
    treasury.mint(address(stakingContract), reward);
    stakingContract.rebase(reward);
}

This policy should be upgradeable via governance to allow for parameter adjustments like the reward rate, bonding discounts, and vesting periods in response to market conditions.

Finally, successful deployment requires extensive testing and parameter tuning. Use a forked mainnet environment (e.g., with Foundry's cheatcodes) to simulate bonding and staking behavior under different market scenarios. Key parameters to calibrate include the bond discount, vesting period, reward rate decay, and minimum treasury backing ratios. Poorly set parameters can lead to hyperinflation if minting outpaces treasury growth, or stagnation if rewards are too low. Monitoring tools for the risk-free value (RFV) of the treasury and the staking participation ratio are essential for long-term management, often built using subgraphs or custom dashboards.

key-concepts
IMPLEMENTATION GUIDE

Key System Components

A seigniorage share model requires several core components to function. This guide covers the essential smart contracts, oracles, and mechanisms you need to deploy.

expansion-phase-logic
SEIGNIORAGE SHARE MODEL

Implementing the Expansion Phase

The expansion phase is the core mechanism of a seigniorage share model, where new protocol tokens are minted to maintain a target peg. This guide covers the algorithmic logic and smart contract implementation.

The expansion phase is triggered when the market price of the protocol's stablecoin (e.g., USDs) exceeds its target peg (e.g., $1.01). This signals excess demand, and the protocol responds by algorithmically minting new stablecoins. The newly minted tokens are not distributed arbitrarily; they are used to purchase the protocol's share token (e.g., SHARE) from a liquidity pool, creating buy pressure. This process simultaneously increases the stablecoin supply to lower its price toward the peg and rewards SHARE stakers when the purchased tokens are distributed as protocol revenue.

Implementing this requires an oracle for reliable price feeds and a bonding curve mechanism. A common pattern uses a time-weighted average price (TWAP) from a DEX like Uniswap V3 to determine if the expansionThreshold is breached. The contract must calculate the mintable amount, often as a percentage of the outstanding supply or based on the degree of premium. For example:

solidity
if (currentPrice > targetPrice * (100 + expansionThreshold) / 100) {
    uint256 expansionAmount = (totalSupply * (currentPrice - targetPrice)) / targetPrice;
    _mint(address(this), expansionAmount);
}

This logic ensures the mint is proportional to the deviation from the peg.

The minted stablecoins are then used in a bonding sale. The contract swaps the new USDs for SHARE tokens via the protocol's designated liquidity pool (e.g., a Uniswap V2 pair). This swap accrues the SHARE tokens to the protocol's treasury contract. Critical considerations include limiting slippage via a maximum price impact parameter and ensuring the swap does not destabilize the SHARE pool itself. The contract must also handle the transfer of LP tokens if the protocol owns the liquidity pool.

Finally, the purchased SHARE represents protocol equity. These tokens are typically distributed to stakers in the boardroom contract over an epoch (e.g., 8 hours). This distribution incentivizes long-term staking and aligns stakeholder interests. The implementation must track staker balances and epoch timestamps to calculate fair pro-rata rewards. Security is paramount; functions triggering expansion should be permissioned, often via a timelock-controlled governance contract, to prevent malicious minting events.

bond-contraction-phase
SEIGNIORAGE SHARE MODEL

Building the Bond Mechanism for Contraction

Implementing a bond mechanism is a core component of a seigniorage share model, enabling protocol-controlled value accumulation during contractionary phases.

In a seigniorage share model like Olympus DAO pioneered, a bond mechanism is the primary tool for protocol-owned liquidity (POL) and treasury growth during a contraction. When the protocol's native token (e.g., OHM) trades below its backing value or a target price, the system enters a contractionary policy. Instead of selling tokens on the open market, the protocol offers bonds—discounted future claims on its token—in exchange for valuable assets like liquidity provider (LP) tokens or stablecoins from users.

The bond sale process is an over-the-counter (OTC) deal between the user and the protocol's treasury. A user deposits an asset, such as DAI/USDC LP tokens from a Uniswap v3 pool, and receives a claim to a fixed amount of the protocol's token, vesting linearly over a set period (e.g., 5 days). The bond discount is calculated based on how far below the target price the token is trading, creating an arbitrage opportunity that incentivizes users to help re-peg the token while the treasury accumulates assets.

From a smart contract perspective, the bond mechanism typically involves a BondDepository contract. This contract manages multiple bond terms (like discount, vesting period) for different bond markets (e.g., DAI, ETH, LP tokens). When a user bonds, the contract mints a bond NFT or records a claim in a ledger, and the deposited assets are sent to the treasury. A vesting scheduler, often using a linear vesting formula, allows the user to redeem (claim()) their tokens progressively.

Here is a simplified code snippet illustrating the core bonding logic in a contract:

solidity
function deposit(
    uint256 _amount,
    uint256 _maxPrice,
    address _depositor
) external returns (uint256 payout_) {
    // Calculate the bond payout based on current bond price & discount
    uint256 price = bondPrice();
    require(price <= _maxPrice, "Slippage limit exceeded");
    payout_ = _amount / price;

    // Store vesting info for the depositor
    bondInfo[_depositor].payout += payout_;
    bondInfo[_depositor].vestingEnd = block.timestamp + vestingTerm;

    // Transfer deposited tokens to treasury
    IERC20(quoteToken).transferFrom(msg.sender, treasury, _amount);
}

Key design parameters must be carefully calibrated: the bond discount must be attractive enough to drive demand but not so high it excessively dilutes token holders; the vesting period must balance immediate sell pressure with user lock-in; and the bond capacity must be managed to prevent treasury risk. Successful implementation turns market sell-offs into opportunities for the protocol to buy its own liquidity at a discount, strengthening its balance sheet for future expansion.

staking-rewards-distribution
STAKING AND REWARD DISTRIBUTION

Setting Up a Seigniorage Share Model

A technical guide to implementing a seigniorage share model for algorithmic stablecoins, focusing on staking mechanics and reward distribution logic.

A seigniorage share model is a core mechanism for algorithmic stablecoins like Empty Set Dollar (ESD) and Dynamic Set Dollar (DSD). It uses a two-token system: a stablecoin (e.g., ESD) and a governance/share token (e.g., ESDS). The model aims to maintain the peg by expanding the stablecoin supply when its price is above $1 and contracting it when below. Share token holders stake their tokens to receive newly minted stablecoins as rewards during expansionary periods, absorbing the inflation. This creates a direct incentive alignment where stakers profit from successful peg maintenance.

The primary smart contract functions involve a staking mechanism and an epoch-based reward distribution. Users call a stake(uint256 amount) function to lock their share tokens, receiving a receipt token (like sESDS) representing their stake. A new epoch begins when the stablecoin's time-weighted average price (TWAP) is above a target (e.g., 1.01) for a required duration. The contract then calculates the expansion amount—often a percentage of the total stablecoin supply—and mints new stablecoins. These are distributed pro-rata to all stakers based on their share of the total staked pool.

Here is a simplified Solidity snippet illustrating the core staking and reward logic. The contract tracks total staked shares and individual balances to calculate rewards.

solidity
// Simplified staking and reward distribution
mapping(address => uint256) public stakedShares;
uint256 public totalStaked;

function stake(uint256 shareAmount) external {
    // Transfer share tokens from user
    shareToken.transferFrom(msg.sender, address(this), shareAmount);
    stakedShares[msg.sender] += shareAmount;
    totalStaked += shareAmount;
}

function distributeExpansionRewards(uint256 expansionAmount) external onlyDao {
    require(totalStaked > 0, "No stakers");
    // Mint new stablecoins
    stablecoin.mint(address(this), expansionAmount);
    // Distribute to stakers pro-rata
    for (uint i = 0; i < stakers.length; i++) {
        address staker = stakers[i];
        uint256 reward = (expansionAmount * stakedShares[staker]) / totalStaked;
        stablecoin.transfer(staker, reward);
    }
}

During contractionary phases (when price is below peg), the system creates bonds or incentivizes stablecoin holders to burn their tokens in exchange for future share tokens at a discount. This reduces the stablecoin supply. Stakers are not penalized directly, but the value of their reward stream depends on the system's ability to return to and maintain the peg. A critical design consideration is the rebase lag, which limits the expansion/contraction per epoch to prevent extreme supply shocks. Protocols typically set this between 1% and 3% of the total supply.

Key risks in implementation include oracle reliability for the TWAP price feed, governance attacks on reward parameters, and staking liquidity traps. If too many share tokens are staked, the rewards per staker become diluted. Conversely, if too few are staked, the system cannot effectively absorb expansion. Successful models often include vesting schedules for rewards or multi-epoch commitment periods for stakers to promote long-term alignment. Always audit the minting permissions and reward distribution math to prevent inflation exploits.

To deploy a seigniorage share system, start with a fork of a proven codebase like ESD V2 or DSD. Thoroughly test the epoch triggers, reward distribution, and bond mechanisms using a framework like Foundry. Parameter tuning—such as the peg threshold, expansion rate, and rebase lag—is crucial and often requires simulation. The model's success hinges on sustainable incentives, making staker behavior the primary variable in maintaining stability.

PROTOCOL DESIGN

Seigniorage Share vs. Collateral-Backed Models

A comparison of two fundamental approaches to designing algorithmic stablecoins, highlighting their core mechanisms, capital efficiency, and risk profiles.

FeatureSeigniorage Share ModelCollateral-Backed Model

Primary Stabilization Mechanism

Algorithmic supply expansion/contraction

Overcollateralized asset backing

Capital Efficiency

High (no direct asset backing required)

Low (requires 100-200%+ collateralization)

Primary Risk Vector

Death spiral (loss of peg confidence)

Collateral volatility/liquidation cascades

Example Protocols

Basis Cash (BAC), Empty Set Dollar (ESD)

MakerDAO (DAI), Liquity (LUSD)

Treasury/Reserve Backing

Protocol-owned treasury (often volatile assets)

User-deposited collateral (ETH, wBTC, etc.)

Peg Maintenance Cost

Bond/Share dilution during contraction

Liquidation penalties and stability fees

Typical APY for Stakers

20-100%+ (highly variable, often inflationary)

1-10% (from stability fees, more consistent)

Governance Token Utility

Seigniorage rights, protocol control

Stability fee voting, system parameter control

SEIGNIORAGE SHARE MODEL

Common Implementation Pitfalls and Security

Implementing a seigniorage share model for a stablecoin involves complex economic and technical logic. This guide addresses frequent developer errors and security vulnerabilities.

A common pitfall is performing a rebase (supply adjustment) in a loop over all token holders, which can exceed the block gas limit and revert. This is a classic denial-of-service vector.

Solution: Use a snapshotting mechanism. Instead of iterating live balances, capture a snapshot of user balances and a global multiplier at the last rebase. Calculate a user's current balance as balance = snapshotBalance * currentMultiplier / snapshotMultiplier.

Example (Problematic):

solidity
for(uint i; i < holders.length; i++) {
    balances[holders[i]] = balances[holders[i]] * newMultiplier;
}

Example (Secure - Using Snapshot):

solidity
// On rebase, update only the global multiplier
globalMultiplier = globalMultiplier * expansionRate;
// User balance is calculated view-function
function balanceOf(address user) public view returns (uint256) {
    return userSnapshot[user].balance * globalMultiplier / userSnapshot[user].multiplier;
}

Protocols like Olympus DAO (OHM) historically used similar mechanics to avoid gas-intensive rebases.

parameter-tuning
PARAMETER TUNING AND ECONOMIC DESIGN

Setting Up a Seigniorage Share Model

A guide to implementing and calibrating a seigniorage share model for algorithmic stablecoins, focusing on core mechanisms and parameter selection.

A seigniorage share model is a monetary framework for algorithmic stablecoins that uses two tokens: a stable asset (e.g., a USD-pegged coin) and a governance/equity token. The system expands the stablecoin supply when its price is above the peg, minting new stablecoins and distributing a portion of the seigniorage (profit) to governance token stakers. When the price is below the peg, it contracts supply by selling governance tokens for stablecoins and burning them. This creates a direct economic incentive for token holders to maintain the peg. The original model was pioneered by projects like Empty Set Dollar (ESD) and later refined by Fei Protocol.

The core smart contract logic involves a bonding curve or direct incentive mechanism. During expansion, the protocol mints new stablecoins. A percentage (e.g., 10-30%) is sent to a decentralized exchange (DEX) pool to buy the governance token, distributing it to stakers. The remainder is sold on the same DEX for the governance token, which is then burned, creating buy pressure. During contraction, the protocol mints new governance tokens, sells them on the DEX for stablecoins, and burns those stablecoins to reduce supply. This cycle is governed by an oracle providing the stablecoin's market price.

Key parameters require careful tuning for stability. The expansion/contraction threshold defines the deviation from peg (e.g., $1.01 or $0.99) that triggers an epoch. The expansion reward ratio determines what percentage of new stablecoins go to stakers versus being used for buybacks. The contraction bond discount incentivizes users to bond their stablecoins for future governance tokens during contractions. The epoch length (e.g., 8 hours) controls how often the rebase occurs. Poorly set parameters can lead to hyperinflation of the governance token or bank runs during extended periods below peg.

Implementing the core cycle in a smart contract involves a periodic rebase function. Below is a simplified Solidity snippet illustrating the expansion logic, assuming an oracle price and a treasury contract.

solidity
function rebase() external {
    require(block.timestamp >= lastRebase + EPOCH_LENGTH, "Epoch not elapsed");
    uint256 currentPrice = oracle.getPrice();
    
    if (currentPrice > EXPANSION_THRESHOLD) {
        // Calculate expansion amount based on deviation
        uint256 expansionAmount = calculateExpansion(currentPrice);
        stablecoin.mint(address(this), expansionAmount);
        
        // Send reward portion to stakers via DEX buy
        uint256 rewardAmount = (expansionAmount * REWARD_RATIO) / 100;
        buyGovernanceTokenForStakers(rewardAmount);
        
        // Use remainder to buy and burn governance token
        uint256 buybackAmount = expansionAmount - rewardAmount;
        buyAndBurnGovernanceToken(buybackAmount);
    }
    // Contraction logic would follow...
    lastRebase = block.timestamp;
}

Economic design must account for reflexivity and speculative attacks. If the governance token's value is derived solely from future seigniorage, its price can become volatile, destabilizing the contraction mechanism. Incorporating protocol-owned liquidity (like Fei's PCV) or integrating real-world yield can provide a more stable backing. Simulations using tools like CadCAD or agent-based modeling are essential before mainnet deployment to test parameter sets under various market conditions, including sustained bear markets and coordinated sell pressure.

Successful implementation requires continuous monitoring and decentralized parameter governance. After launch, control over thresholds, ratios, and epoch length should be gradually ceded to a DAO of governance token holders. This allows the system to adapt to changing market dynamics. However, governance must be carefully designed to avoid vote buying or short-termism that could compromise long-term stability. The ultimate goal is a system where rational economic incentives for participants naturally correct deviations from the target peg.

SEIGNIORAGE SHARE MODELS

Frequently Asked Questions

Common technical questions and troubleshooting for developers implementing algorithmic stablecoin mechanisms.

A seigniorage share model is a rebasing algorithmic stablecoin design where the token supply expands and contracts to maintain a target price peg, typically $1. The system uses two tokens: a stablecoin (e.g., ESD, BAC) and a share token (e.g., ESDS, BAS).

When the stablecoin trades above peg, the protocol mints new stablecoins. A portion is distributed to share token holders who have staked their tokens in a bonding contract, incentivizing participation. When the stablecoin trades below peg, the protocol creates debt coupons (or bonds) that users can purchase at a discount. These coupons can be redeemed for stablecoins at face value once the price recovers, effectively burning supply to restore the peg. The system relies on game-theoretic incentives rather than collateral.