Start trading

Firmquote

A venue on Elysium where market makers write their own HYPE/USDC price every few blocks, and any Uniswap v4 swap into the pool fills at the best of those prices, exactly as quoted.

Pools on Elysium price with a formula. When Hyperliquid moves, the formula does not; it waits for someone to trade it back into line, and whoever trades in between gets a price that is late. Our gap tracker scores every HYPE/USDC swap on Elysium against the Hyperliquid mid of the same second, live.

Firmquote replaces the formula with prices written by makers who watch the market. Elysium makes this practical: blocks land roughly every 120 to 200 ms, and writing a price is one small transaction. Firmquote is the venue, not a market maker. The contract checks each maker's own rules and never sets a price itself.

How a fill works

  1. A maker writes a price. One 32-byte slot per pool holds its price, both spreads, a size limit per L2 block, how fast the price widens with age, and how many blocks it stays fillable. The contract stamps the slot with the L2 block it landed in.
  2. A router sends a swap. The pool is an ordinary Uniswap v4 pool on Elysium's PoolManager (the one every Montra pool lives in). Any router that can call PoolManager.swap reaches it.
  3. The hook fills it. Before the swap, Firmquote's hook prices the trade against every maker in the pool, skips the ones that are paused, expired, out of stock or over their per-block size, and fills from the best. Stock moves as ERC-6909 claims inside the PoolManager, so no token transfer happens during the fill.

The quote views (quoteExactIn, quoteExactOut) run the same code as the swap, so a quote taken in the block you trade in is the fill you get, to the base unit. Tested on a fork of Elysium mainnet with the real PoolManager and USDC.

The price slot

Each maker writes one uint256 per pool. Fields, lowest bit first:

bits 0–55Price mantissa. The price is mantissa × 10^(exponent − 128), in token1 base units per token0 base unit (USDC per HYPE once decimals are applied).
bits 56–63Price exponent, offset by 128.
bits 64–79Bid spread, in pips (1 pip = 0.0001 %, so 100 pips = 1 bp). Applied when the taker sells token0.
bits 80–95Ask spread, in pips. Applied when the taker buys token0.
bits 96–143Most token0 this price fills per L2 block: a 40-bit mantissa and an 8-bit power of ten. Zero means no limit.
bits 144–159Size impact: extra pips charged at a fill of the full per-block size, linear in size.
bits 160–175Widening: extra pips per L2 block since the price was written.
bits 176–191Life: L2 blocks the price stays fillable. Zero switches the price off.
bits 192–231Written block, set by the contract whatever the maker sends.
bits 232–247Free for the maker's own bookkeeping.
bits 248–255Flags: 1 same-block only, 2 no bid, 4 no ask.

Ages are counted in L2 blocks read from ArbSys.arbBlockNumber(), because on Elysium Solidity's block.number is the parent chain's block. Encode a slot without code at /api/encode?mid=63.8&bidBp=3&askBp=3&perBlock=2&life=300, or with the form on the makers page.

Makers

Two keys

Maker (owner)Holds the stock. Joins, deposits, withdraws, names operators, pauses and unpauses. Keep it offline.
OperatorLives on your pricing server and holds only gas. Writes prices and can pause. It can never move funds.

The newest operator becomes the key whose prices the venue reads. Revoking it falls back to the maker's own prices, so rotating a key is two transactions: add the new one, revoke the old one.

Steps

// 1. as the maker: join, name your bot, deposit (HYPE is sent as value; approve USDC to the venue first)
venue.join()
venue.setOperator(operatorAddress, true)
venue.deposit(0, false, 20e18, { value: 20e18 })   // pool 0, token0 = HYPE
venue.deposit(0, true, 500e6)                    // token1 = USDC

// 2. as the operator, every few blocks: (uint16 pool, uint256 slot), 34 bytes per pool
venue.price(encodePacked(['uint16', 'uint256'], [0, slot]))

// 3. any time, even while trading is paused
venue.withdraw(0, true, 500e6, to)

A per-pool cap on how much a maker may hold can be set during the first weeks. Up to 12 makers quote in one pool; the venue's owner can take a dust account out of the search list, and its stock stays withdrawable.

Routers and aggregators

