🧙♂

How to add a custom oracle?

Vyper OTC allows you to add any custom oracle from either Pyth or Switchboard as underlying of your trade during the creation phase. This feature is currently active only on devnet.

Pyth

To add a custom Pyth oracle head over to the Price Feeds section of the Pyth website. Make sure that the network is set to devnet.
From here you can select any oracle. Let's assume you want to trade ACM/USD. Once you select it scroll to the bottom and you should see the details. Copy the Price address from there
You can now paste that address back in the create page. The UI will load some information and then you can continue to select the other parameters.

Switcboard

To add a custom Switchboard oracle head over to the Explorer section of the Switchboard website. Make sure that the network is set to Solana Devnet.
From here you can select any oracle. Let's assume you want to trade XTZ_USD. Once you select it you should see the details page. Copy the Feed Address from there
You can now paste that address back in the create page. The UI will load some information and then you can continue to select the other parameters.

PLEASE NOTE

When using external oracles there is an added risk in the form of oracle reliability. In particular, while Pyth oracles are free to consume and can generally be assumed to be update frequently, Switchboard oracles can be community maintained with the following added risks:
  • If the oracle is editable, the Edit authority might change some parts of the definition, resulting in a material change in the oracle
  • If the oracle does not have sufficient balance, the network may stop updating it, resulting in a stale price feed
You can also check here an article by Switchboard on Data Feed best practices, that the owner of the oracle you selected may not have implemented.
Last modified 2mo ago