Merkle feeds provide a secure and efficient “pull oracle” model for accessing option prices and other financial data on Starknet.
The Pragma Consumer SDK is a powerful tool that allows developers to interact with Pragma’s Merkle Feed system.
This SDK enables you to fetch option prices and their associated Merkle proofs, which you can then use with the Pragma Oracle contract to access on-chain data.
A Merkle Feed is an efficient way to publish and verify large amounts of data on-chain while minimizing gas costs.
In Pragma’s case, we publish a Merkle root on-chain that represents a tree of option prices for a specific blockchain height. Users can then use our SDK to retrieve prices off-chain and verify their correctness on-chain, creating a secure and efficient “pull oracle” model.
If you are just trying to get started with our Options Data Feed, see this self-contained code snippet here. The full Oracle interface specification is available here.