We built every OniSwap withdrawal to skip the pool's hook, its price feed and every admin key.
An LP who followed a curator into a hooked JTO pool can take their share and the fees it earned out of the pool at any moment, on the same path a plain pool uses. The money goes from the pool's reserves to their wallet, and nothing the pool was set up with sits in between.
How deposits and withdrawals work
oniswap.app/docs
2
146
That curator hook makes running a pool a paid job. Someone who already knows which JTO pool their group should be in can open it on OniSwap at 15/16 for 0.05 SOL, pick the curator hook, and collect 5% of the fees on every swap it takes for as long as the pool lives. The LPs who follow them in keep 85%.
The curve, the feed and the fees stay exactly as the curator pressed them in on the first day, so everyone they bring in deposits on terms that stay fixed for the life of the pool.
The curators
oniswap.app/app#curators
Any program on Solana can now set the fee on an OniSwap pool's swaps, and running it adds about 2,000 compute units to the trade. We deployed a launch fee hook and a backrun premium hook to mainnet ourselves, and the curator hook pays the person who runs a pool.
Whoever builds a hook earns 5% of the fees it brings in, from the first swap, on every pool that picks it. The program keeps each hook to its own account and holds its fee under the pool's cap, so LPs deposit into a hooked pool on the same terms as any other.
The curator kit
oniswap.app/curator.mjs
1
6
284
The price update that keeps that pool on the market is lighter still. A keeper post on OniSwap runs on 3,198 compute units, about a fifteenth of the swap above.
It carries one signer and writes one account, so a pool that reprices off a live feed, the kind only closed market-maker desks run on Solana today, stays on price for less compute than a single trade against it. Anyone with a wallet can be the one keeping it there.
The keeper, one zero-dependency file
oniswap.app/keeper.mjs
We cut the cost of a swap on OniSwap's 3/4 curve from 80,093 compute units to 48,643, about 40% less, while it still reads the pool's own live feed and checks it against Pyth on every trade. Compute is what Solana meters every transaction by, and a router that strings several pools into one route has a fixed amount to spend, so Jupiter or any wallet can now fit our pools into routes that had no room for them before.
4
11
384
We then ran that attack against our deepest curve. On a $1,000,000 pool at 15/16, with the keeper's price held within 25 bp of Pyth, the most a lying keeper actually got out landed within 0.4% of the ceiling our math puts on it.
That makes the bound the measured worst case, so an LP on our deepest curve knows to the dollar what the price keeper could ever cost them before they put money in.
The whitepaper
oniswap.app/whitepaper
We put a hard number on the worst a lying keeper can do to an OniSwap pool. On a $1,000,000 pool it is $13.78, taken once, and 200,000 random attacks against the program never got past it.
The program checks every keeper price against Pyth's own feed and makes the pool's fee at least as wide as that band, so each trade a keeper rigs inside the band costs the keeper more than it brings in. That is what lets anyone keep the price for a public pool while LPs leave their money in it.
The whitepaper
oniswap.app/whitepaper
1
10
344
We tracked the best SOL quote on Solana minute by minute across every venue. Orca, Raydium and Meteora had it 0 times out of 120. All four venues that did win trade only their owners' money, in pools that reprice before any trade arrives.
OniSwap pools reprice the same way, off a live feed, and anyone can deposit into one. An LP on OniSwap quotes like the desks that take that SOL flow today and keeps 85% of the fees.
Open a pool
oniswap.app/app
That pool held $1,000,000. We then went looking for the smallest OniSwap pool that still beats Jupiter's best JTO route at every size from $1k to $50k. On our 15/16 curve it is $180,000. On 7/8 it is $360,000, and on 3/4 it is $710,000.
The 15/16 curve keeps an LP's money packed around the live JTO price, so under a fifth of the capital takes the same trades from Jupiter's route and collects their fees.
Open a pool at 15/16
oniswap.app/app
We raced a $1M OniSwap JTO/USDC pool against Jupiter's best route on Solana, and our pool gave the trader the better price at every trade size we sent it.
Jupiter searches every public JTO pool for each quote. A single OniSwap pool beat that search across the board because it reprices from the live JTO feed instead of waiting for a trade to move it, which leaves its depth sitting right at the market price where the orders land.
Our app sends each swap to whichever pays more, an OniSwap pool or Jupiter, so a pool like this takes the trade every time it wins, and its LPs collect the fee.
Open a JTO/USDC pool
oniswap.app/app#create
We replayed a week of real SOL trading through a $1M OniSwap pool, and bots took 91% less out of it than out of an ordinary pool facing the same trades. On the ordinary pool, arbitrage cost the LPs $5,330. On OniSwap the bots got $504, because the pool repriced from the live SOL feed before any of them could trade against an old price.
The LPs kept about $4,075 more that week on the same money.
Open a pool
oniswap.app/app
We ran 614k random swaps through OniSwap's two deepest curves, 7/8 and 15/16, and measured the pool's curve after every one of them. The furthest its invariant ever moved was 0.0000000000000009.
Those two curves are where an LP's money sits closest to the live market price, so they win the most trades for the capital in them. Every one of those trades leaves the reserves exactly where the curve says they should be, down to the sixteenth decimal place.
How the curves price a swap
oniswap.app/docs
12
334
$ONI started burning on November 24. Every day, half of what OniSwap takes from swap fees goes into the open market for ONI, and every token it buys is destroyed.
Before we switched it on, we ran the burn against mainnet in simulation, and a single transaction bought at least 70,547 ONI to burn. That same run now goes out daily, paid for by the trading on our pools, so each swap anyone makes on OniSwap feeds the next one.
The token
solscan.io/account/FSfZuwaRF…
Any program on Solana can now set the fee on an OniSwap pool's swaps, and running it adds about 2,000 compute units to the trade. We deployed a launch fee hook and a backrun premium hook to mainnet ourselves, and the curator hook pays the person who runs a pool.
Whoever builds a hook earns 5% of the fees it brings in, from the first swap, on every pool that picks it. The program keeps each hook to its own account and holds its fee under the pool's cap, so LPs deposit into a hooked pool on the same terms as any other.
The curator kit
oniswap.app/curator.mjs
We put a hard number on the worst a lying keeper can do to an OniSwap pool. On a $1,000,000 pool it is $13.78, taken once, and 200,000 random attacks against the program never got past it.
The program checks every keeper price against Pyth's own feed and makes the pool's fee at least as wide as that band, so each trade a keeper rigs inside the band costs the keeper more than it brings in. That is what lets anyone keep the price for a public pool while LPs leave their money in it.
The whitepaper
oniswap.app/whitepaper
We replayed a full day of real JTO trading through an OniSwap pool with this fee switched on, bots paying 1% and wallet and aggregator swaps paying 0.1%. The pool gave its LPs 1.7x the return, and every trader who came through Jupiter or a wallet got a price 7.1 bp better.
The pool charges the flow that costs its LPs money and passes the difference on to people. Whoever opens the pool picks both fees once, and the program reads each swap's transaction to know which one applies.
Open a pool with a bot fee
oniswap.app/app#create
OniSwap now lets every new pool charge bots more than people.
We went through 26 hours of every swap in Orca's JTO/SOL pool. Arbitrage bots trading from their own programs sent 86% of the volume and were the only flow that cost its LPs money, while every route through Jupiter, OKX, Titan and DFlow left them ahead. The pool took in $267 of fees that day and its LPs finished about even.
From today, whoever opens an OniSwap pool sets a second fee just for bots, 1% unless they choose another. Swaps from a wallet or an aggregator pay the normal fee, and the OniSwap program reads from the transaction itself which ones came from a bot. We replayed that JTO day through an OniSwap pool of $147,000 with bots paying 1%, and its LPs gained 4.3 times as much.
oniswap.app/app
solana:FSfZuwaRFVcTtVBsiJ45NYK7Mwi3ANRcVT8kpbevtPGj has offered Solana pools that move with the market since November 18. Curve just saw what that does on Ethereum, where Yield Basis pools traded more once they started pricing this way.
Each OniSwap pool reprices through a keeper anyone can run and trades only while Pyth agrees with that price. Any wallet that wants its fees can add liquidity.
oniswap.app/app#feeds
Utilization of tBTC pools went up as a side-effect of @yieldbasis pools doing more volumes after being propAMMified
5
9
553
OniSwap's bot fee caught every bot swap we ran it against. We put the rule over two real Orca pools, and it classed 0 SOL of bot volume as routed, so none of the bots' trading got through at the price meant for wallets and aggregators.
The program reads each swap's own transaction to see who sent it. A wallet, Jupiter, Titan, DFlow or OKX pays the pool's base fee. Any other program pays the route fee the pool's creator set, and the LPs collect it. Telling them apart costs the swap about 500 compute units.
Open a pool with a fee for bots
oniswap.app/app#create
3
8
431
We raced a $1M OniSwap JTO/USDC pool against Jupiter's best route on Solana, and our pool gave the trader the better price at every trade size we sent it.
Jupiter searches every public JTO pool for each quote. A single OniSwap pool beat that search across the board because it reprices from the live JTO feed instead of waiting for a trade to move it, which leaves its depth sitting right at the market price where the orders land.
Our app sends each swap to whichever pays more, an OniSwap pool or Jupiter, so a pool like this takes the trade every time it wins, and its LPs collect the fee.
Open a JTO/USDC pool
oniswap.app/app#create
We kept an OniSwap price feed live through a volatile week for 0.021 SOL. Its keeper posted the market price 4,121 times, and every pool reading that feed repriced with each post without a single trade having to move it.
One post reprices every pool on the feed, so four pools cost what one does, and several feeds fit into the same transaction. That puts a pool that moves with the market, the thing that keeps bots off its LPs, at about $1.45 a day. Anyone can run a keeper for their own market.
The price feeds
oniswap.app/app#feeds
6
236
We opened OniSwap accounts on Solana mainnet, then closed every one of them and got the rent back. Our recover script found 0 accounts left behind. Every account the program creates can be closed, and deposit, withdraw, claims and close never read the price feed or call a hook, so whatever an LP puts into an OniSwap pool, down to the SOL that opened its accounts, comes back to the LP's wallet on the way out.
The whitepaper
oniswap.app/whitepaper
1
5
339
We set an OniSwap pool's fee to zero and threw 3,000 swaps at the engine, looking for a buy and sell back that leaves the trader with more than they started with. Not one round trip came out ahead. Every rounding step in the program goes the pool's way, so each unit a trader takes out of an OniSwap pool is a unit they paid for, and everything the pool charges on top lands with its LPs.
The whitepaper
oniswap.app/whitepaper
7
245
We got a $250,000 OniSwap pool to earn what a $1,000,000 pool earns.
On our 15/16 curve, a $250,000 pool earns $1.07M a year. A $1,000,000 pool on our 3/4 curve, facing the same trades, earns $1.08M. The deep curve puts its money right at the live market price, where the trades land, so a quarter of the capital wins almost all of the same flow.
For an LP that means the fee income of a million-dollar pool from a quarter of the money. You pick the curve once, when you open the pool.
oniswap.app/app#create
6
273


















