Peg Mechanism

Understanding how spBNB maintains its 1:1 peg to BNB is crucial for evaluating risk and opportunity in SPAI Finance.

Time-Weighted Average Price (TWAP)

The protocol uses TWAP to measure spBNB's price relative to BNB over 6-hour periods called epochs.

Why TWAP?

TWAP provides several advantages over spot price:

  • Manipulation resistance - Single large trades can't trigger protocol actions

  • Smoothed volatility - Temporary spikes don't cause overreactions

  • Predictability - Users know roughly when expansion/contraction will occur

  • Fair distribution - Rewards allocated based on sustained price, not flash pumps

How TWAP is Calculated

1

Every 6 hours (one epoch), the protocol samples spBNB:BNB price at regular intervals.

2

The protocol calculates the average across all samples.

3

This TWAP is used to determine the protocol state.

4

Appropriate actions (expand, contract, or maintain) are executed based on the TWAP.

Example: If spBNB traded at 1.03 BNB for most of an epoch but briefly spiked to 1.10, the TWAP might be 1.04. Protocol responds to 1.04, not 1.10.

The Three Protocol States

Based on TWAP, the protocol operates in one of three states:

1

Above Peg (TWAP > 1.01)

Protocol Action: Expansion

When spBNB is trading above 1.01 BNB:

  • New spBNB tokens are minted

  • SPAI stakers receive the newly minted spBNB

  • Increased supply pushes price back toward peg

  • Expansion rate depends on:

    • How far above peg (1.02 vs 1.10)

    • Treasury backing level

    • AI-optimized parameters

User Impact:

  • SPAI stakers earn rewards (spBNB tokens)

  • spBNB/BNB LPs might experience slight IL if peg corrects

  • Arbitrageurs can profit by selling spBNB above peg

Example:

  • TWAP = 1.04 (4% above peg)

  • Protocol backing = 102%

  • Expansion rate = 0.08% of total supply

  • If 1,000,000 spBNB exist, 800 new spBNB minted

  • Distributed to SPAI stakers proportionally

2

At Peg (0.99 < TWAP < 1.01)

Protocol Action: Maintain

When spBNB trades within the peg range:

  • No new spBNB minted

  • No expansion rewards for stakers

  • Existing LP farms continue distributing SPAI

  • Protocol parameters remain stable

  • AI monitors for optimization opportunities

User Impact:

  • Stakers earn nothing (must wait for expansion)

  • LPs continue earning SPAI from farms

  • Position values remain stable

  • Lowest risk environment for farming

This is the ideal state — peg is healthy, and farmers can harvest yields without worrying about rapid IL or depegging events.

3

Below Peg (TWAP < 0.99)

Protocol Action: Contraction

When spBNB falls below 0.99 BNB:

  • All expansion halts immediately

  • SPAI stakers earn zero rewards

  • PSM activates more aggressively

  • AI may adjust parameters to support peg

  • Protocol focuses on peg restoration

User Impact:

  • Stakers earn nothing until peg recovers

  • LPs still earn SPAI but at higher IL risk

  • spBNB holders might panic sell (exacerbating depeg)

  • Opportunity for contrarian arbitrageurs

Depth of Depeg Matters:

  • 0.95-0.99: Minor, likely recovers quickly

  • 0.85-0.95: Significant, requires attention

  • Below 0.85: Critical, potential death spiral risk

Peg Maintenance Mechanisms

Several forces work to maintain the peg:

1

Arbitrage

The primary mechanism is arbitrage profit incentive.

When spBNB > 1 BNB:

  1. Trader acquires spBNB (minting or buying)

  2. Sells it for >1 BNB

  3. Pockets the difference

  4. Selling pressure pushes price toward 1

When spBNB < 1 BNB:

  1. Trader buys discounted spBNB

  2. Uses it in farms or waits for recovery

  3. Buys more as others panic sell

  4. Buy pressure pushes price toward 1

2

Emission Control

