Hwal 刹那
On-chain trigger primitive for Solana. Built on Pyth Lazer + MagicBlock ER. Plug the 1ms reflex into any protocol with one CPI call.
The problem
Every Solana protocol that needs real-time conditional execution wires three things by hand: a sub-slot price feed (Pyth Core is ~400ms slot, too slow), a sub-slot execution environment (L1 is 400ms slot), and an atomic L1 settlement path. Each silos this plumbing inside its own program. The result: every protocol that touches price ends up writing the same keeper bot + RPC poller + settlement contract from scratch.
The pattern repeats:
- Price moves through your trigger.
- Keeper polls an RPC, observes the cross, decides to fire.
- L1 includes the keeper's tx ~400 ms later.
- Market has moved again. Your fill is worse than your trigger.
The solution
Hwal weaves Pyth Lazer + MagicBlock ER + Solana L1 into one primitive. Position PDA delegates to the MagicBlock ephemeral rollup on open. Inside the ER, Pyth Lazer feeds attestations every millisecond at the chosen channel (1ms / 50ms / 200ms). Trigger evaluation runs at 50ms slot cadence. When a trigger fires, the same atomic transaction settles fee, keeper reward, and net collateral, and commits back to Solana L1.
Architecture
One Anchor program, three PDA account types, eight instructions. No keeper monopoly, no custodial vault.
- Program Native Anchor program, compiled to Solana SBF
- Accounts
Config,LazerFeed,Position - Instructions
open_position,update_triggers,tick_position,commit_to_l1,cancel_position, plus admin and feed registration - Events 9 events for off-chain indexers and live feed UIs
Who uses this
Any Solana protocol that needs sub-slot conditional execution. Perp DEXes adding sub-slot liquidation. Spot trading UIs adding take-profit / stop-loss with on-chain custody. Cross-DEX arbitrage routers catching ms-spread spreads. DAO treasuries executing conditional rebalances. Vaults running conditional auto-claim / auto-exit.
Continue
Quick deploy
Three commands. Windows native or WSL.
anchor build
anchor deploy --provider.cluster devnet
npx ts-node scripts/setup-devnet.ts