Subgraphs

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom." — Clifford Stoll

All the core smart contracts emit various Blockchain Events which are recorded and collated/aggregated within the subgraphs, developed using The Graph framework. This allows for off-chain access of market and governance data using the GraphQL syntax.

The subgraphs are namespaced using the convention OptSwapDAO*, where * is the name of the blockchain network that this particular graph is indexing.

Subgraph Latencies

Note that subgraphs may have a slight latency associated with indexing the blockchain events before they are queryable. The latencies are caused by various factors, including RPC endpoint response delays, event data processing time, database writing & indexing time and subgraph query processing and response time.

Latencies may range from a few milliseconds to several seconds depending on network conditions, server load and availability. Clients must always validate the freshness of the response data by comparing the timestamps or block numbers of any data they are querying against the latest timestamp or block number from an independent node or RPC endpoint.

To reduce latency, consider deploying your own OptSwap subgraph locally, using your own local nodes and local RPC endpoints for the networks you are interested in. TODO -- deploying your own OptSwap subgraph node

Last updated