Complete guide for MagicBlock Ephemeral Rollups - high-performance Solana execution with sub-10ms latency, gasless transactions, and Solana Plugins. Use when building real-time games, high-frequency trading, or any application requiring ultra-low latency on Solana.
>_
Quick Install
npxskills add sendaifun/skills--skill magicblock
Instructions
Loading…
Tags & Topics
claude-codeclaude-skillsclaudecodeskillssolana
MagicBlock Ephemeral Rollups Guide
A comprehensive guide for building high-performance Solana applications with MagicBlock Ephemeral Rollups - enabling sub-10ms latency and gasless transactions.
Overview
MagicBlock Ephemeral Rollups (ER) are specialized SVM runtimes that enhance Solana with:
Sub-10ms latency (vs ~400ms on base Solana)
Gasless transactions for seamless UX
Full composability with existing Solana programs
Horizontal scaling via on-demand rollups
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Your Application │
├─────────────────────────────────────────────────────────────┤
│ Base Layer (Solana) │ Ephemeral Rollup (ER) │
│ - Initialize accounts │ - Execute operations │
│ - Delegate accounts │ - Process at ~10-50ms │
│ - Final state commits │ - Zero gas fees │
│ - ~400ms finality │ - Commit state to Solana │
└─────────────────────────────────────────────────────────────┘
Core Flow
Initialize - Create accounts on Solana base layer
Delegate - Transfer account ownership to delegation program
Maintain separate connections for base layer and ER
Use skipPreflight: true for all ER transactions
Verify delegation status before sending to ER
Use AccountInfo for delegated accounts in Rust
Match PDA seeds exactly between Rust and TypeScript
DON'T:
Send delegated account operations to base layer
Mix base layer and ER operations in single transaction
Assume account ownership without checking
Skip commitment verification before base layer reads
Products
Product
Description
Ephemeral Rollup (ER)
High-performance, gasless transactions
Private ER (PER)
Privacy-preserving computation with Intel TDX
VRF
Verifiable random function for on-chain randomness
BOLT Framework
ECS architecture for fully on-chain games
Solana Plugins
App-specific extensions for enhanced capabilities
Solana Plugins (New)
Solana Plugins are modular capabilities that can be added to your dApp to extend what's possible on Solana. Think of them as your custom toolkit: plug in what you need, when you need it.
Available Plugins
Plugin
Description
Use Cases
Verifiable Randomness (VRF)
Provably fair on-chain randomness
Games, lotteries, NFT drops
Real-Time Price Feeds
Up-to-the-millisecond market data
DEXs, trading bots, DeFi
AI Oracles
Call AI models directly from smart contracts
Dynamic NFTs, AI agents
Using VRF Plugin
import { requestRandomness, getRandomnessResult } from "@magicblock-labs/vrf-sdk";
// Request randomness
const requestTx = await requestRandomness({
payer: wallet.publicKey,
seed: Buffer.from("my_game_seed"),
});
// Get result after confirmation
const result = await getRandomnessResult(requestId);
console.log("Random value:", result.randomness);
Privacy with Intel TDX
MagicBlock enables privacy in any Solana program state account through Ephemeral Rollups running in Trusted Execution Environments (TEE) on Intel TDX. This allows: