PerpNowLearnBlogStart trading

Every order on-chain with 34 ms round trips: a perps L1 built on DAG-BFT

How PerpNow gets p50 34 ms order round trips with BFT finality: gateway batching, a Mysticeti-style DAG, a short engine hot path and a safe-band liquidation index.

Published November 22, 2026

Same machine in Tokyo. 100 real resting BTC limit orders on Hyperliquid, 100 on PerpNow, each one cancelled right after.

That is end to end: the signed request leaves your bot, goes through BFT consensus, gets matched in a finalized block, and the result comes back. Not a "we received it" ack.

Log-scale chart of order round trip latency: PerpNow p50 34 ms vs Hyperliquid about 700 ms from the same Tokyo client

Here's how it works.

What latency actually means on-chain

On a CEX, the matching engine answers in microseconds, but you're trusting one company's database. On an on-chain exchange, your order isn't real until the validators agree on it. So the number a trader feels is: how long until my order is in a final block and I see the result.

Hyperliquid's docs put that at a 0.2 s median for co-located clients. We measured PerpNow with Hyperliquid's own Python SDK from a machine in the same region: p50 35 ms, p99 124 ms.

Live on the chain right now: a block every ~2 ms, finality p50 ~26 ms. Anyone can check it in the explorer.

The life of one order

Sequence diagram of one order: client, gateway, aibft consensus, engine and back
  1. Gateway micro-batching. Requests from all users are packed into one batch every 1 ms (or every 1,000 orders) and sent to consensus in a single call.
  2. Consensus (aibft). A DAG-BFT protocol in the Mysticeti family. All 4 validators propose blocks in parallel, so there's no single leader to wait on. 4 validators tolerate 1 malicious node, and every height carries a certificate signed by 3 of 4.
  3. Engine. Signatures are verified in parallel on all cores. Then the matching engine applies the block strictly in order: deterministic, price-time priority, and inside each block non-order actions go first, then cancels, then new orders.
  4. Reply. The gateway is waiting on that exact transaction. The moment the block is applied, the result goes back.
aibft DAG rounds: leader block, votes, certificates and commit under the Mysticeti-C rule

Most of the speed came from moving things out of the way

The matching engine was never the slow part. Everything around it was.

Validator pipeline: decode, parallel signature verification, single-threaded apply, with shadow engine hashing and snapshots off the hot path

Liquidations without scanning everyone

Safe-band liquidation index: account bands on a price axis, B-tree range query and min-heap ordering

Each validator streams exchange order books in real time and signs a median price; the chain takes the stake-weighted median. So mark prices move with the market, not on a fixed clock, and the risk check runs on almost every price move.

The naive check, every account against every market on every move, costs ~2.9 µs per account with 199 markets. That grows with users × markets.

So each account gets a safe band: how far the price can move before its margin could be at risk. Bands live in per-market B-trees. A price move becomes a range query that returns only the accounts whose band was crossed, processed in a fixed order through a min-heap so every validator does exactly the same thing. It must give exactly the same result as the full scan: a differential test replays 100,000 random blocks through the old scan, the index, and a shadow mode running both, and they have to match block for block. We also ran it in shadow on the live chain before switching it on.

How far it goes

Benchmark, not live traffic: 4 validators on 16-vCPU machines in Tokyo sustained ~200,000 placed orders per second with p50 under 25 ms (40 orders per signed action, 256 clients, zero errors).

The live testnet has processed 358M+ transactions so far.

Bring your Hyperliquid bot

Same /info, /exchange and WebSocket shapes, same EIP-712 signing. Change one line:

from hyperliquid.exchange import Exchange
ex = Exchange(wallet, base_url="https://perpnow.xyz")

Faucet gives 10,000 test USDC. Agent docs: perpnow.xyz/llms.txt

The honest part

Try it at perpnow.xyz. The demo account needs no wallet.