Docs
Shim fills an order in a tokenized share on Robinhood Chain against every Uniswap pool that can actually take it, at one price. This page is what it does, what it will not do, and what has been proved.
The clearing price
A share here trades in up to eighteen pools — Uniswap v3 at four fee tiers and v4 at whatever fee each pool's creator chose. They are separate pieces of liquidity and nothing keeps them level.
Shim solves for one number, lambda: buy from every pool whose ask (its price marked up by its own fee) is below lambda, sell into every pool whose bid (its price marked down by its fee) is above it, and trade each exactly that far. Choose lambda so the shares balance against what you asked for. Any two pools you buy from that finish at different marginal prices are a trade left on the table, so this is the cheapest fill that exists — not a heuristic.
The fee enters as a factor on price, so in the square-root space a pool's arithmetic lives in, it enters as its own square root. Using (1 − fee) there instead of √(1 − fee) doubles every spread and invents gaps that are not there.
What Shim refuses
- A pool that cannot absorb $1.00, in either direction, inside the tick data Shim has read. 11 of the 279 pools on this chain are like that: they quote a price and hold nothing. They are also where the biggest apparent gaps live: CRCL shows 574 basis points between its pools if you count every pool that quotes. Counting only the pools that can fill a $1.00 order, it shows -53.
- A pool charging more than 1%. 100 pools here charge more — up to 90% — and they quote happily. A 50% pool will show a 50% "gap" that is entirely its own fee.
- An order it cannot price inside its own data. Shim reads a window of 25% around each pool's price. A walk that would leave that window is traded to the edge of what is known and no further, never guessed past.
- An order that would overspend the budget. "Spend $10,000" must not spend $10,000.000002; if no price can be found that fits, the order is refused rather than rounded up.
The transaction
One call to Uniswap's Universal Router, through Permit2. Dollars are pulled once; each buy leg spends its share; each sell leg is fed by the router's own balance; the shares are swept to you with a floor on the total, and any dollars the sell legs returned are swept back. Shim deploys no contract and holds no keys.
The floor is the guard, and it is the router's own: if the pools moved and the order would deliver less than 0.30% below the quote, the sweep reverts and nothing happened. When a plan sells into a pool on the way past, your wallet needs the gross for the length of the call — the app says so before you sign.
What is proved
- 39/39 properties on Robinhood Chain itself, each executed by an eth_call with no to — real creation code on the real evaluator, no deployment, no gas. Init code 20,143 bytes against EIP-3860's 49,152. 19 of 21 deliberate defects caught by a named property; 2 declared unobservable with the property that proves why.
- 10,890 assertions over 600 random orders against pool state frozen at one block, plus 15 named properties; 19 of 20 deliberate bugs caught.
- 21/21 on a fork of this chain with the real router and real pools: a $100k order delivered the predicted shares to the wei and beat the best single pool by 27 bps.
Every share, at $50k
Read at block 64,043,251. Columns after the spread are what Shim saves against that share's own best single pool, at $1k · $10k · $50k · $250k.
| Share | Pools | Thin | Spread (bps) | $1k | $10k | $50k | $250k |
|---|---|---|---|---|---|---|---|
| AAPL | 5 | -10 | 0 bps | 0 bps | 14 bps | 69 bps | |
| AMC | 5 | -12 | 0 bps | 0 bps | 18 bps | 56 bps | |
| AMD | 4 | -35 | 0 bps | 2 bps | 43 bps | — | |
| AMZN | 3 | 2 | -48 | 2 bps | 0 bps | 0 bps | 2 bps |
| ASML | 4 | -60 | 21 bps | 95 bps | — | — | |
| BABA | 5 | -7 | 0 bps | 11 bps | 84 bps | — | |
| CLSK | 0 | 0 | — | — | — | — | |
| COIN | 2 | -67 | 455 bps | — | — | — | |
| COST | 6 | -10 | 0 bps | 6 bps | 12 bps | 49 bps | |
| CRCL | 5 | 1 | -53 | 0 bps | 0 bps | 4 bps | 42 bps |
| CRWV | 1 | 0 | 0 bps | — | — | — | |
| DELL | 3 | -110 | 0 bps | 9 bps | 115 bps | — | |
| DJT | 3 | 1 | -17 | 0 bps | 0 bps | 0 bps | 96 bps |
| EWY | 2 | 1 | -13 | 2 bps | 26 bps | — | — |
| GLD | 6 | 5 | 0 bps | 0 bps | 0 bps | 8 bps | |
| GME | 4 | 1 | -10 | 0 bps | 1 bps | 14 bps | 76 bps |
| GOOGL | 5 | -8 | 0 bps | 0 bps | 0 bps | 3 bps | |
| HIMS | 6 | -47 | 0 bps | 0 bps | 0 bps | 0 bps | |
| IBM | 5 | -35 | 2 bps | 14 bps | only Shim | — | |
| INTC | 1 | 0 | 0 bps | 0 bps | 0 bps | — | |
| IONQ | 0 | 0 | — | — | — | — | |
| LLY | 5 | -9 | 0 bps | 1 bps | 103 bps | 99 bps | |
| LULU | 4 | 1 | -57 | 1 bps | 15 bps | 20 bps | — |
| META | 4 | -60 | 1 bps | 1 bps | 2 bps | 28 bps | |
| MRNA | 4 | -44 | 1 bps | 4 bps | 42 bps | — | |
| MSFT | 4 | -15 | 0 bps | 0 bps | 11 bps | 88 bps | |
| MSTR | 5 | -41 | 0 bps | 1 bps | 5 bps | 104 bps | |
| MU | 1 | 2 | 0 | 0 bps | 0 bps | 0 bps | 0 bps |
| NBIS | 0 | 0 | — | — | — | — | |
| NFLX | 3 | -35 | 5 bps | 2 bps | 7 bps | — | |
| NVDA | 5 | -0 | 0 bps | 0 bps | 0 bps | 0 bps | |
| ORCL | 0 | 0 | — | — | — | — | |
| PLTR | 2 | -35 | 0 bps | 6 bps | 26 bps | — | |
| QQQ | 4 | -9 | 0 bps | 0 bps | 0 bps | 3 bps | |
| RBLX | 3 | 1 | -24 | 3 bps | 63 bps | only Shim | — |
| RDDT | 3 | -60 | 3 bps | 34 bps | 14 bps | 10 bps | |
| RGTI | 0 | 0 | — | — | — | — | |
| RIVN | 4 | 1 | -53 | 9 bps | 122 bps | 140 bps | — |
| RKLB | 1 | 0 | 0 bps | 0 bps | — | — | |
| SGOV | 6 | -3 | 0 bps | 0 bps | 0 bps | 0 bps | |
| SLV | 4 | -2 | 0 bps | 0 bps | 0 bps | 8 bps | |
| SNDK | 2 | -134 | 0 bps | 0 bps | 0 bps | — | |
| SPCX | 4 | -10 | 0 bps | 0 bps | 0 bps | 15 bps | |
| SPY | 4 | -10 | 0 bps | 0 bps | 2 bps | 11 bps | |
| TSLA | 5 | -10 | 0 bps | 4 bps | 10 bps | 66 bps | |
| TSM | 6 | -75 | 5 bps | 2 bps | 18 bps | only Shim | |
| TTWO | 5 | -47 | 0 bps | 3 bps | 19 bps | only Shim | |
| USAR | 1 | 0 | 0 bps | 0 bps | — | — | |
| USO | 4 | -19 | 0 bps | 3 bps | 1 bps | 0 bps |
The raw results, as the runs wrote them: the chain properties, the offline suite and its fuzz, the fork test, the census, every figure on this site. A summary nobody can check is a slogan.
What is not built
- Selling is not built. The solver handles it — the arithmetic is symmetric and the fuzz exercises both sides — but the app prices and sends buys only.
- No flash loan. When a plan sells into a pool on the way past, your wallet must hold the gross for the length of the call. Morpho's flash loan would remove that and is not wired up.
- Hooked v4 pools are ignored rather than priced with a hook in the way.
- Nothing watches anything. No alerts, no limit orders, no scheduling.
- Not audited. By anyone.