Docs.
Everything Pincer does, and everything it can't promise.
01What it is
Robinhood stock tokens (NVDA, TSLA, SPY…) trade on Robinhood Chain in several Uniswap v3 pools at once: against USDG or WETH, at 0.05%, 0.3% or 1% fee tiers. Each pool moves on its own flow, so their prices drift apart. When the gap is wider than the pool fees, buying in the cheap pool and selling in the rich one locks in the difference.
Pincer does both legs in one transaction, with money the first pool lends for the length of the call. If the result isn't a profit, the transaction reverts and the only cost is gas.
02The pinch
A route is an ordered list of 2 to 4 canonical pools that starts and ends in the same start token (USDG or WETH).
- Grab. The engine calls
swapon the first pool foramountInof the start token. Uniswap sends the stock first and callsuniswapV3SwapCallback, where payment is due. - Sell. Inside that callback, the engine runs the remaining hops with what it just received. When the two pools quote in different tokens, a third hop through WETH/USDG 0.01% closes the loop.
- Settle. The engine repays the first pool. If what came back isn't more than
amountIn, it reverts withUnprofitable. Otherwise the profit is split:feeBpsto the treasury, the rest toto.
A route's fee band is the sum of its pool fees. A price gap only pays once it clears that band, plus price impact at the size you choose. Quotes are exact for one block.
03Engine API
function pinch(address[] pools, address start, uint256 amountIn, uint256 minProfit, address to, uint256 deadline) returns (uint256 profit, uint256 fee) function quote(address[] pools, address start, uint256 amountIn) // eth_call only returns (uint256 amountInUsed, uint256 amountOut) function quoteMany(address[][] routes, address[] starts, uint256[] amounts) // eth_call only returns (uint256[] amountInUsed, uint256[] amountOut, bool[] ok) function path(address[] pools, address start) view returns (address[] tokens) function feeBps() view returns (uint16) // 1000 = 10% function MAX_FEE_BPS() view returns (uint16) // 2000, a code constant function MAX_HOPS() view returns (uint8) // 4 function paused() view returns (bool) event Pinch(address indexed caller, address indexed to, address indexed start, address[] pools, uint256 amountIn, uint256 amountOut, uint256 profit, uint256 fee) errors RouteLength · BadStart · RepeatedPool · NotCanonical · NotOnPath · TokenNotAllowed(address) NotCyclic · ZeroAmount · Expired · IsPaused · PartialFill · Unprofitable(uint256,uint256) MinProfit(uint256,uint256) · Quoted(uint256,uint256) · UnexpectedCallback · Reentrancy
quote runs the real swaps and reverts at the end with the result, so it is only meaningful through eth_call. Set minProfit from a fresh quote (the app uses 25, 50 or 75% of it).
04Swarm
function runFirstProfitable(address[][] routes, address[] starts, uint256[] amounts, uint256[] minProfits,
address to, uint256 deadline, uint256 gasPerCandidate)
returns (uint256 index, uint256 profit, uint256 fee)
Send up to 16 candidates, best quote first. Each try gets gasPerCandidate (use at least 600,000 for 2 hops, 800,000 for 3 to 4). The first one that closes in profit wins and the rest are skipped. If none does, it reverts with NoneProfitable(tried, outOfGas). The swarm holds nothing and has no owner.
05Bots
The ABI and addresses live in /js/config.js. The scanner in /js/core.js has no DOM and runs in Node too. The repo ships tools/keeper.mjs:
# read-only: print the reef, ranked by edge node tools/keeper.mjs # quote the top 5 routes on the engine, every 15 s node tools/keeper.mjs --top 5 --loop 15 # send: needs KEEPER_KEY in the environment, keeps 50% of the quote as the guard KEEPER_KEY=0x… node tools/keeper.mjs --send --guard 50 --min-usd 0.5
The public node caps JSON-RPC batches at 5 requests and answers 429 under load. Back off and retry.
06Parameters
| NAME | VALUE | NOTE |
|---|---|---|
| feeBps | 1000 | 10% of profit, read it live. 0 on a loss. |
| MAX_FEE_BPS | 2000 | Hard cap in code. The owner can't go above it. |
| hops | 2 – 4 | Pools in a route. |
| fee tiers | 0.01 · 0.05 · 0.3 · 1% | Raw: 100, 500, 3000, 10000. |
| start tokens | USDG (6) · WETH (18) | A route must start and end in one of them. |
| gas | ~330k – 520k | 2 hops to 4 hops, on Robinhood Chain. |
| deadline | 120 s | What the app signs with. |
PINCER