OrdoFi Documentation

The execution layer for Robinhood Chain (Arbitrum Nitro L2, chain ID 4663).

Quickstart

# clone & install npm install # 1. measure MEV on the chain npm run watcher # follows the head, writes data/*.ndjson npm run report # USD-denominated report → data/report.json # 2. run the smart RPC gateway npm run gateway # :8547 # 3. run the order-flow auction npm run auction # :8548 # 4. serve the site npm run web # :3000

Gateway API :8547

A drop-in JSON-RPC endpoint. Point any wallet, bot, or app at it. Standard eth_* methods pass through to the chain; OrdoFi adds protection and extensions. Authenticate with an x-api-key header.

eth_sendRawTransaction protected

The transaction is simulated from the recovered sender first. If it would revert, it is rejected with code -32000 and never reaches the sequencer — so you don't pay gas for a guaranteed failure. Otherwise it forwards normally and returns the tx hash.

ordo_simulate

Simulate a raw signed transaction without sending it. Returns { ok, revertReason?, from, to }.

curl -X POST http://localhost:8547 \ -H 'x-api-key: YOUR_KEY' -H 'content-type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"ordo_simulate","params":["0x02f8..."]}'

ordo_sendBundle

Submit up to 10 transactions to be sequenced back-to-back. Every tx is simulated first; if any would revert, the whole bundle is rejected. Params: { txs: [rawTx, ...] }.

Ordering guarantee: best-effort on a first-come-first-served chain — transactions are fired in the same tick to minimize the gap at the sequencer. Enforced atomicity requires sequencer integration (Phase 3) and is documented as such in the response.

Operational endpoints

MethodPathReturns
GET/healthstatus, upstream, uptime
GET/metricsPrometheus text
GET/metrics.jsoncounters + latency percentiles

Searcher API :8548

Connect over WebSocket to ws://host:8548/searcher to receive order-flow opportunities and bid on backrun rights.

// on connect you receive: { "type": "welcome", "auctionWindowMs": 200, "swapTopics": {...} } // for each user transaction OrdoFi is holding: { "type": "opportunity", "opportunity": { "id": "…", "hint": { "poolsTouched": […], "selector": "0x…", "value": "0x0" } } } // respond with a sealed bid before the window closes: { "type": "bid", "opportunityId": "…", "searcher": "0xyou", "bidWei": "1000000000000000", "backrunRawTx": "0x02f8…" }

Auctions are sealed-bid, second-price: the highest bidder wins and pays the second-highest price. The winning backrun is dispatched immediately after the user transaction.

Submitting order flow POST /submit

Wallets and apps route user transactions through the auction to earn rebates:

curl -X POST http://localhost:8548/submit \ -H 'content-type: application/json' \ -d '{"rawTx":"0x02f8…","originLabel":"v4.fun","rebateAddress":"0xapp…"}'

Response includes the auction result and the rebate ledger entry (user / app / protocol split). Check accrued rebates at GET /stats.

Rebate split

Configurable via env; defaults route the majority to users:

RecipientDefaultEnv
User90%ORDO_REBATE_USER
App (order-flow originator)5%ORDO_REBATE_APP
Protocol5%ORDO_REBATE_PROTOCOL