Latency budget
A single Hwal tick takes ~50 ms from oracle update to Solana L1 commit. That budget splits into four phases inside one execution-layer block.
The four phases
01 · sense ~5 ms oracle pushes price into the ER state
02 · evaluate ~15 ms ER block runs tick_position
03 · settle ~10 ms fee / keeper / owner payouts inline
04 · commit ~20 ms ER block commits diff to Solana L1
total ~50 ms oracle update → L1 commit01 — sense
An oracle pushes a fresh price update. In V1 the program directly verifies the signed oracle attestation. In V2 the same update lands inside the ER via the oracle relayer, where the program is already delegated for read access.
02 — evaluate
Inside the ER slot, the program runs the trigger evaluation. trailing_extremeadvances in O(1). Stop / take-profit / trailing are three integer comparisons. CPU cost is negligible; the dominant cost is reading the oracle update account and writing the position update.
03 — settle
If a trigger fired, the same instruction transfers the collateral split inside the ER. Fee and keeper reward route to their respective accounts; the remainder lands on the owner. Status flips to TRIGGERED. The ER state is now ready to commit.
04 — commit
The execution layer commits the ER block to Solana L1 inside one Solana slot. The same atomic commitment carries the trigger event and the lamport movements. From an observer's perspective the entire fire is a single L1 transaction.
Baselines
- Hwal V2 ER ~50 ms (oracle → commit)
- Hwal V0 L1 keeper ~500 ms (keeper poll cadence)
- Drift / Jupiter limit 400 ms to multi-second (keeper polling + L1 inclusion)
- CEX (Binance, etc.) ~5 ms (off-chain, custodial)
The 8 to 10× improvement over L1 keepers is the headline. The deeper claim is that the trigger evaluation lives one block away from the price update, so the bot-vs-market race condition disappears.