Switchboard
Overview
Switchboard is a customizable and permissionless oracle provider integrated with the Atlas testnet. Key features of Switchboard include:
- Highly Customisable Data Feeds: Create custom data feeds with control over update intervals, data weighting, pricing, and input sources.
- Permissionless Data Feed Creation: Deploy new data feeds instantly without third-party approval. Need a specific feed? Create it yourself!
- On-Demand Oracles: Fetch data only when needed, significantly reducing latency and costs.
- Oracle Aggregator: Access aggregated data from multiple sources for optimal pricing and redundancy.
- Speed: Updates delivered in ~400ms.
Additional information on Switchboard can be found in their documentation here.
Available price feeds
Adding new price feeds is permissionless. Any data feed can be created using the Switchboard oracle on Atlas. Follow the instructions here on the official Switchboard documentation page to get started.
Integrating the Switchboard oracle
On Atlas, the Switchboard Program ID is as follows:
Network | Program ID |
---|---|
Atlas Testnet | SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv |
Begin with the process outlined in
“Integrating your Feed”
on the Switchboard documentation page. When calling fetchUpdateIx
, include the
network
and chain
settings as parameters. This will route the requests to
the appropriate Switchboard oracles and map the data back to the target chain
(Atlas).
const provider = ...
// Load the Switchboard program
const program = await anchor.Program.at(
"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv",
provider
);
// Get the Pull Feed - (pass in the feed pubkey)
const pullFeed = new PullFeed(program, new PublicKey(...));
// Get the update for the pull feed
const [pullIx, responses, _, luts] = await pullFeed.fetchUpdateIx({
crossbarClient: crossbar,
chain: "atlas",
network: "testnet",
});