The pool key is { currency0: 0x0 (native HYPE), currency1: USDC, fee: 0, tickSpacing: 1, hooks: Firmquote }. Nothing is ever added as liquidity; liquidity calls revert.

  • Quote: quoteExactIn(0, zeroForOne, amountIn) and quoteExactOut(0, zeroForOne, amountOut) return the amount and the maker that fills it. They revert with NoLiveQuote() when no maker covers the size: read that as no liquidity at this size.
  • Swap: inside unlock, call PoolManager.swap with any valid price limit (the curve is never used), settle the input and take the output, as for any v4 pool. Set a minimum out: prices move between blocks.
  • Our router: FirmquoteRouter.swap(key, zeroForOne, amountSpecified, limit, to, deadline), v4 sign convention (negative = exact in). Native HYPE goes as value and any extra is refunded.

Contracts

Elysium mainnet, chain 99901. Solidity 0.8.26, not upgradeable.

Firmquote (hook)deploys at launch
FirmquoteRouterdeploys at launch
Uniswap v4 PoolManager0xe2e105d3f7209a9da11f83ccf3e7398a753823f1
USDC0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65

Source: Firmquote.sol, FirmquoteRouter.sol, and the fork test suite Fork.t.sol (fills match quotes to the base unit both ways, expiry, widening, same-block flag, side switches, per-block size, best of two makers, operator limits, withdrawals while halted, no liquidity, fees, listing).

Fees

Takers pay 0.5 bp on what they send, hard-capped at 5 bp in the contract. Makers pay nothing to the venue: writing a price costs gas only. Fees accrue in the contract and only go to the venue's treasury; no admin path reaches maker stock.

The Elysium gap

The gap tracker reads every HYPE/USDC swap on Elysium's active pools (Aero, Ramses and the Uniswap v4 pools with real flow) as blocks land. Each swap's price is compared with the Hyperliquid HYPE mid of the same second (polled every second; the 1-minute candle when a second was missed). A positive gap means the swapper paid more than Hyperliquid; a negative one means the swapper beat the mid, which is what arbitrage on a late pool looks like. Pool prices are also read every 4 seconds to show how far each pool sits from Hyperliquid right now.

API

JSON, no key, CORS open, rate limited per IP.

GET /api/gap?hours=24Totals, per-pool gaps and how far each pool is off Hyperliquid now.
GET /api/gap/swaps?n=50Latest swaps, each with its Hyperliquid mid and gap.
GET /api/gap/minutes?hours=24Per-minute volume and volume-weighted gap.
GET /api/bookThe price book: every maker's decoded price, stock, best bid and ask, recent fills.
GET /api/quote?side=buy&amount=100Exact quote from the contract. side buy (pay USDC) or sell (pay HYPE), exact in or out.
GET /api/encode?mid=…Encodes a price slot.
GET /api/wallet/0x…One address over 24 hours: swaps, paid over mid, beat the mid, same volume at a firm 3.5 bp. Share card at /api/card/wallet/0x….png.
GET /api/leaders?n=10Who paid the most over Hyperliquid, and who took the most from late pools, in 24 hours.
GET /api/statusElysium head and block pace, Hyperliquid freshness, contracts, reference maker.

Try it

Pick a call. It runs against this server, live.

MCP for agents

A keyless remote MCP server (streamable HTTP) at https://firmquote.cc/mcp. Tools: gap, swaps, wallet, leaders, book, quote, encode_price, status. Agents read and quote; signing stays with the user's wallet.

// Claude Code, Cursor, or any MCP client
{ "mcpServers": { "firmquote": { "type": "http", "url": "https://firmquote.cc/mcp" } } }

Security and trust

MakerCan deposit, withdraw at any time, name operators, pause. Cannot touch another maker's stock.
OperatorCan write its maker's prices and pause. Cannot withdraw, deposit, unpause or name operators. A stolen operator key can post bad prices for that maker; the per-block size limit and instant revocation bound the damage.
GuardianCan pause trading for the venue or a pool and take a dust account out of a pool's search list. Cannot move or freeze stock, cannot block withdrawals.
OwnerLists pools, sets the fee within its 5 bp cap, the guardian, the treasury and per-pool holding caps. Two-step transfer. No path to maker stock exists in the code.

Not audited yet. Elysium has a single sequencer (run with Conduit) that orders transactions by priority fee, with no public mempool. Fee-on-transfer and rebasing tokens are not supported. The team runs one small reference maker that prices from the Hyperliquid mid, under the same rules as any maker.