Switchboard Documentation

website·Indexed 34 days ago

https://docs.switchboard.xyz

A permissionless oracle platform for bringing customizable real-world data on-chain. Documentation covers price feeds, verifiable randomness, and X402 micropayments across multiple ecosystems including Solana/SVM, EVM (Ethereum, Monad, Hyperliquid), Sui, Aptos, Iota, and Movement. Includes technical guides on the Quote Verifier pattern, Surge price feeds for high-frequency data, and tutorials for building custom data feeds.

Tokens
78.4K
Snippets
378
Records
531
Agent score
66%

What's inside Switchboard

  1. Overview of the Surge Gateway Protocol

    The Surge Gateway Protocol allows clients to receive low-latency price streaming via the Crossbar gateway. This is primarily used for non-JS clients (Rust, Go, Python), custom infrastructure, or load-testing. To use the protocol, a Solana public key must have an active on-chain Surge subscription paid in SWTCH tokens; otherwise, session requests will fail.
  2. Overview of Switchboard Randomness

    Switchboard provides a verifiable source of randomness for blockchain applications (such as gaming, NFT mints, and lotteries) to overcome the deterministic nature of blockchains. It uses Trusted Execution Environments (TEEs)—protected areas within a CPU—to ensure that neither the oracle operator nor any other party can alter the code or inspect the internal state of the randomness generation process. To ensure reliability, oracle operators are required to stake $SWTCH, which can be slashed in the event of downtime or withheld results.
  3. Overview of Switchboard Crossbar

    Switchboard Crossbar is a tool used to operate and manage feeds. Its primary purposes include:

    • Simulating feeds for QA before deployment.
    • Storing and pinning feed definitions to obtain a feedId.
    • Running the v2 feed-hash flow for current EVM custom feeds.
    • Fetching chain-specific update payloads (instructions/bytes).
    • Powering high-throughput bot and UI backends.
  4. Overview of Switchboard Oracle Protocol

    Switchboard is a permissionless data provider used to bring on-chain data for DeFi projects. It is designed for high-speed updates, low cost, and flexibility. Key capabilities include:

    • Low Latency Updates: Offers latencies of 2-5ms via Surge or 400ms via standard oracles.
    • On-Demand Feeds: Reduces costs and latency by creating and using feeds only when needed, rather than constant streaming.
    • Permissionless Deployment: Allows developers to deploy new data feeds from any on-chain or off-chain source without requiring manual approval or contracts.
    • Security via TEEs: Uses Trusted Execution Environments (TEEs) to ensure that data and code are protected from alteration, exposure, or frontrunning by node operators.
  5. Overview of X402 for Paywalled Oracle Data

    X402 enables Switchboard oracles to access paywalled HTTP APIs (e.g., premium RPC endpoints, institutional data) by using micropayments. It solves the problem of oracles being unable to hold funds or store static API keys by allowing the user to provide a PAYMENT-SIGNATURE header at runtime. This header authorizes a USDC payment without exposing the user's private credentials to the oracle or requiring the oracle to hold funds.
  6. Overview of Switchboard Oracle Staking

    Oracle operators in the Switchboard network are required to have svSWTCH delegated to them to participate. This 'skin in the game' model aligns incentives with network security and data reliability. Enabling staking allows operators to earn SWTCH rewards from network fees and subsidies, gain a competitive advantage for more work opportunities, and earn performance bonuses for high uptime and accuracy.
  7. Overview of X402 Micropayments with Switchboard

    X402 is a micropayment protocol on Solana (named after the HTTP 402 'Payment Required' status code) that enables pay-per-request access to premium data sources. By integrating X402 with Switchboard, developers can access paywalled APIs and RPC endpoints directly from oracle jobs, paying only for the data consumed via immediate USDC micropayments. This removes the need for subscriptions or upfront commitments. A Solana keypair funded with USDC on mainnet-beta (including a USDC associated token account) is required to generate the necessary PAYMENT-SIGNATURE headers.
  8. Overview of Switchboard On-Demand for Sui

    Switchboard provides on-demand oracle data for Sui Move contracts utilizing the Quote Verifier pattern. This allows DeFi applications to access verified, real-time price data with integrated security features. To use these services, developers need the Sui CLI, Node.js 21+, npm, and a basic understanding of Move and TypeScript.
  9. Overview of the Switchboard Protocol

    The Switchboard Protocol is a decentralized oracle network that provides blockchain applications with secure real-world data. It uses a network of independent oracle operators running in Trusted Execution Environments (TEEs) to fetch, verify, and deliver data on-chain. The security model combines cryptographic verification (TEE protection) with economic incentives (staking and slashing) to ensure data integrity and prevent manipulation.
  10. Overview of Switchboard Surge Price Feeds

    Switchboard Surge is a high-frequency oracle data delivery system designed for DeFi applications, trading systems, and real-time dashboards. It achieves sub-100ms latency by streaming price data directly from verified oracles to applications via WebSockets, bypassing the traditional blockchain consensus delay (which typically takes 2-10 seconds). Key features include zero on-chain setup for receiving data, subscription-based pricing, and support for TypeScript/JavaScript and various blockchain targets (Solana, EVM, Sui).
  11. Overview of Crossbar Utility Server

    Crossbar is a high-performance utility server implemented in Rust designed to simplify interactions with the Switchboard network. It provides essential functionalities for simulating and resolving feeds across various blockchains, IPFS utilities for storing and fetching jobs, and built-in simulation capabilities for liquidators and bots. The Rust version integrates simulation directly, removing the need for a separate Task Runner Simulator service.