Repository inventory

magicblock-labs/magicblock-dev-skill

Skills indexed from this repository, with install-style signals scoped to the repo.
1 skills4 GitHub stars0 weekly installsShellGitHubOwner profile

Overview

This skill describes MagicBlock Ephemeral Rollups development patterns for Solana, focusing on delegation flows, dual-connection architecture, cranks, VRF, and TypeScript/Anchor integration. It explains how to get high-throughput, low-latency transactions for gaming and real-time apps by temporarily delegating account ownership to an ephemeral rollup. The guidance is opinionated and practical, with concrete defaults for stacks and runtime behavior.

How this skill works

Ephemeral rollups let you delegate Solana accounts to a MagicBlock rollup so operations run at ~10–50ms instead of the base layer ~400ms. Use a dual-connection approach: a base-layer connection for initialization and delegation operations, and an ephemeral-rollup connection for actions on delegated accounts, commits, and undelegation. Patterns include explicit delegation checks, PDA seed alignment, skipPreflight for ER transactions, cranks for scheduled tasks, and VRF for provable randomness.

When to use it

  • Building high-performance multiplayer games or real-time financial apps that need low-latency state updates
  • When you need bursty, high-throughput transactions that would be slow on the Solana base layer
  • Implementing recurring automated workflows (cranks) that must run reliably on a schedule
  • Integrating provable randomness (VRF) for fair in-game events, lotteries, or randomness-dependent logic
  • When you can accept temporary delegation of account authority to a trusted rollup runtime

Best practices

  • Always choose the connection based on operation type: base-layer for delegation/init, ER for on-delegate ops and commits
  • Verify delegation status and PDA seeds before sending operations to the rollup to avoid mismatches
  • Use skipPreflight: true for ER transactions and wait for state propagation after delegate/undelegate
  • Keep delegation lifecycles explicit: delegate → operate → commit → undelegate, with clear retry/reconciliation rules
  • Provide clear deliverables: changed files + diffs, build/test commands, and risk notes for delegation/signing changes

Example use cases

  • Multiplayer battle game where player account updates need sub-50ms latency for responsive interactions
  • Real-time order matching or market-making that requires high transaction throughput
  • Scheduled in-game reward distribution using cranks to run automated payouts
  • Provably fair loot drops or lottery draws using VRF integrated with the rollup
  • Migration flow: initialize account on base layer, delegate for live play, then commit and undelegate for settlement

FAQ

Yes. Use Anchor with ephemeral-rollups-sdk and apply macros like #[ephemeral], #[delegate], and #[commit] where appropriate.

Which RPC endpoints should I use?

Use the base-layer RPC (e.g., https://api.devnet.solana.com or mainnet endpoints) for delegation/init and the ephemeral-rollup endpoint (e.g., https://devnet.magicblock.app/) for delegated operations.

1 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational