Hwal
GitHub

Lazer rings.ER fires.L1 commits.活 · 刹那.

On-chain trigger primitive for Solana. Built on Pyth Lazer + MagicBlock ER. Plug the 1ms reflex into any protocol with one CPI call.

Devnet live · permissionless keeper · atomic settle · 8CMZeT5VGghLf424LRY6odzyG3GscJBe5azt7B2pump

Hwal mascot at full draw, arrow nocked, the moment before release
lazer · er · settle · all in one CPI
Bow, smoking pipe, sealed scroll, inkstone — primitive tools of the trade

01 / The primitive

Three layers,
one reflex.

Pyth Lazer rings every millisecond. MagicBlock ER ticks every 50 milliseconds. Solana L1 commits atomically. What was missing was the primitive that weaves all three into one reflex.

Every Solana protocol that needs real-time conditional execution ends up writing the same three integrations: a Lazer subscription, an ER delegation pipeline, an L1 commit path. Each silos the plumbing inside its own program. Hwal lifts that pattern out into a standalone primitive any program can pull in with one CPI.

A position is one PDA carrying collateral, a Lazer feed pubkey, and the trigger fields. The position delegates to MagicBlock ER. A keeper is anyone willing to call tick_position inside the ER. The protocol pays whoever lands the firing tick 0.25% of the collateral. Settlement commits back to L1 atomically. There is no privileged operator.

Price feed
1ms
Pyth Lazer subscription
Slot cadence
50ms
MagicBlock ER delegation
Settlement
atomic L1
ER commit, same block
Integration
1 CPI
hwal::open_position

03.5 / Latency roadmap

Honest about today.
Specific about tomorrow.

V0 is the L1 parity baseline. V1 swaps the mock feed for Pyth Lazer (1ms / 50ms / 200ms channels). V2 wraps the whole evaluation inside a MagicBlock ER at 50ms slot. Each stage shipped, not promised.

V0 · live devnet
L1 keeper baseline
500-800 ms

Permissionless keepers poll L1 and call tick_position against a mock feed. Latency floor is the slot (~400 ms) plus polling cadence. End-to-end parity test for the primitive.

V1 · current
Pyth Lazer subscription
1ms / 50ms / 200ms feed

Replace mock feed with Pyth Lazer. Three channels available (1ms, 50ms, 200ms) per protocol. Lazer attestation verified on every tick. L1 slot floor (~400 ms) still bounds settlement; the upgrade is feed precision.

V2 · shipping
MagicBlock ER delegation
50ms slot · atomic L1 commit

Position PDA delegates to the MagicBlock ephemeral rollup. tick_position runs inside the ER at 50ms cadence against the 1ms Lazer feed. Trigger fire commits ER state back to L1 atomically. First Solana primitive on the Lazer + ER stack.

03 / How it works

Delegate. Tick. Settle.

Three primitives chained into one reflex. Pyth Lazer for 1ms price. MagicBlock ER for 50ms slot. Solana L1 for atomic settlement. No off-chain matcher. No protocol-run keeper monopoly.

01
Delegate
L1 → MagicBlock ER

From your own Anchor program, CPI into hwal::open_position with collateral, a Pyth Lazer feed pubkey, and your trigger fields. The position PDA is created on L1 and immediately delegated to the MagicBlock ephemeral rollup. The protocol still owns the relationship with the user.

hwal::open_position (CPI + delegate)
02
Tick
1ms feed · 50ms slot

Inside the ER, Pyth Lazer feeds the program every millisecond at the chosen channel (1ms / 50ms / 200ms). tick_position is permissionless. Any keeper signer can call it. The program reads the Lazer attestation, advances the trailing extreme, and evaluates triggers within a 50ms ER slot.

tick_position (in ER)
03
Settle
atomic L1 commit

When a trigger fires inside the ER, the instruction splits collateral and the ER state commits back to L1 atomically. The keeper that landed the firing tick gets 0.25%. The fee receiver gets 0.5%. The owner gets the rest. No two-phase, no callback contract.