Supply management through minting:

  • Above peg → mint more → supply increases → price decreases

  • Below peg → stop minting → scarcity (relative) → price increases

  • At peg → no change → equilibrium maintained

This automatic supply response helps restore peg without manual intervention.

3

Peg Stability Module

Continuous revenue-generating mechanism:

  • 30% fee on reward claims (in spBNB equivalent)

  • Creates consistent buy pressure

  • Strengthens treasury backing

  • Supports peg during stress periods

4

Liquidity Management

AI-optimized pool depth:

  • Maintains sufficient liquidity for arbitrage

  • Prevents single trades from moving price significantly

  • Allocates capital efficiently between pools

  • Adjusts depths based on volatility

5

Confidence & Expectations

Psychological component:

  • Users believe peg will hold → more willing to provide liquidity

  • Strong TVL → harder to break peg → reinforces confidence

  • Track record matters → successful peg maintenance builds trust

This is why early protocol health is critical—establishing credibility makes future peg maintenance easier.

Peg Stability vs Peg Defense

Understanding the difference:

Peg Stability (Normal Times)

  • Small deviations (0.98-1.02)

  • Arbitrageurs naturally restore peg

  • Low risk, predictable behavior

  • Minimal protocol intervention needed

Peg Defense (Stress Times)

  • Significant deviations (below 0.95 or above 1.10)

  • Requires active management

  • AI adjusts multiple parameters

  • Higher risk, unpredictable outcomes

The goal is to spend 95%+ of time in "peg stability" mode where natural market forces maintain equilibrium.

Historical Patterns

From Tomb Finance and other algorithmic synthetics:

Launch Phase

  • Often trade above peg (1.05-1.15) due to hype

  • High expansion rewards attract capital

  • Eventually corrects toward peg

Stable Growth

  • Peg holds 0.98-1.02 most of time

  • Occasional expansions create yield opportunities

  • TVL grows steadily

Market Stress

  • External events can break peg

  • Below 0.90 requires significant effort to recover

  • Death spiral risk if confidence lost

Key Insight: Peg health during market stress is the real test. Maintaining peg when broader crypto markets crash separates sustainable protocols from failed experiments.

Monitoring Peg Health

Track these indicators:

Primary Metric: TWAP

  • Check every 6 hours (each epoch)

  • 1.01-1.05: Healthy expansion

  • 0.99-1.01: Perfect stability

  • Below 0.99: Warning zone

Secondary Metrics

Liquidity Depth:

  • Deeper pools = harder to break peg

  • Monitor total liquidity in spBNB/BNB

Trading Volume:

  • Higher volume = more arbitrage activity

  • Low volume can allow manipulation

Treasury Backing:

  • Higher backing = more confidence

  • Below 100% raises sustainability questions

SPAI Price:

  • Rising SPAI = protocol confidence

  • Falling SPAI = potential issues ahead

What Breaks Pegs?

1

Market panic — Broader crypto crash creates fear

2

Large sells — Whales or protocols dumping

3

Exploit/hack — Smart contract vulnerability

4

Competing forks — Fragmenting liquidity

5

Emission concerns — Unsustainable tokenomics realized

6

Confidence loss — Death spiral expectations become self-fulfilling

The AI management system aims to detect early warning signs and respond before small deviations become catastrophic breaks.

Best Practices for Users

When Peg is Strong (0.99-1.05):

  • Safe to farm spBNB/BNB pool

  • Consider entering new positions

  • Compound rewards confidently

When Peg is Elevated (1.05-1.10):

  • Expansion rewards attractive but IL risk rising

  • Consider taking profits on spBNB above peg

  • Monitor for correction

When Peg is Weak (0.95-0.99):

  • Reduce position size or exit

  • Avoid new entries

  • Watch for recovery or further decline

When Peg is Broken (<0.95):

  • Exit most/all positions

  • Only contrarian plays appropriate

  • Reassess if/when peg recovers above 0.98


Last updated