Running Crossbar

A tutorial on the Switchboard utility server for simulation and resolving feeds.

Official images are published at:

Crossbar is a useful utility service for interacting with the Switchboard network. It comes loaded with utility functions for resolving feeds on all chains with active Switchboard deployments, IPFS utilities for storing and fetching jobs, and a simulator for constantly fetching feed updates for liquidators and other bots.

The goal with Crossbar is to make Switchboard as easy to use as possible.

Crossbar's features:

  • Fetch feeds by feed hash: Given a feedHash, a content identifier for a feed, you can pull in a feed's job definitions and queue in JSON.

  • Store jobs: Given a feed definition and queue public key, you can store feeds using your configured IPFS node. Note: this will only work if you have Piñata credentials passed in (or a Kubo node).

  • Simulate feeds by feed hash: You can simulate a number of feeds with a set of feedHashes. This is a useful tool for tracking custom price feeds off-chain for triggering some action with bots.

Solana-specific features:

  • Fetch encoded update instructions: Using a set of Solana feed public keys, you can fetch the relevant update instructions from the live set of oracles (on devnet and mainnet).

  • Fetch simulated results for feeds: Due to the intense rate-limiting of oracle node requests, it makes sense to use crossbar for fetching current prices. It runs the same task-runner internally, and you can constantly stream data from it since it'll be running on your very own instance.

Ethereum Virtual Machine (EVM) features:

  • Fetch an encoded update: Using crossbar you can pull an encoded update for a feed to submit on-chain. This is useful for frontends in which you may not want to bring feed definitions to interact with oracles directly. It's also useful for individuals that want to run feed updates via a contract explorer (like Etherscan).

  • Settle randomness: If a user has requested randomness using the Switchboard EVM Randomness features, a settlement message can be fetched off-chain with crossbar.

Public Instance of Crossbar

Switchboard oracles are heavily rate-limited by IP address, so it's recommended users run their own instance. For quick testing and easy oracle job submissions there is a public instance of crossbar available at:

https://crossbar.switchboard.xyz

Last updated