Oracles on MagicBlock

MagicBlock provides low‑latency, high‑throughput oracle data by ingesting Pyth Lazer feeds and updating Ephemeral Rollup accounts at 50–200 ms intervals (asset‑dependent).
This Oracle example uses Pyth Lazer, but we can create Oracles for any arbitrary data source.

What Are Onchain Oracles?

Onchain oracles deliver verifiable off‑chain data that programs can trust. Use cases range from asset prices to event outcomes. On Solana, oracles typically keep accounts updated on‑chain. Programs read these accounts directly—no external API calls at execution time. We use Pyth, a widely adopted cross‑chain oracle network.

Why Oracles Matter

  • Finance: liquidations, funding, TWAPs — inaccurate quotes cause loss and risk
  • Games: settle sports results; sync in‑game state with real‑world events
  • Composability: reliable, on‑chain data enables secure program composition
Accuracy and latency directly impact correctness, safety, and UX.

Oracles on MagicBlock

MagicBlock follows the standard oracle pattern—writing data into composable on‑chain accounts—while updating at 50–200 ms (asset‑dependent) versus ~400 ms on Solana slots. This latency profile is well‑suited for liquidations, copy‑trading, and other time‑sensitive flows.

The two pieces of an oracle

  • Data Source: The upstream truth. We can ingest arbitrary on/off‑chain feeds to surface assets Pyth doesn’t cover (e.g., new PumpFun or Raydium R‑tokens) into Ephemeral Rollups.
  • Chain Pusher: Processes the source feed and writes updates on‑chain. MagicBlock’s chain pusher will be open‑sourced.

Flow

  1. Receive Pyth Lazer updates at fixed intervals (50 ms or 200 ms by asset).
  2. Push updates to predefined on‑chain accounts.
  3. Programs read the relevant account directly.
These public RPC endpoints are currently free and supported for development:
Magic Router Devnet: https://devnet-router.magicblock.app
Solana Devnet: https://api.devnet.solana.com
ER Devnet: https://devnet.magicblock.app
TEE Devnet (test): https://tee.magicblock.app/