tick_position (trigger + commit)

04 / Versus the alternatives

Wire it yourself, or
pull in the reflex.

Real-time conditional execution on Solana means three things must line up: sub-slot price (Lazer), sub-slot execution (ER), atomic settle (L1). Build the plumbing yourself, or pull in the primitive that already weaves it.

Price feed cadence
DIY
Pyth Core (~400ms slot)
L1 only
Pyth Core (~400ms slot)
Hwal
Pyth Lazer · 1ms / 50ms / 200ms
Trigger slot cadence
DIY
Solana L1 (~400ms)
L1 only
Solana L1 (~400ms)
Hwal
MagicBlock ER · 50ms
Integration time
DIY
~4 weeks (Lazer + ER + L1 plumbing)
L1 only
0 (already shipped)
Hwal
1 CPI call
Keeper
DIY
you operate
L1 only
protocol operates
Hwal
permissionless · 0.25% reward
Composable across protocols
DIY
no
L1 only
no (siloed)
Hwal
yes (CPI primitive)
Settlement
DIY
two-phase typical
L1 only
in-protocol
Hwal
atomic ER → L1 commit
Maintenance burden
DIY
Lazer sub + ER delegation + keeper
L1 only
none (protocol problem)
Hwal
none (anyone can keeper)

05 / Built on Hwal

Four protocols built on the reflex.

The primitive is intentionally narrow: 1ms feed + 50ms slot + L1 commit, wrapped into one CPI. What you build on top is yours. Each of the four below is a one-week integration, not a quarter-long rewrite.

Arrow drawn, the instant before release
Perp / HFT engine

1ms reaction on price moves

Your perp DEX wants sub-slot liquidation and stop-loss. Lazer feeds price every millisecond, Hwal evaluates inside MagicBlock ER at 50ms slot cadence, settlement commits to L1 atomically. Build a CeFi-grade trading engine with on-chain trust.

CeFi reflex. On-chain custody.
Mid-flight decision
Cross-DEX arbitrage

Catch micro-spreads atomically

Spreads between Orca, Raydium, Phoenix open and close in milliseconds. With Lazer + ER you can register "if SOL/USDC spread > 0.05% then route swap A→B," and the keeper market fights to land it. Atomic settle, no race-loss to L1 congestion.

1ms spread. 50ms fire. L1 commit.
Bow leaning, watching the field
DAO treasury

Hardcode the rebalance

Your treasury holds SOL. You vote once: "if SOL drops 20% from today, swap 30% to USDC." The vote ships as a Hwal trigger evaluated against Lazer feeds. No multisig signing during a crash. No discord coordination at 3am.

If we vote it, the chain executes it.
Arrow ready, watching
Yield / LP protocol

Conditional auto-claim, auto-exit

LPs want to auto-claim fees when accrued above $X, or auto-exit on impermanent loss exceeding Y%. Lazer streams the price, Hwal evaluates inside the ER, the permissionless keeper market lands the firing tick.

Your vault grew a brain.

06 / Built by Hwal

We eat our
own cooking.

The primitive is one thing. The first product that uses it is the proof. We're building the perp DEX that takes the 1ms reflex from spec to flow.

Hwal Exchangeshipping · Q3 2026

A Solana-native perp DEX where stops fire on the 1ms feed, liquidation runs at 50ms slot cadence, and settlement commits to L1 atomically. Same self-custody PDA, same permissionless keeper market, no off-chain matcher.

  • Stops that fire before the L1 slot bound. Sub-slot reflex inside MagicBlock ER.
  • Liquidation engine on the same primitive. No siloed keeper, same 0.25% reward market.
  • Self-custody throughout. Position PDA is yours, not ours. Cancel any time.
  • Built openly. Anchor program, IDL, keeper reference — all upstreamed to the Hwal primitive repo.
Cadence
50ms
ER slot
Feed
1ms
Pyth Lazer
Settle
atomic
L1 commit

