Depeg Risks Splitting
Depeg risk splitting is the core mechanism of Tapir Protocol. It allows you to decompose exposure to a pegged asset into two complementary positions — protection and yield — by splitting a base asset into DP and YB tokens.
The split mechanism
When you deposit a base asset (for example, 1 stETH) into an active Tapir pool, the protocol mints two derivative tokens:
1 Base Asset = 0.5 DP + 0.5 YBDP (Depeg Protection): Gains value if the asset depegs.
YB (Yield Bearer): Earns yield if the peg holds.
The split is deterministic and always follows the 1 : 0.5 : 0.5 ratio. There is no slippage or price impact on the split itself.
You can also unsplit at any time during the Active stage — burn equal amounts of DP and YB to reclaim the base asset (minus applicable fees).
Conservation of value
Tapir enforces a fundamental invariant:
dpValue+ybValue=200%\text{dpValue} + \text{ybValue} = 200\%dpValue+ybValue=200%
This means the combined redemption value of one DP token and one YB token always equals two base tokens (the original deposit). No value is created or destroyed — it is only redistributed between the two sides based on whether a depeg occurred.
This conservation property guarantees pool solvency under all outcomes.
Pool lifecycle
Each pool progresses through four stages in sequence:
1. Active
During the Active stage, you can:
Split base assets into DP + YB tokens.
Unsplit (burn DP + YB) to reclaim base assets.
Trade DP and YB on the AMM.
Provide liquidity to the DP/YB trading pool.
The pool's oracle tracks the asset price throughout this stage.
2. Cooldown
When the Active stage ends, the pool enters Cooldown:
Trading and splitting are disabled.
The oracle submits final price data: a High Watermark (HWM) price and a Closing Price.
This waiting period prevents last-minute price manipulation.
3. Resolution
After the Cooldown period elapses and price data has been submitted, anyone can trigger resolution:
The smart contract compares the HWM and Closing Price to determine if a depeg occurred.
DP and YB redemption values are calculated and locked on-chain.
4. Redemptions
Once resolved, you can redeem your DP and YB tokens for the base asset at the values determined during resolution.
Depeg detection
The oracle determines whether a depeg occurred by comparing two reference prices:
High Watermark (HWM): The highest robustly sustained price during the observation period. Calculated as
max(min(triplet))over consecutive daily price observations — this filters out short-term spikes and captures a price the asset genuinely held for at least three days.Closing Price: The median of the five most recent daily price observations before pool termination. This smooths out end-of-period volatility.
A depeg is detected when the Closing Price drops more than 0.1% below the HWM:

The 0.1% minimum threshold prevents rounding errors or negligible fluctuations from triggering a depeg event.
Worked example: no depeg
For a yield-bearing asset with monotonically increasing price:
1
1.00
2
1.01
3
1.02
...
...
10
1.09
HWM =
max(min(triplet))= 1.07 (from triplet 1.07, 1.08, 1.09)Closing Price = median of last 5 = 1.07
Since Closing Price >= HWM, no depeg is detected.
Worked example: depeg detected
-10
4.00
-9
4.00
-8
5.00
-7
5.00
-6
6.00
-5
6.00
-4
6.00
-3
7.00
-2
10.00
-1
1.00
HWM =
max(min(triplet))across all triplets. The triplet (5, 6, 6) yields min = 5; (6, 6, 6) yields min = 6; (6, 6, 7) yields min = 6; (6, 7, 10) yields min = 6 — so HWM = 6.Closing Price = median of last 5 prices [6, 6, 7, 10, 1] = sorted [1, 6, 6, 7, 10] = 6.
In this case Closing Price = HWM, so no depeg is triggered despite the day -1 crash — the median smoothing absorbs the short-term spike.
Depeg outcome scenarios
Once a depeg is detected, the protocol calculates the depeg size as the percentage drop from HWM to Closing Price. This determines how value is redistributed between DP and YB.
Scenario 1: No depeg
Condition: Price drop < 0.1% (or Closing Price >= HWM).
DP
100% (10,000 bp)
1 DP = 1 base
YB
100% (10,000 bp)
1 YB = 1 base
Both tokens redeem at par. If you split 1 stETH into 0.5 DP + 0.5 YB, you get back exactly 1 stETH (minus fees).
Scenario 2: Small depeg (5%)
Condition: Closing Price = 95% of HWM.

DP
105.26%
105.26 base
YB
94.74%
94.74 base
DP holders gain 5.26% and YB holders lose 5.26%.
Scenario 3: Medium depeg (20%)
Condition: Closing Price = 80% of HWM.

DP
125%
125 base
YB
75%
75 base
Scenario 4: Severe depeg (50%+)
Condition: Closing Price <= 50% of HWM.

DP
200% (capped)
200 base
YB
0% (worthless)
0 base
DP reaches its maximum value of 2x. YB becomes worthless. The 200% cap ensures the pool always remains solvent.
Fee structure
Tapir pools apply two types of fees:
Success fee
Applied only when the base asset has appreciated since pool creation (
currentPrice > startingPrice).Charged on the profit portion only, not the principal.
Rate: 0–15% (configurable per pool).
Formula:
successFee = (profit × successFeeBp) / 10,000
Redemption fee
Applied on every unsplit or redeem transaction.
Charged on the base amount after the success fee.
Rate: 0–255 basis points (configurable per pool).
Formula:
redemptionFee = (amountAfterSuccessFee × redemptionFeeBp) / 10,000
All fees accumulate in the pool contract and are swept to the protocol treasury.
What's next?
DP (Depeg Protection) — Deep dive into the protection token and how it gains value during depeg events.
YB (Yield Bearer) — Deep dive into the yield token and its risk profile.
Last updated