You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/pages/en/subgraphs/existing-subgraphs/standard-subgraphs.mdx
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Standardized Subgraphs
4
4
5
5
## Overview
6
6
7
-
**Standardized Subgraphs** are a family of open, reusable GraphQL schemas that normalize on-chain data across every protocol of the same type. Rather than each protocol exposing its own bespoke schema with its own terminology, every Subgraph built to a standard exposes the *same* entities, fields, and metrics, so a single set of queries works across all of them.
7
+
**Standardized Subgraphs** are a family of open, reusable GraphQL schemas that normalize on-chain data across every protocol of the same type. Rather than each protocol exposing its own bespoke schema with its own terminology, every Subgraph built to a standard exposes the _same_ entities, fields, and metrics, so a single set of queries works across all of them.
8
8
9
9
The most widely adopted set of these schemas was created by [Messari](https://messari.io/), the core subgraph dev that builds and maintains standardized schemas for the major DeFi and web3 protocol categories on top of The Graph. Each schema extracts raw blockchain data and transforms it into meaningful, comparable metrics for products and analytics.
10
10
@@ -20,35 +20,35 @@ The most widely adopted set of these schemas was created by [Messari](https://me
20
20
21
21
**Predictable versioning.** Schemas follow [semantic versioning](https://semver.org/) strictly, and each Subgraph embeds three separate version fields on its `Protocol` entity so different stakeholders can track what they care about:
|`schemaVersion`| Data consumers| Which version of the shared schema the Subgraph implements; signals breaking changes. |
26
-
|`subgraphVersion`| subgraph developers | The implementation version; refactors bump this with no impact on consumers.|
27
-
|`methodologyVersion`| Data consumers | How metrics are calculated, so consumers can diff against methodology changes.|
23
+
| Field | Who it's for | What it tracks |
24
+
| --- | --- | --- |
25
+
|`schemaVersion`| Data consumers | Which version of the shared schema the Subgraph implements; signals breaking changes. |
26
+
|`subgraphVersion`| subgraph developers | The implementation version; refactors bump this with no impact on consumers. |
27
+
|`methodologyVersion`| Data consumers | How metrics are calculated, so consumers can diff against methodology changes. |
28
28
29
29
## The Schemas
30
30
31
31
The standardized schemas each cover one protocol category. Every schema shares a common backbone (`Token`, `Protocol`, pools or markets, daily and hourly snapshots for time-series data, and standardized revenue and usage metrics) while adding the entities specific to its domain.
|**Generic**| 3.0.0| The base template that all schemas build on. Defines `Token`, `Protocol`, `Pool`, `Account`, and the standard usage and financial snapshots. A good fit for protocols that don't map cleanly onto a more specific category. |
36
-
|**DEX AMM**| 1.3.2| Automated market maker exchanges. Models `LiquidityPool`, `Swap`, `Deposit`, and `Withdraw` events, pool fees, and reward tokens. |
37
-
|**DEX AMM (Extended)**| 4.0.1| AMMs with concentrated liquidity (e.g. Uniswap v3). Adds `Tick`, `Position`, and `PositionSnapshot` entities on top of the DEX AMM model. |
38
-
|**DEX Aggregator**| 1.0.2| Trade aggregators that route across venues. Models `VirtualPool`, per-token daily snapshots, and `Swap` activity. |
39
-
|**Lending / CDP**| 3.1.0| Lending, borrowing, and collateralized debt position protocols. Models `Market`, `Position`, `InterestRate`, and the full set of lending events: `Deposit`, `Withdraw`, `Borrow`, `Repay`, `Liquidate`, `Transfer`, and `Flashloan`. |
40
-
|**Yield Aggregator**| 1.3.1| Vaults and yield optimizers. Models `Vault`, `VaultFee`, `Deposit`, and `Withdraw`, with reward-token accounting. |
41
-
|**NFT Marketplace**| 2.1.0| NFT trading venues. Models `Marketplace`, `Collection`, and `Trade`, with support for multiple NFT standards and sale strategies. |
42
-
|**Network**| 1.2.0| Layer-1 and layer-2 chain-level metrics. Models `Block`, `Author`, and `Chunk` with network-wide daily and hourly stats. |
43
-
|**Bridge**| 1.2.0| Cross-chain bridges. Models `Pool`, `PoolRoute`, `CrosschainToken`, `BridgeTransfer`, and `BridgeMessage` to track liquidity and value moving across chains. |
33
+
| Schema | Version | What it covers |
34
+
| --- | --- | --- |
35
+
|**Generic**| 3.0.0 | The base template that all schemas build on. Defines `Token`, `Protocol`, `Pool`, `Account`, and the standard usage and financial snapshots. A good fit for protocols that don't map cleanly onto a more specific category. |
36
+
|**DEX AMM**| 1.3.2 | Automated market maker exchanges. Models `LiquidityPool`, `Swap`, `Deposit`, and `Withdraw` events, pool fees, and reward tokens. |
37
+
|**DEX AMM (Extended)**| 4.0.1 | AMMs with concentrated liquidity (e.g. Uniswap v3). Adds `Tick`, `Position`, and `PositionSnapshot` entities on top of the DEX AMM model. |
38
+
|**DEX Aggregator**| 1.0.2 | Trade aggregators that route across venues. Models `VirtualPool`, per-token daily snapshots, and `Swap` activity. |
39
+
|**Lending / CDP**| 3.1.0 | Lending, borrowing, and collateralized debt position protocols. Models `Market`, `Position`, `InterestRate`, and the full set of lending events: `Deposit`, `Withdraw`, `Borrow`, `Repay`, `Liquidate`, `Transfer`, and `Flashloan`. |
40
+
|**Yield Aggregator**| 1.3.1 | Vaults and yield optimizers. Models `Vault`, `VaultFee`, `Deposit`, and `Withdraw`, with reward-token accounting. |
41
+
|**NFT Marketplace**| 2.1.0 | NFT trading venues. Models `Marketplace`, `Collection`, and `Trade`, with support for multiple NFT standards and sale strategies. |
42
+
|**Network**| 1.2.0 | Layer-1 and layer-2 chain-level metrics. Models `Block`, `Author`, and `Chunk` with network-wide daily and hourly stats. |
43
+
|**Bridge**| 1.2.0 | Cross-chain bridges. Models `Pool`, `PoolRoute`, `CrosschainToken`, `BridgeTransfer`, and `BridgeMessage` to track liquidity and value moving across chains. |
44
44
|**Derivatives (Perpetual Futures)**| 1.3.4 | Perpetual futures venues. Models `LiquidityPool`, `Position`, `CollateralIn` and `CollateralOut`, `Borrow`, `Swap`, and `Liquidate`. |
45
-
|**Derivatives (Options)**| 1.3.2 | On-chain options protocols. Models `LiquidityPool`, `Position`, and `Option`, with call and put option typing. |
45
+
|**Derivatives (Options)**| 1.3.2 | On-chain options protocols. Models `LiquidityPool`, `Position`, and `Option`, with call and put option typing. |
46
46
47
47
## Shared Design Principles
48
48
49
49
Because the schemas are meant to be consumed the same way regardless of protocol, they follow a consistent set of conventions.
50
50
51
-
**Three ways to read quantitative data.** You can query an entity directly for *real-time* values (e.g. `totalValueLockedUSD` on a `Pool`), use [time-travel queries](https://thegraph.com/docs/en/subgraphs/querying/graphql-api/#time-travel-queries) for *point-in-time* historical values, or query the snapshot entities for *time-series* data (e.g. `PoolDailySnapshot`).
51
+
**Three ways to read quantitative data.** You can query an entity directly for _real-time_ values (e.g. `totalValueLockedUSD` on a `Pool`), use [time-travel queries](https://thegraph.com/docs/en/subgraphs/querying/graphql-api/#time-travel-queries) for _point-in-time_ historical values, or query the snapshot entities for _time-series_ data (e.g. `PoolDailySnapshot`).
52
52
53
53
**Standardized financial metrics.** Revenue is split consistently across every schema:
Copy file name to clipboardExpand all lines: website/src/pages/en/substreams/providers/the-graph-market.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,13 +49,13 @@ Replace `<YOUR-JWT-TOKEN>` with the API token you copied from The Graph Market.
49
49
50
50
Substreams runs against a provider endpoint for your target network, passed to the CLI with the `-e` flag. Endpoints follow the pattern `{network}.{provider}.io:443`. A few examples:
> Note: Select your network on The Graph Market to see the providers and endpoints available for it. For the full, up-to-date list, see [Chains & Endpoints](https://docs.substreams.dev/reference-material/chain-support/chains-and-endpoints) on the Substreams docs.
Copy file name to clipboardExpand all lines: website/src/pages/en/substreams/public-substreams/substreams-dev.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,12 +24,12 @@ The goal of this page is to help **data consumers** answer a single question: _"
24
24
25
25
Substreams.dev is organized into four primary areas, each answering a different discovery question. The sections below walk through each one in the order you'd typically use them.
26
26
27
-
| Area | Discovery question it answers |
28
-
| --- | --- |
29
-
|**Datasets**| "What kind of data am I looking for?" (browse by use case) |
0 commit comments