First app out the door. Not the last. The primitive is open — keeper market, CPI surface, SDK. If a builder wants to ship a competing exchange on Hwal, they can. That's the point.

07 / Tech

Pure Anchor.
Eight instructions.
Three PDAs.

The whole engine is ~5 KB of Rust. Position is a single PDA delegated to MagicBlock ER. Tick verifies a Pyth Lazer attestation and fires inside the ER. Settlement commits back to L1 atomically.

Accounts
Config
["config"]

admin · fee_receiver · fee_bps · keeper_reward_bps · lifetime counters

LazerFeed
["lazer_feed", feed_id]

lazer_feed_id · channel (1ms/50ms/200ms) · last_price · last_attestation_ts

Position
["position", owner, nonce_le]

side · collateral · entry_price · stop · take_profit · trailing · trailing_extreme · er_delegated · status

Instructions
initialize_config
bootstrap fee / keeper bps
admin
update_config
rotate receiver / fees
admin
register_lazer_feed
register a Pyth Lazer feed id + channel
admin
open_position
deposit collateral, snapshot entry, set triggers, delegate to ER
owner
update_triggers
edit triggers on an open position (inside ER)
owner
tick_position
verify Lazer attestation, advance trailing, fire if hit
anyone (keeper)
commit_to_l1
commit ER state back to L1 atomically on trigger fire
anyone (keeper)
cancel_position
manual close, full collateral refund
owner
Program ID (devnet)
fSLsjTm9PGfbrAgosY2kYb1MnFEpn8LALo5cY5a4AkJ
Roadmap
V0
live · devnet
Mock oracle + L1 keeper loop

End-to-end working primitive on Solana L1: open → tick → take-profit / trailing / stop / cancel. Authority-pushed mock feed for parity testing.

V1
current
Pyth Lazer subscription

Swap mock feed for Pyth Lazer (1ms / 50ms / 200ms channels). Real-time attestation verification on every tick. Mock authority retained as emergency override behind multisig.

V2
shipping
MagicBlock ER delegation

Position PDA delegates to MagicBlock ephemeral rollup on open. tick_position runs inside the ER at 50ms cadence. Settlement commits back to L1 atomically. First Solana primitive on Lazer + ER stack.

08 / Questions builders ask

What integrators want to know.

