Block auctions

A block auction collects hidden orders for a few minutes, then crosses them against each other at one price: the midpoint of the market's Uniswap v4 pool, read in the settlement transaction. Nothing is sent to the pool. The pool is the price reference, never the counterparty.

The batch clock

On Robinhood Chain, block.number inside a contract is the Ethereum L1 block number, which moves every 11.4 seconds on average. A batch is 26 of those blocks: 20 to commit (about 3 min 50 s) and 6 to reveal (about 70 s). Batch n starts at GENESIS + 26n. The clock on /blocks reads it live.

1. Commit

You pick a market, a side, a size and a limit expressed as a maximum distance from the midpoint, from 0 to 3%. The browser turns the distance into a limit price from the midpoint it reads at that moment, draws a random 32-byte salt and computes

commitment = keccak256(abi.encode(trader, batch, market, side, amount, limitPx, salt))

Only the hash goes on chain, with a bond of 1 USDG (0.0003 ETH on ETH markets) taken from your vault balance. The order itself, its funds included, must be in the vault by the reveal. commitWithDeposits tops the vault up and commits in one transaction; the preimage is saved in your browser before anything is sent.

A buy order's amount is a budget in the quote asset that includes the fee: what can cross is amount / 1.0025. A sell order's amount is in the base token. The bond asset shows whether the order is on a USDG market or an ETH market; nothing else about it is public before the reveal.

2. Reveal

In the reveal window the order is opened with its preimage. The contract checks the hash, returns the bond, locks the order's funds and records a price sample. There are two ways to reveal:

  • In the tab. Keep /blocks open: when the window opens it asks your wallet to sign the reveal.
  • Reveal for me. At commit time you sign a message (not a transaction) that hands the preimage to the operator key. It is stored in a private store and the operator key calls revealFor during the window, then deletes it. The hash binds your address, so the operator key can only open the order you committed, with your funds, at your limit.

A commitment that is not revealed in its window keeps its bond in the contract; collectForfeits sends it to the stakers' pot.

3. Settle

Once the reveal window closes, anyone can call settle(batch, market). The operator key does it for every book with revealed orders, and the site shows a settle button. The contract reads the pool midpoint and:

  • keeps buy orders whose limit is at or above the midpoint and sell orders whose limit is at or below it;
  • fills the lighter side in full and the heavier side pro rata, every crossed order at the same price;
  • rounds every fill in favour of the venue, and asserts that the book never pays out more than it took in;
  • returns what did not cross to the traders' vault balances.

The price guard

Every reveal and every poke records the midpoint once per L1 block. At settlement the midpoint must sit within the market's guard of the average of those samples: 0.6% for SPY, 1% for most stocks, 1.5% for TSLA, 2% for SPCX, 3% for Pons coins. A batch that fails the guard, has no sample, or is settled more than 26 L1 blocks after its reveal window is void, and every order goes back in full.

Markets

#MarketQuotePoolGuard
0NVDAUSDGv4, fee 0.3%, no hook1.0%
1TSLAUSDGv4, fee 0.3%, no hook1.5%
2AAPLUSDGv4, fee 0.3%, no hook1.0%
3SPYUSDGv4, fee 0.3%, no hook0.6%
4MSFTUSDGv4, fee 0.3%, no hook1.0%
5METAUSDGv4, fee 0.3%, no hook1.0%
6GOOGLUSDGv4, fee 0.3%, no hook1.0%
7AMZNUSDGv4, fee 0.3%, no hook1.0%
8SPCXUSDGv4, fee 0.3%, no hook2.0%
9ZZZETHv4 graduated Pons pool3.0%
10ALAMAYOETHv4 graduated Pons pool3.0%
11DTFETHv4 graduated Pons pool3.0%
12MANYETHv4 graduated Pons pool3.0%

Stocks are the canonical v4 pools against USDG with live liquidity. Pons coins are graduated Pons V2 coins whose locked full-range v4 position sits in the ETH pool Pons creates at graduation; the four with the most ETH in range at launch. The owner can add markets.