Skip to main content

Data

The Hifi protocol stores user data and emits events on the blockchain. Querying these data is not quick and easy by default. There are two ways you can go about it:

  1. Use Multicall to batch multiple constant function calls.
  2. Source the data from our subgraphs.

We're using the first approach to feed data to the Hifi Interface. The second approach is documented below.

Subgraphs

The Graph is a service that indexes events emitted on the blockchain and serves them via a high-throughput GraphQL server. This server is called a "subgraph".

Hifi is deployed on Ethereum Mainnet, as documented in the previous section Network Addresses. We are maintaining a subgraph for each network:

NetworkLink
Ethereum Mainnethttps://thegraph.com/hosted-service/subgraph/hifi-finance/hifi

To see the schemas and some example GraphQL queries, head to this GitHub repo:

GitHub - hifi-finance/hifi-subgraph: Subgraph for the Hifi fixed-rate, fixed-term lending protocolGitHub