The stack
| Layer | Technology |
|---|---|
| Blockchain | Solana |
| Smart contract framework | Anchor 0.31.1 |
| Frontend | Next.js + TypeScript |
| Oracle transport | NATS with JetStream |
| Client SDK generation | Codama (from Anchor IDLs) |
| Off-chain venue integration | CCXT (Bybit live; others in progress) |
| Off-chain engine | Rust (HyroTrader core engine) |
| Wallet — pro users | Phantom (self-custody) |
| Wallet — retail | Embedded (email signup, auto-generated Solana wallet via Privy / Dynamic) |
| Settlement currency | USDC (SPL) |
| Gas | Sponsored by Hyro — users never need SOL |
| Audit | Ackee Blockchain |
The dual-wallet UX
Email-based account creation produces a Solana wallet automatically — no extension, removing onboarding friction for retail traders coming from CeFi. Sophisticated managers use Phantom for full self-custody. Users can export keys or migrate to Phantom at any time. Gas sponsorship is a fractional-cent operational cost on Solana that meaningfully improves UX.On-chain vs. off-chain
On-chain (Solana)
Vault state · authorization (policy programs) · fee calculation · share accounting · LP deposits/withdrawals · payout records · challenge-fee collection
Off-chain
Trade execution (Bybit order books) · the Rust risk engine · NAV computation, which the oracle writes back on-chain
How the layers connect
The core program (hyro_protocol) holds vault state and orchestrates two pluggable layers over CPI:
- Authorization — every privileged instruction issues a
validate(ValidateOperation)CPI into the vault’s policy. - Fee calculation — every fund movement issues a
charge_feesCPI to the fee dispatcher, which delegates arithmetic to a calculator.
policy_program and fee_collection_program, and both are swappable.
Program topology
How the on-chain programs connect, instruction by instruction.