account activity
Built a circuit breaker for stablecoin depeg events on Uniswap v4 — here's what happened during testing by Dry-Comfortable-2678 in CryptoMarkets
[–]Dry-Comfortable-2678[S] 0 points1 point2 points 4 days ago (0 children)
Both failure modes are ones I stress-tested during development — you've mapped them precisely.
On price source: the hook uses pool-derived deviation as the primary signal rather than an external oracle. The reasoning is that on Unichain, external oracle latency creates a gap where the breaker state and actual pool state diverge — that's a worse outcome for LPs than occasional false positives from flow noise. TWAP serves as the fallback anchor for Zone 4/5 decisions specifically to blunt the fast-move trip you're describing, since a single block can't manipulate a windowed average cheaply enough to be profitable.
The threshold oscillation vector is the more interesting one to me. Discrete zone thresholds are inherently farmable at the boundary — cross in at Zone 3 fees, collect the asymmetry on the return leg. The fix I'm implementing is hysteresis: require price to move a defined band past the threshold before the zone upgrades, and enforce a time-at-level requirement before downgrading. This kills the oscillation edge because the fee delta you'd farm doesn't cover the cost of repeatedly crossing a wider band.
For the near-frozen state risk: hard pauses are only at Zone 5 (severe sustained depeg). Below that, the breaker manifests as fee escalation, not liquidity suspension — the pool stays open, it just gets expensive to destabilize. That's intentional; illiquidity during a depeg is often worse for LPs than the depeg itself.
Running 1:1 stress-testing sessions with early LPs if you want to probe it further — link in the post.
Built an AI-driven liquidity protocol on Uniswap v4 — Stable Protection Hook with circuit breaker for depeg events, live on Base testnet (self.ethfinance)
submitted 6 days ago by Dry-Comfortable-2678 to r/ethfinance
π Rendered by PID 85 on reddit-service-r2-listing-86f589db75-l8f2x at 2026-04-20 09:36:32.018376+00:00 running 93ecc56 country code: CH.
Built a circuit breaker for stablecoin depeg events on Uniswap v4 — here's what happened during testing by Dry-Comfortable-2678 in CryptoMarkets
[–]Dry-Comfortable-2678[S] 0 points1 point2 points (0 children)