Every number on a ticket, and where it comes from
One block, read once. Nothing on a ticket is typed by hand, and the parts that are estimates say so.
1. Which tokens
A stock token is never identified by its ticker: dozens of tokens on Robinhood Chain copy tickers. Torrva lists a token only when, on chain, its code is the official Robinhood beacon proxy, its ERC-1967 beacon slot points at the official beacon, its supply is above zero, its symbol matches exactly, and it is in the vetted list of beacon-upgrade emitters. It also needs a Chainlink feed for the same stock and at least one Uniswap v3 pool against USDG (0x5fc5360d0400a0fd4f2af552add042d716f1d168) that holds USDG. 26 tokens passed at block 126,256,324 (/api/markets).
2. The quote
TorrvaQuoteLens takes a pool, the token you pay with, up to eight sizes and the feed. It first checks that the Uniswap v3 factory (0x1f7d7550b1b028f7571e69a784071f0205fd2efa) reports this pool for its own tokens and fee. For each size it calls the pool's swap; when the pool asks to be paid, the lens answers by reverting with the amounts, which ends the swap and undoes every transfer. So the amount out is the pool's own arithmetic at that block, including its fee and the price impact of your size, and nothing is ever moved. The site calls the deployed TorrvaQuoteLens at 0x93cefe98f6ebba65c633267aaf24600ee3fac5bd and stamps tickets into TorrvaTicketLog at 0xe895b34b6d1bfbcdbe6e10a90796ec485b9682a4. Anyone can check both against this source with npm run verify-deployment.
3. The formulas
The lens computes price, reference and gap in fixed point; your browser recomputes them from the raw amounts with the same rounding and shows "Math matches the lens" only when every value is equal to the last unit. 1 USDG is counted as $1; the USDG / USD feed (0x61b7e5650328764b076a108eff5fa7282a1b9ad2) is shown next to every ticket. ETH / USD: 0x78f3556b67e17df817d51ef5a990cdaf09e8d3a9. The L1 data part comes from the chain's NodeInterface (0x00000000000000000000000000000000000000c8) for a 356-byte swap call. The router allowance is a fixed estimate; the gas your wallet estimates for the real swap is what you pay.
4. The reference time
Most stock feeds on Robinhood Chain are tagged 24/5: they publish from Sunday 20:00 to Friday 20:00 New York time. Inside that window a round up to an hour old is shown as Live round, an older one as Older round (the feed publishes on a price move or a heartbeat). Outside the window the ticket says Last close: the price is the last one of the session, not a live one. Where Chainlink also runs a 24/7 feed for the stock, it is shown as a second line. Exchange holidays are not detected; the round's age tells you.
5. What is not covered
- Uniswap v4 pools, other DEXes and routers that split an order: not quoted in this version, so a better price elsewhere is possible.
- Selling a stock token (the lens can, the page quotes buys only).
- Swapping from the site: Concept. Torrva compares; you swap where you choose.
- The pool can move between the ticket and your swap. A ticket is a reading at one block, not a promise.
The order's example as a labelled simulation · /api/proof · API