DepegShield
Risk-responsive fees for stablecoin pools, across every chain
The Problem
Flat fees fail when it matters most
Stablecoin pools charge the same 1bp fee whether the pool is balanced or in a death spiral. LPs absorb millions in toxic flow for pennies. No directional awareness means zero incentive to rebalance.
Same fee at 50/50 and 90/10
Pool goes from balanced to death spiral. Fee stays at 1bp the whole way down.
No directional signal
Panic selling and recovery rebalancing cost the same. Nothing encourages arbitrageurs to help.
The Bigger Problem
Depegs don't stay on one chain
When a stablecoin depegs on one chain, the same token trades on dozens of others. Arbitrageurs exploit the lag, draining stablecoin pool LP value on other chains before local pools show stress. Per-chain hooks are blind to this.
Contagion lag
Minutes between depeg on one chain and arbitrageurs draining others. By the time local pools react, the damage is done.
Invisible to local hooks
Per-chain hooks only see their own pool state. A crisis on Ethereum is invisible to the same pool on Arbitrum or Base.
The Solution
Directional fees that adapt in real time
DepegShield makes stablecoin pool fees responsive to risk. Fees escalate for panic sellers and drop to zero for rebalancers. Watch the same pool scenario with the hook active.
Measure Imbalance
Compute the ratio from sqrtPriceX96 and liquidity. Classify into Stable, Drift, Stress, Crisis, or Emergency zone.
Directional Fees
Worsening swaps pay escalating fees via a 5-zone curve. Rebalancing swaps pay zero.
Protect LPs
Panic sellers pay proportionally more. Rebalancers pay nothing. LPs earn 18-4,000x+ more.
Cross-Chain Shield
One depeg detected. Every chain protected.
ReactiveMonitor watches pools across all chains. When imbalance crosses threshold anywhere, it fires callbacks to AlertReceivers on every other chain. Local hooks read the signal, apply a fee floor instantly. Rebalancing swaps stay free.
Monitor
Watches pools across all chains via Reactive Network subscriptions.
Detect
Decodes imbalance ratio from swap events in real time.
Relay
Cross-chain callbacks delivered to AlertReceivers on every destination chain.
Shield
Fee floor applied using the same 5-zone curve. Rebalancing stays free.
How It Works
Five zones, one continuous curve
Every swap passes through the hook. The fee curve reads pool state, computes the imbalance ratio, and returns a dynamic fee in a single atomic transaction.
Read pool state
sqrtPriceX96 + liquidityDerive reserves and compute imbalance ratio.
Apply fee curve
FeeCurve.getFee(ratio)5-zone curve returns fee. Rebalancing gets 0bp.
Simulations
Real depeg events, simulated on-chain
Three historical depeg events modeled with forge tests. Comparing LP outcomes under DepegShield vs a standard flat-fee pool.
March 2023
Circle disclosed $3.3B stuck at SVB. USDC dropped to $0.87 (~13% depeg). 3,400 Aave positions liquidated. Peg recovered in 48h after FDIC backstop.
| Wave | Amount | Ratio | Fee | Shield | Flat |
|---|---|---|---|---|---|
| Early sells | 15 | 1.000x → 1.030x | 1bp | 14 | 14 |
| Panic builds | 20 | 1.030x → 1.071x | 50bp | 18 | 19 |
| Peak crisis | 22 | 1.071x → 1.116x | 208bp | 19 | 20 |
| Late sellers | 15 | 1.116x → 1.147x | 287bp | 12 | 13 |
| ↑Recovery | 80 | 1.147x → 1.027x | 0bp | 84 | 84 |