How long a pool stays stale
40 shocks on testnet. On block timestamps, a swap on Base Sepolia reaches the Parallax hook on Unichain Sepolia in p50 1,800 ms (p95 2,600 ms). An off-chain watcher polling public RPC endpoints sees the callback p50 4,044 ms after it sees the Base receipt.
Observer clock, one dot per loop
| Hop | p50 ms | p95 ms | min ms | max ms |
|---|---|---|---|---|
| Base receipt → Lasna react() | 1,835 | 2,167 | 1,303 | 2,808 |
| Lasna react() → Unichain callback | 2,178 | 2,764 | 402 | 3,145 |
| Full loop: Base → Unichain | 4,044 | 4,563 | 2,493 | 4,950 |
n = 40. Observer clock: the time between this process seeing the Base receipt and seeing each log, from one machine polling every 100 ms.
Both clocks
| Span | n | p50 ms | p95 ms | min ms | max ms |
|---|---|---|---|---|---|
| Chain: Base block time → Unichain callback block time | 40 | 1,800 | 2,600 | 1,000 | 2,600 |
| Observer: Base receipt seen → Unichain callback seen | 40 | 4,044 | 4,563 | 2,493 | 4,950 |
| Observer: Base receipt seen → Lasna react() seen | 40 | 1,835 | 2,167 | 1,303 | 2,808 |
| Observer: Lasna react() seen → Unichain callback seen | 40 | 2,178 | 2,764 | 402 | 3,145 |
| Observer: shock sent → Base receipt seen | 40 | 1,053 | 1,341 | 967 | 1,968 |
Method
npm run benchsends a swap on the Base Sepolia reference pool that moves the price 80 to 300 ticks, alternating direction. Every shock is above the reactive contract's 10-tick threshold, so every shock should close a loop.- The script polls all three chains every 100 ms. It looks for the shock receipt on Base, then for the
ReferenceForwardedlog on the Lasna reactive diamond and theReferenceUpdatedlog on the Unichain hook, both filtered by the indexed origin transaction hash. - The chain clock subtracts the Base block
timestampMsfrom the Unichain block timestamp. Anyone can reproduce it from the explorers. Unichain timestamps are whole seconds, so each value carries up to about 1 s of quantisation. - The observer clock takes every reading in one process on one machine, so skew between chains cannot distort it. It includes the time public RPC nodes take to serve a new block and its logs, which is why it is higher than the chain clock.
- Lasna block timestamps run slightly behind Base's clock, so a Lasna-only chain-clock split is not meaningful and is not quoted. Per-hop figures use the observer clock.
Raw data and the generated report: LATENCY.md and data/. Every loop is listed in the loop explorer.
The window that is left
The shield works only after the callback lands. An arbitrageur who reaches a Unichain block first still trades at the old reference and pays the base fee. Every second Reactive takes off the loop shrinks this window. Below: the same bot racing both pools, once reacting immediately and once 3 s after the Base receipt.
Bot reacts immediately
| Pool | arb trades | before callback | after callback | avg fee paid | arbitrageur profit (pUSD) |
|---|---|---|---|---|---|
| Shielded | 12 | 0 | 12 | 1.713% | -348.05 |
| Control | 12 | 0 | 12 | 0.050% | 283.97 |
Bot reacts 3 s after the Base receipt
| Pool | arb trades | before callback | after callback | avg fee paid | arbitrageur profit (pUSD) |
|---|---|---|---|---|---|
| Shielded | 14 | 0 | 14 | 1.209% | 8.30 |
| Control | 10 | 0 | 10 | 0.050% | 216.02 |
Arbitrageur profit is valued at the Base reference price and equals the LPs' loss against rebalancing on those trades. The bot previews the hook's fee and trades only the profitable part of the gap. A second pass after the callback takes whatever is still profitable.