Honest answers, including where the primitive can't help you.

  • Pyth Lazer는 Pyth Network의 sub-slot oracle 라인. 1ms / 50ms / 200ms 세 채널로 가격 attestation을 쏨. Solana mainnet 활성, CO-PIP-5로 통과. Pyth Core는 슬롯 단위 (~400ms) 라 HFT/sub-slot 트레이딩에 부족. Lazer가 그 자리 메움. Hwal은 Lazer attestation을 받아서 그 즉시 action을 실행하는 첫 솔라나 primitive.

  • Solana L1 슬롯은 ~400ms. Lazer가 1ms로 가격 쏴도 L1에서 react는 400ms 후에나 가능. MagicBlock의 ephemeral rollup은 L1에서 PDA를 delegate 받아 50ms 슬롯에서 실행. Hwal position이 ER로 delegate되면 1ms feed에 50ms react가 가능. ER이 commit하면 L1에 atomically 반영됨.

  • 둘 다 아님. Hwal은 Lazer feed + ER 실행 + L1 settle을 묶는 primitive. swap engine도 orderbook도 매칭 엔진도 없음. Drift / Phoenix / Jupiter 같은 거래소들이 Hwal 위에 stops/conditional execution을 올림. 거래소가 우리 위에 올라타는 거지 우리가 거래소가 아님.

  • 기본 통합은 그렇음. open_position 한 번 부르면 PDA 생성 + ER delegate + Lazer subscription이 한 묶음. tick_position은 permissionless라 본인 protocol이 부를 필요 없음. SDK + IDL 제공해서 client 측에선 typed wrapper 2~3줄.

  • 아무나. tick_position 부르면 그 사람이 collateral의 0.25% 보상 받음. ER 내부 실행이라 MEV searcher들이 자연스럽게 들어옴. 본인 protocol도 자체 keeper 돌릴 수 있고, 우리 reference keeper도 운영함. 한 protocol이 monopoly 가질 수 없음.

  • 솔직히: V0 (devnet baseline) = L1 keeper polling, 약 500-800ms. V1 (current) = Pyth Lazer 1ms / 50ms / 200ms 채널 중 선택. L1 슬롯이 settlement bound라 actual fire-to-settle은 여전히 ~400ms. V2 (shipping) = MagicBlock ER에 delegate되면 ER 내부에서 50ms 슬롯 cadence로 실행, ER commit이 L1 atomically 반영. "1ms" 는 feed precision, "50ms" 는 ER 슬롯, "atomic L1" 은 settlement. 셋 다 다른 단계 측정값.

  • Drift는 Drift positions 안에서만 stop을 다룸. 그것도 Pyth Core 슬롯 cadence라 sub-slot reaction은 없음. 우리는 Lazer + ER 위에서 Drift position에 대한 sub-slot stop도, Phoenix position에 대한 stop도, NFT floor에 대한 자동 listing도 다 같은 primitive로 다룸. 한 protocol이 자기 silo에서 stop 잘해도 cross-protocol + sub-slot composability 안 죽임.

  • Lazer outage 시 mock authority feed로 fallback (V0 코드 그대로 살아있음). ER outage 시 L1-only mode로 fallback (V1 동작 그대로). 즉 한 layer가 죽어도 protocol은 lower-tier에서 계속 돈다. degraded service이지 dead service 아님.

  • MIT. devnet 라이브, mainnet 미배포. V2 (Lazer + ER 통합) 완성 후 audit 받고 그 후 mainnet.

  • TBD. protocol fee (0.5%)를 token holder revenue로 routing하는 구조 검토 중. 토큰 발행 전 product-market fit + 통합 protocol 수 확보 우선. Pyth/Jito 패턴 따라감.

lazer · er · settle · all in one CPI

Build with Hwal.
活 · 一閃.

If your protocol needs real-time conditional execution on Solana, this is the primitive. Pyth Lazer 1ms feed, MagicBlock ER 50ms slot, atomic L1 settle. One CPI call, permissionless keepers, self-custody. Devnet live.

About Hwal

Hwal (活) is the first Solana primitive on Pyth Lazer + MagicBlock ER. 1ms price feed, 50ms slot execution, atomic L1 settle. Any protocol can plug in real-time conditional execution with one CPI call. Use cases include sub-slot perp liquidation, cross-DEX arbitrage on ms-scale spreads, DAO treasury conditional rebalances, and vault auto-claim / auto-exit on yield triggers.

Website: https://hwalbindang-web.vercel.app

Repository: https://github.com/Hwaldev/hwal

X: https://x.com/hwalfun

Solana program (devnet): fSLsjTm9PGfbrAgosY2kYb1MnFEpn8LALo5cY5a4AkJ

Deployed on Solana devnet. Anchor program. The Hwal program exposes a small set of instructions: initialize_config, update_config, register_lazer_feed, open_position, update_triggers, tick_position, commit_to_l1, cancel_position. Other Solana programs integrate Hwal by CPI into open_position (define the trigger, delegate to MagicBlock ER) and rely on the permissionless keeper market to call tick_position inside the ER when conditions are met. Keepers earn 0.25% of position collateral as a reward; the protocol fee receiver earns 0.5%; the position owner receives the remainder. All settlement happens in a single atomic transaction with L1 commit.

Roadmap: V0 (live devnet) uses an authority-pushed mock feed and L1 keeper polling for parity testing. V1 swaps the mock feed for Pyth Lazer subscription on the chosen channel (1ms / 50ms / 200ms). V2 delegates position state to MagicBlock ephemeral rollup for 50ms slot cadence with atomic L1 commit on trigger fire.