Oscillon

Uniswap v4 hook for stable LP inventory: tax dumps vs last $1 print, cap size if no price

ETHOnline 2026Shipped September 4, 2026#defi#payments#health
Visit Repo
Oscillon banner

About

Oscillon is a Uniswap v4 hook and testnet UI for stable–stable pools (USDe/USDT-class).The LP problem: when one stable trades cheap vs $1, vanilla 3 bps pools absorb the weak asset. LPs see it on withdraw. Static fees give that spread to arbs.The hook’s rule (as of the Sep 13 policy):If Chainlink has a usable print (age ≤ 24h heartbeat + 1h buffer), depeg is that print vs $1. Drain (weak coin in) can pay more than 3 bps. Restore stays at base fee. Heartbeat silence is not a depeg. A last print still ~$1 is treated as $1. If there is no usable Chainlink (past heartbeat, floor, revert), we do not use pool TWAP as $1 and we do not charge max fee. Base fee + size cap.

What we learned building it: push Chainlink stables usually update at ~50 bps or ~24h. Our backtest’s 3–20 bps USDe band almost never produces a new print, so a per-swap fee in that band cannot run on this feed. That is an infrastructure limit, not a missed if-statement. StablePair prices pool mid vs a reference for the same reason — that input exists every swap.The project is an experiment plus a path to an LP Health view (what a $10k position actually holds). It is not a claim that Oscillon beats official USDC/USDT StablePair or that LPs earn extra yield on quiet 8 bps tape.Testnet UI + Sepolia hook. Tests: 42/42 including 128k-call invariants.

website: https://beta-testnet.oscillon.xyz/swap

How it's made

Uniswap v4 hook (beforeSwap / afterSwap) on Sepolia. Solidity: OscillonHook, ChainlinkOracleAdapter (AggregatorV3 + heartbeat-aligned MAX_ORACLE_AGE), OscillonPriceEngine, OscillonFeePolicy (base 3 bps + drain surcharge), OscillonTwapOracle (pre-swap tick write so a swap cannot paint its own window). TWAP is not used as USD when Chainlink is down.Frontend: Next.js swap UI (wallet, quote, depeg/fee readout). Foundry tests + fuzz/invariants (128k calls). Chainlink-compatible feeds on testnet (RedStone-shaped aggregators where we needed them).Hacky / notable: first version treated 1h silence as stale and could max-fee a quiet book. We replaced that with heartbeat-aligned trust and “blind → cap, not max fee.” A 20 bps Chainlink-vs-TWAP disagreement guard still lives; a large fresh print while the pool is still at $1 can be zeroed — documented, not hidden.Partner tech: Uniswap v4, Chainlink-style feeds. No Data Streams in this submission (pull+verify is a different product than a 3 bps stable swap).

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

OniBlock

Uniswap v4 hook where an AI prices toxic arbitrage every block, and loses power if it's wrong.

ClosingBell-Hook

Uniswap v4 hook that prices tokenized-stock swap fees off the market calendar and chainlink feed