diff --git a/nginx.conf b/nginx.conf index 4e83c831d7b2..4bb40a26fa07 100644 --- a/nginx.conf +++ b/nginx.conf @@ -82,7 +82,7 @@ http { rewrite ^/docs/en/cookbook/transfer-to-the-graph/$ $scheme://$http_host/docs/en/subgraphs/best-practices/transfer-to-the-graph/ permanent; rewrite ^/docs/en/subgraphs/cookbook/near/$ $scheme://$http_host/docs/en/supported-networks/ permanent; rewrite ^/docs/en/curating/$ $scheme://$http_host/docs/en/subgraphs/developing/curating/ permanent; - rewrite ^/docs/en/delegating/$ $scheme://$http_host/docs/en/resources/delegating/delegating/ permanent; + rewrite ^/docs/en/delegating/$ $scheme://$http_host/docs/en/resources/delegating/ permanent; rewrite ^/docs/en/deploying/deploy-using-subgraph-studio/$ $scheme://$http_host/docs/en/subgraphs/developing/deploying-publishing/using-subgraph-studio/ permanent; rewrite ^/docs/en/deploying/deploying-a-subgraph-to-studio/$ $scheme://$http_host/docs/en/subgraphs/developing/deploying-publishing/using-subgraph-studio/ permanent; rewrite ^/docs/en/deploying/multiple-networks/$ $scheme://$http_host/docs/en/subgraphs/developing/deploying-publishing/multiple-networks/ permanent; @@ -103,7 +103,7 @@ http { rewrite ^/docs/en/developing/graph-ts/CHANGELOG/$ $scheme://$http_host/docs/en/subgraphs/developing/creating/graph-ts/CHANGELOG/ permanent; rewrite ^/docs/en/developing/graph-ts/common-issues/$ $scheme://$http_host/docs/en/subgraphs/developing/creating/graph-ts/common-issues/ permanent; rewrite ^/docs/en/developing/graph-ts/README/$ $scheme://$http_host/docs/en/subgraphs/developing/creating/graph-ts/README/ permanent; - rewrite ^/docs/en/developing/substreams-powered-subgraphs-faq/$ $scheme://$http_host/docs/en/substreams/sps/faq/ permanent; + rewrite ^/docs/en/developing/substreams-powered-subgraphs-faq/$ $scheme://$http_host/docs/en/substreams/overview/ permanent; rewrite ^/docs/en/developing/supported-networks/$ $scheme://$http_host/docs/en/supported-networks/ permanent; rewrite ^/docs/en/developing/unit-testing-framework/$ $scheme://$http_host/docs/en/subgraphs/tooling/unit-testing-framework/ permanent; rewrite ^/docs/en/explorer/$ $scheme://$http_host/docs/en/subgraphs/existing-subgraphs/explorer/ permanent; @@ -117,7 +117,7 @@ http { rewrite ^/docs/en/network/benefits/$ $scheme://$http_host/docs/en/subgraphs/best-practices/benefits/ permanent; rewrite ^/docs/en/network/contracts/$ $scheme://$http_host/docs/en/contracts/ permanent; rewrite ^/docs/en/network/curating/$ $scheme://$http_host/docs/en/subgraphs/developing/curating/ permanent; - rewrite ^/docs/en/network/delegating/$ $scheme://$http_host/docs/en/resources/delegating/delegating/ permanent; + rewrite ^/docs/en/network/delegating/$ $scheme://$http_host/docs/en/resources/delegating/ permanent; rewrite ^/docs/en/network/developing/$ $scheme://$http_host/docs/en/subgraphs/developing/introduction/ permanent; rewrite ^/docs/en/network/explorer/$ $scheme://$http_host/docs/en/subgraphs/existing-subgraphs/explorer/ permanent; rewrite ^/docs/en/network/indexing/$ $scheme://$http_host/docs/en/indexing/overview/ permanent; @@ -135,8 +135,8 @@ http { rewrite ^/docs/en/querying/querying-the-graph/$ $scheme://$http_host/docs/en/subgraphs/querying/introduction/ permanent; rewrite ^/docs/en/querying/querying-with-python/$ $scheme://$http_host/docs/en/subgraphs/querying/python/ permanent; rewrite ^/docs/en/quick-start/$ $scheme://$http_host/docs/en/subgraphs/quick-start/ permanent; - rewrite ^/docs/en/sps/sps-faq/$ $scheme://$http_host/docs/en/substreams/sps/faq/ permanent; - rewrite ^/docs/en/sps/(.*)$ $scheme://$http_host/docs/en/substreams/sps/$1 permanent; + rewrite ^/docs/en/sps/sps-faq/$ $scheme://$http_host/docs/en/substreams/overview/ permanent; + rewrite ^/docs/en/sps/.*$ $scheme://$http_host/docs/en/substreams/overview/ permanent; rewrite ^/docs/en/studio/billing/$ $scheme://$http_host/docs/en/subgraphs/providers/subgraph-studio/introduction/ permanent; rewrite ^/docs/en/studio/deploy-subgraph-studio/$ $scheme://$http_host/docs/en/subgraphs/developing/deploying-publishing/using-subgraph-studio/ permanent; rewrite ^/docs/en/studio/managing-api-keys/$ $scheme://$http_host/docs/en/subgraphs/providers/subgraph-studio/managing-api-keys/ permanent; @@ -147,7 +147,7 @@ http { rewrite ^/docs/en/subgraphs/$ $scheme://$http_host/docs/en/subgraphs/overview/ permanent; rewrite ^/docs/en/substreams/$ $scheme://$http_host/docs/en/substreams/quick-start/ permanent; rewrite ^/docs/en/substreams/developing/sinks/sinks/$ $scheme://$http_host/docs/en/substreams/developing/sinks/ permanent; - rewrite ^/docs/en/substreams/sps/$ $scheme://$http_host/docs/en/substreams/overview/ permanent; + rewrite ^/docs/en/substreams/sps/.*$ $scheme://$http_host/docs/en/substreams/overview/ permanent; rewrite ^/docs/en/supported-network-requirements/$ $scheme://$http_host/docs/en/indexing/supported-network-requirements/ permanent; rewrite ^/docs/en/supported-networks/arweave/$ $scheme://$http_host/docs/en/supported-networks/ permanent; rewrite ^/docs/en/supported-networks/near/$ $scheme://$http_host/docs/en/supported-networks/ permanent; @@ -245,10 +245,10 @@ http { rewrite ^/docs/en/querying/graph-client/$ $scheme://$http_host/docs/en/subgraphs/querying/graph-client/README/ redirect; rewrite ^/docs/en/developing/graph-ts/$ $scheme://$http_host/docs/en/subgraphs/developing/creating/graph-ts/README/ redirect; # --- subgraphs section reorg (subgraph-reorg) --- - rewrite ^/docs/en/resources/roles/$ $scheme://$http_host/docs/en/resources/delegating/delegating/ permanent; - rewrite ^/docs/en/resources/roles/delegating/$ $scheme://$http_host/docs/en/resources/delegating/delegating/ permanent; - rewrite ^/docs/en/resources/roles/delegating/delegating/$ $scheme://$http_host/docs/en/resources/delegating/delegating/ permanent; - rewrite ^/docs/en/resources/roles/delegating/undelegating/$ $scheme://$http_host/docs/en/resources/delegating/undelegating/ permanent; + rewrite ^/docs/en/resources/roles/$ $scheme://$http_host/docs/en/resources/delegating/ permanent; + rewrite ^/docs/en/resources/roles/delegating/$ $scheme://$http_host/docs/en/resources/delegating/ permanent; + rewrite ^/docs/en/resources/roles/delegating/delegating/$ $scheme://$http_host/docs/en/resources/delegating/ permanent; + rewrite ^/docs/en/resources/roles/delegating/undelegating/$ "$scheme://$http_host/docs/en/resources/delegating/#how-to-undelegate-on-the-graph" permanent; rewrite ^/docs/en/subgraphs/developing/managing/curating/$ $scheme://$http_host/docs/en/subgraphs/developing/curating/ permanent; rewrite ^/docs/en/resources/benefits/$ $scheme://$http_host/docs/en/subgraphs/best-practices/benefits/ permanent; rewrite ^/docs/en/resources/roles/curating/$ $scheme://$http_host/docs/en/subgraphs/developing/curating/ permanent; @@ -333,6 +333,10 @@ http { rewrite ^/docs/en/subgraphs/cookbook/(.*)$ $scheme://$http_host/docs/en/subgraphs/best-practices/$1 permanent; rewrite ^/docs/en/subgraphs/guides/(.*)$ $scheme://$http_host/docs/en/subgraphs/best-practices/$1 permanent; + # --- resources: delegating/ folder flattened into resources/delegating/; undelegating merged into it --- + rewrite ^/docs/en/resources/delegating/delegating/$ $scheme://$http_host/docs/en/resources/delegating/ permanent; + rewrite ^/docs/en/resources/delegating/undelegating/$ "$scheme://$http_host/docs/en/resources/delegating/#how-to-undelegate-on-the-graph" permanent; + location / { try_files $uri $uri.html $uri/index.html =404; } diff --git a/website/public/img/Delegation-Reward-Formula-v2.png b/website/public/img/Delegation-Reward-Formula-v2.png new file mode 100644 index 000000000000..d0b5287f7c99 Binary files /dev/null and b/website/public/img/Delegation-Reward-Formula-v2.png differ diff --git a/website/public/img/Delegation-Unbonding-v2.png b/website/public/img/Delegation-Unbonding-v2.png new file mode 100644 index 000000000000..ce526d331b09 Binary files /dev/null and b/website/public/img/Delegation-Unbonding-v2.png differ diff --git a/website/public/img/Indexing-Reward-Cut-v2.png b/website/public/img/Indexing-Reward-Cut-v2.png new file mode 100644 index 000000000000..1c4e3556eb51 Binary files /dev/null and b/website/public/img/Indexing-Reward-Cut-v2.png differ diff --git a/website/public/img/Share-Formula-v2.png b/website/public/img/Share-Formula-v2.png new file mode 100644 index 000000000000..ad3a2ffa6ca1 Binary files /dev/null and b/website/public/img/Share-Formula-v2.png differ diff --git a/website/route-lockfile.txt b/website/route-lockfile.txt index b0c681f49687..dce1037013dc 100644 --- a/website/route-lockfile.txt +++ b/website/route-lockfile.txt @@ -16,8 +16,7 @@ /en/indexing/tooling/graph-node/ /en/indexing/tooling/graphcast/ /en/resources/bridging-grt/ -/en/resources/delegating/delegating/ -/en/resources/delegating/undelegating/ +/en/resources/delegating/ /en/resources/getting-grt/ /en/resources/glossary/ /en/resources/tokenomics/ diff --git a/website/src/pages/en/gateways/subgraphs/supply-side/incentivizing-syncs.mdx b/website/src/pages/en/gateways/subgraphs/supply-side/incentivizing-syncs.mdx index 7c4714cd256d..017e7dd258e8 100644 --- a/website/src/pages/en/gateways/subgraphs/supply-side/incentivizing-syncs.mdx +++ b/website/src/pages/en/gateways/subgraphs/supply-side/incentivizing-syncs.mdx @@ -12,6 +12,8 @@ Query routing and paying for queries (covered in [Routing Queries to Indexers](/ On chains where indexing rewards are enabled, the built-in mechanism is curation. Indexing rewards are funded by new GRT issuance (currently at 2-3% annually) and distributed to Subgraphs in proportion to the curation signal on them. Signaling on a Subgraph therefore does two things: it tells Indexers the Subgraph is worth indexing, and it directs a share of indexing rewards to whoever indexes it. More signal means more Indexers are willing to allocate to and sync that Subgraph. +Indexers also have to serve queries across a minimum number of Subgraphs to stay eligible for indexing rewards (see [Indexing Rewards Eligibility](/indexing/rewards-eligibility/)). Routing consistent query traffic to a Subgraph therefore makes it more useful to Indexers, alongside the signal on it. + For a Gateway Operator, the practical move is to signal (or encourage their consumers to signal) on the Subgraphs an Operator needs served, often paired with the publication flow when a Subgraph is first published (see [Enabling Publication Flows](/gateways/subgraphs/consumer-side/publication-flows/)). A select amount of self-signal at publishing time is a common way to bootstrap indexing on a fresh Subgraph. Aim for enough signal to attract at least three Indexers, so a Gateway's per-query selection is covered and no single Indexer's outage leaves the Subgraph unserved. For recommended signal amounts and curation costs, see [How Much Signal to Add](/subgraphs/developing/curating/#how-much-signal-to-add). ## Chains without Indexing Rewards diff --git a/website/src/pages/en/graph-horizon/what-changes.mdx b/website/src/pages/en/graph-horizon/what-changes.mdx index 40ab1e0db8a7..dbcedd5ac5f0 100644 --- a/website/src/pages/en/graph-horizon/what-changes.mdx +++ b/website/src/pages/en/graph-horizon/what-changes.mdx @@ -40,6 +40,8 @@ Horizon does not change the way indexing rewards work, the rewards formula remai - Legacy allocation 1 with 10k GRT + Legacy allocation 2 with 10k GRT - Legacy allocation 1 with 10k GRT + Horizon allocation 1 with 10k GRT +> **Note:** A later protocol upgrade ([GIP-0088](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0088.md)) added an eligibility condition to indexing rewards. The rewards formula is unchanged, but only Indexers that meet the Rewards Eligibility Oracle (REO) standard can collect them. See [Indexing Rewards Eligibility](/indexing/rewards-eligibility/). + ### Serving queries and the gateway behavior The gateway now exclusively uses TAPv2 (GraphTally) receipts. Indexers must run `indexer-service-rs` and `indexer-tap-agent` v2.0.0 or later, which require Graph Horizon to be enabled. @@ -84,5 +86,5 @@ Fishermen can now reclaim their bonds if disputes aren't resolved within the dis While Horizon brings significant improvements, several core elements remain unchanged: - **Curation mechanism**: The way subgraphs are signaled and curated remains the same -- **Indexing rewards formula**: The calculation and distribution of indexing rewards follows the same formula +- **Indexing rewards formula**: The calculation and distribution of indexing rewards follows the same formula. Since the GIP-0088 upgrade, collecting rewards also requires [rewards eligibility](/indexing/rewards-eligibility/) - **GRT token**: The Graph Token (GRT) remains unchanged diff --git a/website/src/pages/en/indexing/_meta.js b/website/src/pages/en/indexing/_meta.js index 8a2b538a1fbd..e419fb415166 100644 --- a/website/src/pages/en/indexing/_meta.js +++ b/website/src/pages/en/indexing/_meta.js @@ -4,6 +4,7 @@ export default { overview: '', tooling: titles.tooling ?? '', tap: 'GraphTally for Indexers', + 'rewards-eligibility': '', 'supported-network-requirements': 'Supported Networks and Node Requirements', 'new-chain-integration': '', 'chain-integration-overview': 'Chain Integration Process', diff --git a/website/src/pages/en/indexing/overview.mdx b/website/src/pages/en/indexing/overview.mdx index b4aa41ca0fd8..96688687d950 100644 --- a/website/src/pages/en/indexing/overview.mdx +++ b/website/src/pages/en/indexing/overview.mdx @@ -21,7 +21,7 @@ The minimum stake for an Indexer is currently set to 100K GRT. **Query fee rebates** - Payments for serving queries on the network. These payments are mediated via [GraphTally](/indexing/tap) between an Indexer and a gateway. Each query request from a gateway contains a signed receipt and the corresponding response a proof of query result validity. -**Indexing rewards** - Generated via a 3% annual protocol wide inflation, the indexing rewards are distributed to Indexers who are indexing Subgraph deployments for the network. +**Indexing rewards** - Generated via a 3% annual protocol wide inflation, the indexing rewards are distributed to Indexers who are indexing Subgraph deployments for the network. To receive indexing rewards, an Indexer must meet the eligibility standard set by the Rewards Eligibility Oracle (REO). See [Indexing Rewards Eligibility](/indexing/rewards-eligibility/). ### How are indexing rewards distributed? @@ -31,6 +31,8 @@ Indexers must submit a valid POI before it becomes stale. The `maxPOIStaleness` Rewards are distributed proportionally based on curation signal and the amount of GRT allocated to each subgraph deployment. +Rewards are paid only to Indexers that are eligible under the Rewards Eligibility Oracle (REO), which requires an Indexer to serve qualifying queries across a minimum number of Subgraphs. When an ineligible Indexer presents a POI that would otherwise pay, the transaction reverts and the rewards stay pending. See [Indexing Rewards Eligibility](/indexing/rewards-eligibility/) for the criteria and how to check your status. + > **Note:** During the current transition period, the indexer-agent continues to recycle allocations approximately every 28 days for compatibility. A future agent version will leverage long-lived allocations natively. Check the [Graph Horizon migration guide](/graph-horizon/migration-guide/) for current agent requirements. Numerous tools have been created by the community for calculating rewards; you'll find a collection of them organized in the [Community Guides collection](https://www.notion.so/Community-Guides-abbb10f4dba040d5ba81648ca093e70c). You can also find an up to date list of tools in the #Delegators and #Indexers channels on the [Discord server](https://discord.gg/graphprotocol). Here we link a [recommended allocation optimiser](https://github.com/graphprotocol/allocation-optimizer) integrated with the indexer software stack. @@ -53,6 +55,8 @@ The previous mechanism allowing Delegators to force-close allocations after 28 e The RewardsManager contract has a read-only [getRewards](https://github.com/graphprotocol/contracts/blob/main/packages/contracts/contracts/rewards/RewardsManager.sol#L316) function that can be used to check the pending rewards for a specific allocation. +> **Note:** `getRewards` does not account for Indexer eligibility, which is checked when rewards are claimed. A pending balance can only be collected if the Indexer is eligible under the Rewards Eligibility Oracle at that time. See [Indexing Rewards Eligibility](/indexing/rewards-eligibility/). + Many of the community-made dashboards include pending rewards values and they can be easily checked manually by following these steps: 1. Query the [mainnet Subgraph](https://thegraph.com/explorer/subgraphs/9Co7EQe5PgW3ugCUJrJgRv4u9zdEuDJf8NvMWftNsBH8?view=Query&chain=arbitrum-one) to get the IDs for all active allocations: @@ -143,7 +147,7 @@ Indexers may differentiate themselves by applying advanced techniques for making ## Infrastructure -At the center of an Indexer's infrastructure is the Graph Node which monitors the indexed networks, extracts and loads data per a Subgraph definition and serves it as a [GraphQL API](/about/#how-the-graph-works). The Graph Node needs to be connected to an endpoint exposing data from each indexed network; an IPFS node for sourcing data; a PostgreSQL database for its store; and Indexer components which facilitate its interactions with the network. +At the center of an Indexer's infrastructure is the Graph Node which monitors the indexed networks, extracts and loads data per a Subgraph definition and serves it as a [GraphQL API](/subgraphs/querying/graphql-api/). The Graph Node needs to be connected to an endpoint exposing data from each indexed network; an IPFS node for sourcing data; a PostgreSQL database for its store; and Indexer components which facilitate its interactions with the network. - **PostgreSQL database** - The main store for the Graph Node, this is where Subgraph data is stored. The Indexer service, TAP agent, and Indexer agent also use the database to store receipt data, cost models, indexing rules, and allocation actions. diff --git a/website/src/pages/en/indexing/rewards-eligibility.mdx b/website/src/pages/en/indexing/rewards-eligibility.mdx new file mode 100644 index 000000000000..280e9abd42f1 --- /dev/null +++ b/website/src/pages/en/indexing/rewards-eligibility.mdx @@ -0,0 +1,237 @@ +--- +title: Indexing Rewards Eligibility +sidebarTitle: Rewards Eligibility +--- + +The Rewards Eligibility Oracle (REO) ties indexing rewards to the service an Indexer delivers on The Graph Network. To stay eligible for indexing rewards, an Indexer must meet a published minimum service standard. Indexers that fall below it stop receiving indexing rewards until they meet it again. + +REO does not change total protocol issuance, but does change which Indexers receive indexing rewards, moving the reward condition from proof of presence to proof of work. REO was introduced in [GIP-0079](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0079.md) and deployed as part of [GIP-0088](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0088.md). + +## Why REO Exists + +Indexing rewards were distributed according to curation signal and allocated stake. Neither of those measures whether an Indexer served a single query. An Indexer could hold stake, open allocations, present POIs, and collect indexing rewards without ever answering a request from a data consumer. + +As a result, part of the indexing rewards went to Indexers that were not delivering value to the network: they were not serving queries, and they were not indexing data that consumers used. REO closes that gap. The protocol issues the same amount of GRT as before. More of it now reaches Indexers who serve queries. + +## Rewards Eligibility Criteria + +The standard measures whether an Indexer serves queries, and whether it serves them across enough Subgraphs for the stake it holds. + +### Active REO Criteria (as of November 17, 2026) + +An Indexer is eligible for indexing rewards when it is online on **5 or more separate days** within a rolling **28-day window.** A day counts as online when the Indexer serves at least 1 qualifying query on each of its required number of Subgraphs. + +A **qualifying query** must satisfy all of the following at the same time: + +- **HTTP status:** the query returns `200 OK`. +- **Latency:** the query responds in **under 5,000 ms**. +- **Freshness:** the Indexer is **within 50,000 blocks** of chainhead when it serves the query. + +**Required number of Subgraphs is the greater of 10 or 1 Subgraph per 4M GRT in stake** (i.e. total stake ÷ 4,000,000 GRT, rounded up). The 10-Subgraph minimum applies to every Indexer. The stake-based number applies only above 40M GRT of total stake. + +**Total stake** is the GRT you have provisioned to the Subgraph Service plus the GRT delegated to that provision. Delegation counts only up to the 16x delegation ratio, and GRT that is thawing does not count. REO reads your total stake once at each daily run and applies the resulting minimum to every day in the 28-day window. + +REO evaluates service data once a day and renews eligibility on-chain for the Indexers that qualify. Eligibility lasts **14 days** from renewal, so an Indexer that keeps serving is re-qualified well before the previous period runs out. Once you qualify and an authorized Oracle submits the corresponding transaction on-chain, you can continue claiming indexing rewards for the duration of your qualification period, even if the active eligibility criteria change during it. + +Here are some examples with the current and Projected criteria: + +| Total stake | Step 3 | Step 4 | Phase 2 End Goal | +| ----------- | ------ | ------ | ---------------- | +| 30M GRT | 10 | 10 | 30 | +| 50M GRT | 10 | 13 | 50 | +| 100M GRT | 10 | 25 | 100 | +| 200M GRT | 10 | 50 | 200 | + +## Projected Changes (Late 2026-Early 2027) + +The criteria get stricter over time. Announced changes carry at least a **14-day** window before they take effect, published with the data behind them. + +The Subgraph requirement is moving toward an end goal of **1 Subgraph for each 1M GRT of total stake**. An Indexer with 100M GRT would serve queries on at least 100 Subgraphs. The ratio tightens in steps so Indexers can add capacity gradually. Each step is announced separately with its own effective date and at least 14 days' notice. If your total stake is close to the next threshold, plan capacity toward the end goal rather than only the current step. + +## Criteria History and Past Versions + +The requirement has tightened in steps since launch: + +| Phase | Step | Requirement per online day | +| --- | --- | --- | +| 1 | 1 | 1 qualifying query on 1 Subgraph | +| 1 | 2 | 1 qualifying query on each of 5 Subgraphs | +| 1 | 3 | 1 qualifying query on each of 10 Subgraphs | +| 2 | 4 | 1 qualifying query on each of N Subgraphs where N is the greater of 10 or 1 Subgraph per 4M GRT in stake | +| 2 | 5 | 1 qualifying query on each of N Subgraphs where N is the greater of 10 or 1 Subgraph per 3M GRT in stake | +| 2 | 6 | 1 qualifying query on each of N Subgraphs where N is the greater of 10 or 1 Subgraph per 2M GRT in stake | +| 2 | 7 | 1 qualifying query on each of N Subgraphs where N is the greater of 10 or 1 Subgraph per 1M GRT in stake | + +For the effective date of each step, see the changelog in the Eligibility Criteria document below. + +**Phase 1 (Steps 1 to 3)** set a baseline so that every Indexer receiving rewards serves across a meaningful set of Subgraphs. **Phase 2 (from Step 4)** scales the requirement with stake, so the Indexers that receive the most rewards do the most work. The days-online requirement, the query-quality conditions, the 14-day eligibility period, and the fail-safes have not changed across any step. + +The [Eligibility Criteria document](https://github.com/graphprotocol/rewards-eligibility-oracle/blob/main/ELIGIBILITY_CRITERIA.md) is the canonical source for the standard. It has three sections: + +- **Upcoming Eligibility Criteria** lists announced changes and their effective dates. +- **Active Eligibility Criteria** lists the requirements in force today. +- **Eligibility Requirements Changelog** records every requirement that has ever applied, with its effective date, change type, and a written justification. + +To read a past version of the standard: + +1. Open the [file history](https://github.com/graphprotocol/rewards-eligibility-oracle/commits/main/ELIGIBILITY_CRITERIA.md) for the Eligibility Criteria document. +2. Select the commit that covers the date you need. +3. Use **View file** on that commit to see the document exactly as it read at that time. + +Each commit URL is a permanent link. Cite the commit SHA when you need to reference the criteria as they stood on a specific date, for example in a dispute or a post-mortem. + +## Checking Your Eligibility Status + +### REO Dashboard + +The [REO dashboard](https://reo.thegraph.com/) publishes the status of every Indexer on the network. It shows each Indexer's current status, its qualifying streak in days, the transaction that last renewed it, and the date its eligibility expires. + +The dashboard reports four statuses: + +| Status | Meaning | Action | +| --- | --- | --- | +| **Active** | Eligible. Renewed recently. | None. | +| **Grace** | Still eligible, but the renewal window is closing. | Check that you are still serving qualifying queries across your required Subgraphs. | +| **Expired** | Was eligible. The renewal period passed without a renewal. | Resume serving qualifying queries to re-qualify. | +| **Unqualified** | Has never been eligible. | Follow [How to Become Eligible](#how-to-become-eligible). | + +**On-Chain:** The `RewardsEligibilityOracle` contract exposes `isEligible(address indexer)`, which returns the current eligibility of any Indexer address. The Rewards Manager calls this function at claim time. + +**Network Subgraph:** Every POI presentation records the reward condition that applied. See [POI Observability](#poi-observability) below. + +## How to Become Eligible + +Eligibility is automatic. There is no application, no registration, and no appeal process. Serve qualifying queries and the oracle renews you on its next daily run. + +To qualify: + +1. **Work out your required number of Subgraphs:** the greater of 10 or 1 Subgraph per 4M GRT in stake (i.e. your total stake ÷ 4M GRT, rounded up). +2. **Allocate to at least that many Subgraphs.** Indexing rewards follow curation signal, so these are usually Subgraphs with signal. See [Curating](/subgraphs/developing/curating/) for how signal attracts Indexers. +3. **Sync each Subgraph to within 50,000 blocks of chainhead** and keep it there. A lagging Subgraph serves queries that do not count. +4. **Confirm your Indexer service is reachable and healthy.** Queries must return `200 OK` in under 5,000 ms to count. +5. **Serve at least one qualifying query on each required Subgraph per day**, on 5 or more days within any 28-day window. +6. **Check the dashboard after the next daily oracle run** to confirm your status changed. + +If you are already serving production traffic across your required Subgraphs, you clear this standard without doing anything extra. The steps above matter most when you are a new operator, returning from downtime, serving a narrow set of Subgraphs, or holding enough stake to raise your required number. + +## What Happens When You Do Not Qualify + +An Indexer that does not meet the standard stops receiving indexing rewards. Rewards are withheld, not confiscated. + +When an ineligible Indexer presents a Proof of Indexing (POI) that would otherwise pay, the transaction **reverts** and the rewards stay pending. If the Indexer regains eligibility before the allocation goes stale, the rewards are still there to claim. + +Key points: + +- **Your stake is untouched.** You can keep operating, keep serving queries, and keep earning query fees the entire time. +- **The revert only affects reward-bearing POIs** (a valid, non-zero POI, on an old-enough allocation, on a non-denied Subgraph). It does not block you from operating the allocation in other ways. +- **You are never locked into an allocation.** While ineligible you can still: + - **Present a zero POI**, which succeeds and resets the staleness clock to keep the allocation alive, but forfeits that period's rewards. + - **Close the allocation**, which succeeds and lets you exit cleanly. Any uncollected rewards are reclaimed. +- **Eligibility returns automatically** as soon as you meet the standard again. + +> **Note:** By default the Indexer agent combines "present POI" with "close allocation" when closing allocations. An ineligible Indexer closing an allocation this way will see the transaction revert. + +## POI Observability + +Every POI presentation records the **reward condition** that applied. If a POI did not pay what you expected, the condition tells you why. This is surfaced through the network Subgraph: + +```graphql +{ + allocations { + id + latestPoiCondition + } +} +``` + +```json +{ + "data": { + "allocations": [ + { + "id": "0x001a42df17784fe5efcd14dcb138b91df116aa62", + "latestPoiCondition": "StalePoi" + }, + { + "id": "0x01d1522d4646b6119a2623d9b784cb9f1dfb924b", + "latestPoiCondition": "StalePoi" + } + ] + } +} +``` + +## Reward Conditions + +The protocol records a reward condition every time a POI is presented. The condition determines what happens to the rewards for that presentation. + +| Condition | Trigger | Scope | Rewards outcome | Notes | +| --- | --- | --- | --- | --- | +| `NONE` | Valid POI on a non-denied Subgraph, eligible allocation | Allocation | **Collected** | | +| `NO_SIGNAL` | Zero total curation signal globally | Global | **Reclaimed** | | +| `SUBGRAPH_DENIED` | Subgraph is on the denylist | Subgraph | **Preserved** | Claimable if the Subgraph is undenied and the allocation was not closed | +| `BELOW_MINIMUM_SIGNAL` | Subgraph signal below `minimumSubgraphSignal` | Subgraph | **Reclaimed** | | +| `NO_ALLOCATED_TOKENS` | Subgraph has signal but zero allocated tokens | Subgraph | **Reclaimed** | | +| `STALE_POI` | POI presented after the staleness deadline | Allocation | **Reclaimed** | | +| `ZERO_POI` | POI is `bytes32(0)` | Allocation | **Reclaimed** | | +| `ALLOCATION_TOO_YOUNG` | Allocation created in the current epoch | Allocation | **Preserved** | Claimable next epoch if the allocation was not closed | +| `CLOSE_ALLOCATION` | Allocation being closed with uncollected rewards | Allocation | **Reclaimed** | | +| `INDEXER_INELIGIBLE` | Indexer fails the eligibility check at claim time | Indexer | **Preserved**, transaction reverts | Claimable if you regain eligibility before staleness | + +The protocol evaluates these conditions in order when you present a POI, and the first match wins: + +1. **Stale POI:** `STALE_POI` (Reclaimed) +2. **POI is `0x0`:** `ZERO_POI` (Reclaimed) +3. **Created this epoch:** `ALLOCATION_TOO_YOUNG` (Preserved) +4. **Subgraph denied:** `SUBGRAPH_DENIED` (Preserved) +5. **No rewards accrued:** `NO_SIGNAL`, `BELOW_MINIMUM_SIGNAL`, or `NO_ALLOCATED_TOKENS` (Reclaimed) +6. **Indexer ineligible:** `INDEXER_INELIGIBLE` (Preserved, transaction reverts) +7. **Otherwise:** `NONE` (Collected) + +> **Note:** Reclaiming does not take indexing rewards that Indexers previously earned. Before this upgrade, rewards that could not be paid (stale POI, denied Subgraph, and similar) were silently dropped and never minted to anyone. Those same rewards are now minted to a protocol reclaim address instead. + +## For Delegators + +Delegated stake follows the Indexer that holds it. **If your Indexer is not eligible for indexing rewards, you do not receive indexing rewards either.** + +Choosing an Indexer has always been the Delegator's decision. That decision now determines whether your delegation earns indexing rewards at all. + +What to do: + +1. **Look up your Indexer on the [REO dashboard](https://reo.thegraph.com/).** Check its status and its qualifying streak. +2. **Watch for the grace status.** It means your Indexer is still eligible but needs to renew soon. Acting at grace is better than acting after it expires. +3. **If your Indexer stops qualifying, move your delegation.** The [Delegate page in Graph Explorer](https://thegraph.com/explorer/delegate?chain=arbitrum-one) lists active Indexers alongside what they have allocated and the Subgraphs they serve. + +Moving delegated stake takes time. Undelegating is subject to an undelegation period before the GRT can be moved. This is why monitoring beats reacting. Importantly, query fees are not affected by REO. This standard applies to indexing rewards only. + +For the full Delegator view, see [Delegating](/resources/delegating/). + +## What Is Not Changing + +REO does not change the following: + +- The allocation lifecycle: open, present POIs, close. +- How and when POIs are presented, and the POI cadence. +- The staleness model. Allocations still go stale if you stop presenting POIs. +- Delegation, provisions, and stake mechanics. +- The rewards rate: Issuance to indexing rewards is the same as before the upgrade. + +Two pieces of protocol plumbing ship alongside REO but change nothing today. The **Issuance Allocator** routes protocol issuance and can split it across destinations later; at launch it routes 100% to indexing rewards, exactly as before. The **Direct Indexer Payments (DIPs)** contracts are deployed but dormant. When either is activated, a change to the indexing rewards rate will be communicated at that time. + +## Fail-safes + +REO is designed so that it cannot accidentally deny rewards to the whole network: + +- If the oracle stops posting updates for **7 days**, every Indexer is treated as eligible again. A stalled oracle cannot block rewards. +- Governance can disconnect the oracle entirely at any time, which restores the previous behavior immediately. + +The code is open, so anyone can read the exact logic that decides eligibility. The oracle runs on a fixed daily schedule and writes a record of each evaluation, showing which Indexers qualified and why. + +## Additional Resources + +- [REO dashboard](https://reo.thegraph.com/) +- [Eligibility Criteria document](https://github.com/graphprotocol/rewards-eligibility-oracle/blob/main/ELIGIBILITY_CRITERIA.md) and its [file history](https://github.com/graphprotocol/rewards-eligibility-oracle/commits/main/ELIGIBILITY_CRITERIA.md) +- [rewards-eligibility-oracle repository](https://github.com/graphprotocol/rewards-eligibility-oracle) +- [GIP-0079](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0079.md) and [GIP-0088](https://github.com/graphprotocol/graph-improvement-proposals/blob/main/gips/0088.md) +- [Indexing Overview](/indexing/overview/) +- [Delegating](/resources/delegating/) diff --git a/website/src/pages/en/resources/delegating.mdx b/website/src/pages/en/resources/delegating.mdx new file mode 100644 index 000000000000..c04936e4ca4f --- /dev/null +++ b/website/src/pages/en/resources/delegating.mdx @@ -0,0 +1,231 @@ +--- +title: The Graph Delegation Overview +sidebarTitle: Delegating +--- + + + + + +Delegation lets GRT holders take part in securing The Graph Network without running any infrastructure. That makes it the main way for non-technical contributors to participate in the protocol. Delegators delegate their GRT to Indexers, which increases the stake that Indexers can allocate to serving data, and in return Delegators get a share of the rewards those Indexers earn. + +To start delegating, check out the [Delegate on The Graph](https://thegraph.com/explorer/delegate?chain=arbitrum-one) page or visit the [Indexers](https://thegraph.com/explorer/participants?chain=arbitrum-one) table for more extensive metrics for all Indexers. + +## Benefits of Delegating on The Graph + +The core benefits of delegating on The Graph are: + +1. Earn a portion of rewards generated by your chosen Indexer(s). +2. Strengthen the network’s security and scalability by supporting Indexers. +3. Take part in The Graph community without running any technical infrastructure. + +## How Delegation Works on The Graph + +Delegators can passively earn GRT rewards from the Indexer(s) they choose to delegate their GRT to. An Indexer's ability to process queries and earn rewards depends on three key factors: + +1. The Indexer's self-stake (or GRT staked by the Indexer), +2. The total GRT delegated to Indexers by Delegators, and +3. The price the Indexer sets for serving queries. + +The more GRT staked by and delegated to an Indexer, the more queries they can serve, leading to higher potential rewards for both the Indexer and the Delegator. + +## Buying and Bridging GRT for Delegation + +Delegation on The Graph Network happens on Arbitrum One, so a Delegator needs GRT in a wallet on Arbitrum One before they can delegate. Arbitrum One is the network where protocol staking, delegation, and curation settle. GRT first launched on Ethereum mainnet, and many exchanges still send GRT to Ethereum by default. + + + +To get started, a Delegator [gets GRT](/resources/getting-grt/) on a centralized or decentralized exchange and sends it to a self-custody wallet (EOA or multisig). If the GRT arrives on Ethereum mainnet, the Delegator must [bridge GRT](/resources/bridging-grt/) to Arbitrum One. If the exchange supports withdrawals directly to Arbitrum One, the Delegator can skip the bridge. When the GRT is on Arbitrum One, the Delegator connects the wallet to Graph Explorer, chooses an Indexer, and delegates. + +The Graph's guides do not cover wallet setup, such as installing MetaMask. The Ethereum community provides a [comprehensive resource regarding wallets](https://ethereum.org/en/wallets/). + +## How to Delegate on The Graph + +Work through these steps before you choose where to delegate: + +1. [Choose a Data Service](#choosing-a-data-service) +2. [Compare Indexers on the Subgraph Service](#comparing-indexers) +3. [Calculate Estimated Indexer APR](#estimated-indexer-apr) +4. [Check Indexer Capacity and Eligibility](#indexer-delegation-capacity-and-rewards-eligibility) +5. [Research Indexer Contribution Quality](#indexer-contribution-quality) +6. [Evaluate Delegation Costs and Risks](#delegation-costs-and-risks) + +### Choosing a Data Service + +The introduction of [Graph Horizon](/graph-horizon/overview/) turned the protocol into a multi-service framework, meaning that delegation happens for each data service. **Currently, only the Subgraph Service supports delegation**. As more data services add delegation, Delegators will choose both: + +- **A data service:** A data service that supports delegation. +- **An Indexer:** The operator or provider you delegate to on that service. + +Your delegation earns rewards based on the Indexer's activity on the data service you delegated to. If you delegated GRT before Graph Horizon launched, your delegation was automatically migrated to the Subgraph Service, and no action was required. + +### Comparing Indexers + + + +The [Delegate page](https://thegraph.com/explorer/delegate?chain=arbitrum-one) in Graph Explorer lists Indexers with their estimated APR, query fees, allocated stake, indexing rewards, and the Subgraphs they serve. Most Delegators start with estimated APR, then check each Indexer's delegation capacity, rewards eligibility, and contribution quality. The sections below cover each one. + +### Estimated Indexer APR + +Estimated APR is the quickest way to compare what Indexers pay their Delegators. It changes over time, so treat it as a guide, not a guaranteed return. + +#### How Estimated APR Is Calculated + +Graph Explorer bases an Indexer's estimated APR on the rewards that reached its delegation pool over the last 7 days, annualized. These are the rewards left for Delegators after the Indexer takes its indexing reward cut and query fee cut. The rewards are divided by the delegation that is actively earning, so GRT that is thawing after an undelegation request does not drag the figure down. + +Because it looks back only 7 days, estimated APR can move sharply. Common reasons include: + +- **Allocation timing:** Indexing rewards are paid when an Indexer closes or collects on an allocation, which it can do at any point in a 1 to 28-day window. An Indexer that has not collected recently can show a lower APR than it will actually pay. +- **Unallocated stake:** An Indexer that does not allocate all the GRT available to it earns less on that stake, for itself and its Delegators. +- **Changes to the cuts:** An Indexer can change its indexing reward cut and query fee cut, which changes the share that goes to Delegators. +- **New delegation:** More GRT in the delegation pool splits the same rewards among more stake, which lowers the APR for everyone in the pool. +- **Rewards eligibility:** If an Indexer stops qualifying under the [Rewards Eligibility Oracle](#how-does-rewards-eligibility-impact-delegating), its indexing rewards stop, and its APR drops with them. + +#### Indexing Reward Cut and Query Fee Cut + +Each Indexer sets two cuts that decide how rewards are split with its Delegators: + +- **Indexing Reward Cut:** The share of indexing rewards the Indexer keeps. At 100%, Delegators get no indexing rewards. At 80%, Delegators receive 20%. +- **Query Fee Cut:** The same idea, applied to the query fees the Indexer collects. + +![Indexer table in Graph Explorer showing each Indexer's allocated, owned, and delegated stake, plus its available delegation capacity, Query Fee Cut, and Indexing Reward Cut.](/img/Indexing-Reward-Cut-v2.png) + +Delegators earn from what is left after these cuts: + +![Delegator Indexing Rewards = Indexer Indexing Rewards × (100 − Indexing Reward Cut) / 100. Delegator Query Fees = Indexer Query Fees × (100 − Query Fee Cut) / 100.](/img/Delegation-Reward-Formula-v2.png) + +Look for Indexers that are transparent about how they set their cuts and that do not change them often. + +#### Your Share of the Delegation Pool + +Rewards for Delegators are split across the Indexer's delegation pool in proportion to how much each Delegator has deposited. Your share of the pool is: + +![Shares = New Tokens Delegated × Total Shares / Total Delegated Tokens](/img/Share-Formula-v2.png) + +This means a low cut does not guarantee a better return. An Indexer that gives Delegators only 20% of rewards can pay more than one that gives 90% if its rewards are larger or its delegation pool is smaller. Estimated APR already accounts for both, which is why it is the starting point for most Delegators. + +#### Using the ROI Calculator + +The **Calculate your ROI** tool on the [Delegate page](https://thegraph.com/explorer/delegate?chain=arbitrum-one) projects how a delegation could grow. Enter an initial deposit, an optional monthly contribution, an APR, and the number of months, and the chart shows the estimated total value over that period. The projection assumes the APR holds steady, which it rarely does, so try a lower APR than the current estimate to see a more conservative outcome. + +### Indexer Delegation Capacity and Rewards Eligibility + +After comparing estimated APR, check that an Indexer has room for more delegation and is eligible for indexing rewards. + +#### How Does Delegation Capacity Impact Delegating? + +Delegation capacity is the maximum amount of GRT an Indexer can accept from Delegators, based on the Indexer's self-stake. The Graph Network uses a delegation ratio of 16, so an Indexer can accept up to 16 times its self-stake in delegated GRT. For example, an Indexer with a self-stake of 1M GRT has a delegation capacity of 16M GRT. + +**If an Indexer exceeds its delegation capacity, rewards for all of its Delegators are diluted**, because the protocol cannot put the excess GRT to work. Check an Indexer's remaining capacity before you delegate. An Indexer can raise its capacity by increasing its self-stake. + +#### How Does Rewards Eligibility Impact Delegating? + +The [Rewards Eligibility Oracle (REO)](/indexing/rewards-eligibility/) ties indexing rewards to the service an Indexer delivers. To receive indexing rewards, an Indexer must serve queries on a minimum number of Subgraphs that meet a published standard. Every Indexer's eligibility status is public on the [REO dashboard](https://reo.thegraph.com/), updated daily, along with each Indexer's qualifying streak. + +**If an Indexer is not eligible for indexing rewards, its Delegators do not receive indexing rewards either.** Choosing an Indexer has always been the Delegator's decision. That decision now determines whether your delegation earns indexing rewards at all. The REO affects indexing rewards only. Query fees are not affected. + +The standard scales with stake: an Indexer with more total stake must serve queries on more Subgraphs to stay eligible. Your delegation adds to that total, so it can raise the bar the Indexer has to meet. The standard will also continue to tighten over time. For past and planned criteria, see [Indexing Rewards Eligibility](/indexing/rewards-eligibility/). + +On the REO dashboard, watch for the `Grace` status. It means the Indexer is still eligible but needs to renew soon. Keep an eye on the Indexer you delegate to, because moving stake takes time once its eligibility lapses. If an Indexer becomes `Unqualified`, its Delegators should [undelegate](#how-to-undelegate-on-the-graph) and move their delegation to another Indexer to keep receiving indexing rewards. + +### Indexer Contribution Quality + +A high estimated APR shows what an Indexer paid recently. It does not show how much work the Indexer does for the network. The [Delegate page](https://thegraph.com/explorer/delegate?chain=arbitrum-one) shows that too: + +- **Subgraphs served:** The number of Subgraphs an Indexer syncs and serves. More Subgraphs means broader coverage, and under the Rewards Eligibility Oracle, an Indexer with more stake must serve queries on more Subgraphs to stay eligible. +- **Recent query fees:** The **Top indexers by Most query fees** list ranks Indexers by fees earned in the last 7 days. Query fees come from real apps querying the Indexer, so recent fees show it is serving traffic now. +- **Lifetime query fees and indexing rewards:** The **Search top Indexers** table lists each Indexer's total query fees and indexing rewards to date, alongside its allocated stake. A long, steady record is a sign of reliable infrastructure. + +Weigh these together. An Indexer with a high APR but few Subgraphs and little or no query fee income may be earning from a short-term spike rather than steady work. Click an Indexer's name to open its profile and review its allocations and history before you delegate. + +Reputation matters too. Many Indexers are active in [The Graph Discord](https://discord.gg/graphprotocol) and will answer questions from Delegators, which is a good way to judge their technical and social standing. + +### Delegation Costs and Risks + +Delegating costs nothing at the protocol level, but your GRT is locked for a period when you leave, and the protocol may add new risks in the future. + +#### No Delegation Tax + +Graph Horizon removed the delegation tax from the protocol entirely. The 0.5% tax that applied before Horizon no longer exists, so you can delegate and undelegate without paying a protocol fee on your principal. You still pay network gas fees on Arbitrum One for each transaction. + +#### The Undelegation Period + +When you undelegate, your GRT enters a 28-day undelegation period. During that time, you cannot transfer it and it does not earn rewards. When the period ends, you withdraw the GRT to your wallet. Horizon lets you have up to 1,000 undelegation requests open at once, so you no longer need to wait for one to finish before starting another. + +The undelegation period is why choosing an Indexer carefully matters. If your Indexer stops performing or loses rewards eligibility, moving to another one costs you 28 days of rewards. + +#### Future Slashability + +Horizon adds the technical ability to slash delegated stake. Slashing is not enabled for delegation on the Subgraph Service today, but it could be turned on in a future protocol upgrade. Follow governance proposals for any change to slashing parameters. + +## How to Undelegate on The Graph + +You can withdraw your delegated tokens through [Graph Explorer](https://thegraph.com/explorer) or, if the Explorer UI is having issues, directly through [Arbiscan](https://arbiscan.io/). Either way, your tokens are subject to the [undelegation period](#the-undelegation-period) before you can withdraw them. + +A common reason to undelegate is that your Indexer is no longer eligible for indexing rewards. If your Indexer stops qualifying, your delegation stops earning indexing rewards too. Check your Indexer's status on the [REO dashboard](https://reo.thegraph.com/), and see [How Does Rewards Eligibility Impact Delegating?](#how-does-rewards-eligibility-impact-delegating) before you move your stake. + +### Undelegate Using Graph Explorer + +1. Visit [Graph Explorer](https://thegraph.com/explorer). Make sure you are on Explorer and **not** Subgraph Studio. +2. Click your profile in the top-right corner of the page. + - Make sure that your wallet is connected. If it is not connected, you will see a **Connect** button instead. +3. In your profile, open the **Delegating** tab to see the Indexers you have delegated to. +4. Click the Indexer you want to withdraw your tokens from. + - Make sure to note the specific Indexer, as you will need to find it again to withdraw. +5. Click the three dots to the right of the Indexer and select **Undelegate**: + + ![Undelegate button](/img/undelegate-button.png) + +6. After approximately [28 epochs](https://thegraph.com/explorer/network/epochs?chain=arbitrum-one) (28 days), return to the **Delegating** tab and find the Indexer you undelegated from. +7. Click the three dots next to the Indexer and withdraw your tokens. + +### Undelegate Using Arbiscan + +This process is primarily useful if the UI in Graph Explorer experiences issues: + +1. Find your delegation transaction on Arbiscan. + - Here's an [example transaction on Arbiscan](https://arbiscan.io/tx/0xcf2110eac897099f821064445041031efb32786392bdbe7544a4cb7a6b2e4f9a) +2. Go to **Transaction Action**, where you can find the staking extension contract: + - [This is the staking extension contract for the example listed above](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03) +3. Click the **Contract** tab. ![Contract tab on Arbiscan, between NFT Transfers and Events](/img/arbiscan-contract.png) +4. Scroll to the bottom and copy the Contract ABI. There should be a small button next to it that allows you to copy everything. +5. Click your profile button in the top-right corner of the page. If you don't have an Arbiscan account yet, create one. +6. In your profile, click **Custom ABI**. +7. Paste the custom ABI you copied from the staking extension contract, and add the custom ABI for the address: 0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03 (**sample address**). +8. Go back to the [staking extension contract](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03#writeProxyContract). Now, call the `unstake` function in the [Write as Proxy tab](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03#writeProxyContract), which has been added thanks to the custom ABI, with the number of tokens that you delegated. +9. If you don't know how many tokens you delegated, you can call `getDelegation` on the Read Custom tab. You will need to paste your address (delegator address) and the address of the Indexer that you delegated to, as shown in the following screenshot: + + ![Both of the addresses needed](/img/get-delegate.png) + - This will return three numbers. The first number is the amount you can unstake. + +10. After you have called `unstake`, you can withdraw after approximately 28 epochs (28 days) by calling the `withdraw` function. +11. You can see how much you will have available to withdraw by calling `getWithdrawableDelegatedTokens` on the Read Custom tab and passing it your delegation tuple. See screenshot below: + + ![Call `getWithdrawableDelegatedTokens` to see amount of tokens that can be withdrawn](/img/withdraw-available.png) + +## Delegator FAQs and Bugs + +### MetaMask "Pending Transaction" Bug + +At times, attempts to delegate to Indexers via MetaMask can fail and result in prolonged periods of "Pending" or "Queued" transaction attempts. + +To fix it, restart the browser (for example, enter `chrome://restart` in Chrome or `about:restart` in Firefox), which will cancel all previous attempts without gas being subtracted from the wallet. Several users who have encountered this issue have reported successful transactions after restarting their browser and attempting to delegate. diff --git a/website/src/pages/en/resources/delegating/_meta.js b/website/src/pages/en/resources/delegating/_meta.js deleted file mode 100644 index 8d6514a7dc23..000000000000 --- a/website/src/pages/en/resources/delegating/_meta.js +++ /dev/null @@ -1,4 +0,0 @@ -export default { - delegating: '', - undelegating: 'Undelegating', -} diff --git a/website/src/pages/en/resources/delegating/delegating.mdx b/website/src/pages/en/resources/delegating/delegating.mdx deleted file mode 100644 index 79804c78a501..000000000000 --- a/website/src/pages/en/resources/delegating/delegating.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: Delegating ---- - -To start delegating right away, check out [delegate on the graph](https://thegraph.com/explorer/delegate?chain=arbitrum-one). - -## Overview - -Delegators earn GRT by delegating GRT to Indexers, which helps network security and functionality. - - - -## Benefits of Delegating - -- Strengthen the network’s security and scalability by supporting Indexers. -- Earn a portion of rewards generated by the Indexers. - -## How Does Delegation Work? - -Delegators earn GRT rewards from the Indexer(s) they choose to delegate their GRT to. - -An Indexer's ability to process queries and earn rewards depends on three key factors: - -1. The Indexer's Self-Stake (GRT staked by the Indexer). -2. The total GRT delegated to them by Delegators. -3. The price the Indexer sets for queries. - -The more GRT staked and delegated to an Indexer, the more queries they can serve, leading to higher potential rewards for both the Delegator and Indexer. - -### What is Delegation Capacity? - -Delegation Capacity refers to the maximum amount of GRT an Indexer can accept from Delegators, based on the Indexer's Self-Stake. - -The Graph Network includes a delegation ratio of 16, meaning an Indexer can accept up to 16 times their Self-Stake in delegated GRT. - -For example, if an Indexer has a Self-Stake of 1M GRT, their Delegation Capacity is 16M. - -### Why Does Delegation Capacity Matter? - -If an Indexer exceeds their Delegation Capacity, rewards for all Delegators become diluted because the excess delegated GRT cannot be used effectively within the protocol. - -This makes it crucial for Delegators to evaluate an Indexer's current Delegation Capacity before selecting an Indexer. - -Indexers can increase their Delegation Capacity by increasing their Self-Stake, thereby raising the limit for delegated tokens. - -## Delegating under Graph Horizon - -Graph Horizon introduces per-data-service delegation. When delegating, you choose: - -- **An Indexer** — the operator you are delegating to -- **A data service** — currently SubgraphService (the primary data service for subgraph indexing) - -Your delegation earns rewards based on the indexer's activity on the specific data service you delegated to. - -**Existing delegations:** If you delegated GRT before Graph Horizon launched, your delegation was automatically migrated to SubgraphService. No action was required. - -**Multiple undelegations:** Horizon supports up to 1,000 simultaneous undelegation requests, removing the previous restriction to a single active undelegation at a time. - -### Future Slashability - -Horizon introduces the technical capability for delegated stake to be slashed in the future. This capability is not currently enabled for SubgraphService, but delegators should be aware it may be activated in future protocol upgrades. Monitor governance proposals for any changes to slashing parameters. - -## Delegation on The Graph - - - -> Please note this guide does not cover steps such as setting up MetaMask. The Ethereum community provides a [comprehensive resource regarding wallets](https://ethereum.org/en/wallets/). - -There are two sections in this guide: - -- The risks of delegating tokens in The Graph Network -- How to calculate expected returns as a Delegator - -## Delegation Risks - -Listed below are the main risks of being a Delegator in the protocol. - -### No Delegation Tax - -Under Graph Horizon, there is no delegation tax — the parameter has been removed from the protocol entirely. You can delegate and undelegate without incurring any protocol-level fee on your principal. - -> **Note:** The 0.5% delegation tax that existed prior to Graph Horizon has been permanently removed. - -### The Undelegation Period - -When a Delegator chooses to undelegate, their tokens are subject to a 28-day undelegation period. - -This means they cannot transfer their tokens or earn any rewards for 28 days. - -After the undelegation period, GRT will return to your crypto wallet. - -### Why is this important? - -If you choose an Indexer that is not trustworthy or not doing a good job, you will want to undelegate. This means you will be losing opportunities to earn rewards. - -As a result, it’s recommended that you choose an Indexer wisely. - -![Delegation unbonding. Note the 28 day unbonding period.](/img/Delegation-Unbonding.png) - -#### Delegation Parameters - -In order to understand how to choose a trustworthy Indexer, you need to understand the Delegation Parameters. - -- **Indexing Reward Cut** - The portion of the rewards the Indexer will keep for themselves. - - If an Indexer's reward cut is set to 100%, as a Delegator, you will get 0 indexing rewards. - - If it is set to 80%, as a Delegator, you will receive 20%. - -![Indexing Reward Cut. The top Indexer is giving Delegators 90% of the rewards. The middle one is giving Delegators 20%. The bottom one is giving Delegators ~83%.](/img/Indexing-Reward-Cut.png) - -- **Query Fee Cut** - This is just like the Indexing Reward Cut, but it applies to returns on the query fees that the Indexer collects. - -- It is highly recommended that you explore [The Graph Discord](https://discord.gg/graphprotocol) to determine which Indexers have the best social and technical reputations. -- Many Indexers are active in Discord and will be happy to answer your questions. - -## Calculating Delegators Expected Return - -> Calculate the ROI on your delegation [here](https://thegraph.com/explorer/delegate?chain=arbitrum-one). - -A Delegator must consider a variety of factors to determine a return: - -An Indexer's ability to use the delegated GRT available to them impacts their rewards. - -If an Indexer does not allocate all the GRT at their disposal, they may miss out on maximizing potential earnings for both themselves and their Delegators. - -Indexers can close an allocation and collect rewards at any time within the 1 to 28-day window. However, if rewards are not promptly collected, the total rewards may appear lower, even if a percentage of rewards remain unclaimed. - -### Considering the query fee cut and indexing fee cut - -You should choose an Indexer that is transparent about setting their Query Fee and Indexing Fee Cuts. - -The formula is: - -![Delegation Image 3](/img/Delegation-Reward-Formula.png) - -### Considering the Indexer's delegation pool - - - -Delegators should consider the proportion of the Delegation Pool they own. - -All delegation rewards are shared evenly, with a pool rebalancing based on the amount the Delegator deposited into the pool. - -This gives the Delegator a share of the pool: - -![Share formula](/img/Share-Forumla.png) - -> The formula above shows that it is possible for an Indexer offering only 20% to Delegators to provide a better reward than an Indexer giving 90%. Simply do the math to determine the best reward. - -## Delegator FAQs and Bugs - -### MetaMask "Pending Transaction" Bug - -At times, attempts to delegate to Indexers via MetaMask can fail and result in prolonged periods of "Pending" or "Queued" transaction attempts. - -A simple resolution to this bug is to restart the browser (e.g., using "abort:restart" in the address bar), which will cancel all previous attempts without gas being subtracted from the wallet. Several users who have encountered this issue have reported successful transactions after restarting their browser and attempting to delegate. diff --git a/website/src/pages/en/resources/delegating/undelegating.mdx b/website/src/pages/en/resources/delegating/undelegating.mdx deleted file mode 100644 index 3ea693b1bb48..000000000000 --- a/website/src/pages/en/resources/delegating/undelegating.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: Undelegating ---- - -Learn how to withdraw your delegated tokens through [Graph Explorer](https://thegraph.com/explorer) or [Arbiscan](https://arbiscan.io/). - -> To avoid this in the future, it's recommended that you select an Indexer wisely. To learn how to select and Indexer, check out the Delegate section in Graph Explorer. - -## How to Withdraw Using Graph Explorer - -### Step-by-Step - -1. Visit [Graph Explorer](https://thegraph.com/explorer). Please make sure you're on Explorer and **not** Subgraph Studio. -2. Click on your profile. You can find it on the top right corner of the page. - - Make sure that your wallet is connected. If it's not connected, you will see the "connect" button instead. -3. Once you're in your profile, click on the Delegating tab. In the Delegating tab, you can view the list of Indexers you have delegated to. -4. Click on the Indexer from which you wish to withdraw your tokens. - - Make sure to note the specific Indexer, as you will need to find them again to withdraw. -5. Select the "Undelegate" option by clicking on the three dots next to the Indexer on the right side, see image below: - - ![Undelegate button](/img/undelegate-button.png) - -6. After approximately [28 epochs](https://thegraph.com/explorer/network/epochs?chain=arbitrum-one) (28 days), return to the Delegate section and locate the specific Indexer you undelegated from. -7. Once you find the Indexer, click on the three dots next to them and proceed to withdraw all your tokens. - -## How to Withdraw Using Arbiscan - -> This process is primarily useful if the UI in Graph Explorer experiences issues. - -### Step-by-Step - -1. Find your delegation transaction on Arbiscan. - - Here's an [example transaction on Arbiscan](https://arbiscan.io/tx/0xcf2110eac897099f821064445041031efb32786392bdbe7544a4cb7a6b2e4f9a) -2. Navigate to "Transaction Action" where you can find the staking extension contract: - - [This is the staking extension contract for the example listed above](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03) -3. Then click on "Contract". ![Contract tab on Arbiscan, between NFT Transfers and Events](/img/arbiscan-contract.png) -4. Scroll to the bottom and copy the Contract ABI. There should be a small button next to it that allows you to copy everything. -5. Click on your profile button in the top right corner of the page. If you haven't created an account yet, please do so. -6. Once you're in your profile, click on "Custom ABI”. -7. Paste the custom ABI you copied from the staking extension contract, and add the custom ABI for the address: 0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03 (**sample address**) -8. Go back to the [staking extension contract](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03#writeProxyContract). Now, call the `unstake` function in the [Write as Proxy tab](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03#writeProxyContract), which has been added thanks to the custom ABI, with the number of tokens that you delegated. -9. If you don't know how many tokens you delegated, you can call `getDelegation` on the Read Custom tab. You will need to paste your address (delegator address) and the address of the Indexer that you delegated to, as shown in the following screenshot: - - ![Both of the addresses needed](/img/get-delegate.png) - - This will return three numbers. The first number is the amount you can unstake. - -10. After you have called `unstake`, you can withdraw after approximately 28 epochs (28 days) by calling the `withdraw` function. -11. You can see how much you will have available to withdraw by calling the `getWithdrawableDelegatedTokens` on Read Custom and passing it your delegation tuple. See screenshot below: - - ![Call `getWithdrawableDelegatedTokens` to see amount of tokens that can be withdrawn](/img/withdraw-available.png) - -## Additional Resources - -To delegate successfully, review the [delegating documentation](/resources/delegating/delegating/) and check out the delegate section in Graph Explorer. diff --git a/website/src/pages/en/resources/getting-grt.mdx b/website/src/pages/en/resources/getting-grt.mdx index 64e80eb3b5ce..0e7d0014fa2c 100644 --- a/website/src/pages/en/resources/getting-grt.mdx +++ b/website/src/pages/en/resources/getting-grt.mdx @@ -5,7 +5,7 @@ title: Getting GRT GRT is the native token of The Graph protocol. Every role in the network uses it: - **Subgraph developers and data consumers** pay for queries with GRT through [Subgraph Studio billing](/subgraphs/providers/subgraph-studio/introduction/) and add GRT as [curation signal](/subgraphs/developing/curating/) to attract Indexers. -- **Delegators** [delegate GRT](/resources/delegating/delegating/) to Indexers to earn a share of their rewards. +- **Delegators** [delegate GRT](/resources/delegating/) to Indexers to earn a share of their rewards. - **Indexers** stake GRT to [operate on the network](/indexing/overview/). - **Token holders** hold, transfer, or put GRT to work in any of the roles above. @@ -131,5 +131,5 @@ You can learn more about getting ETH on Binance [here](https://www.binance.com/e - [Bridge GRT](/resources/bridging-grt/) from Ethereum Mainnet to Arbitrum One. - [Add GRT to your Subgraph Studio billing balance](/subgraphs/providers/subgraph-studio/introduction/#query-payments-with-grt). -- [Delegate GRT](/resources/delegating/delegating/) to an Indexer. +- [Delegate GRT](/resources/delegating/) to an Indexer. - [Add curation signal](/subgraphs/developing/curating/) to your Subgraph. diff --git a/website/src/pages/en/resources/glossary.mdx b/website/src/pages/en/resources/glossary.mdx index e204006aacbe..ed3758e51581 100644 --- a/website/src/pages/en/resources/glossary.mdx +++ b/website/src/pages/en/resources/glossary.mdx @@ -17,7 +17,7 @@ title: Glossary - **Indexer Revenue Streams**: Indexers are rewarded in GRT with two components: query fee rebates and indexing rewards. 1. **Query Fee Rebates**: Payments from Subgraph consumers for serving queries on the network. - 2. **Indexing Rewards**: The rewards that Indexers receive for indexing Subgraphs. Indexing rewards are generated via new issuance of 3% GRT annually. + 2. **Indexing Rewards**: The rewards that Indexers receive for indexing Subgraphs. Indexing rewards are generated via new issuance of 3% GRT annually. Only Indexers that meet the [rewards eligibility](/indexing/rewards-eligibility/) standard receive them. - **Indexer's Self-Stake**: The amount of GRT that Indexers stake to participate in the decentralized network. The minimum is 100,000 GRT, and there is no upper limit. @@ -25,7 +25,7 @@ title: Glossary - **Upgrade Indexer**: An Indexer designed to act as a fallback for Subgraph queries not serviced by other Indexers on the network. The upgrade Indexer is not competitive with other Indexers. -- **Delegator**: Network participants who own GRT and delegate their GRT to Indexers. This allows Indexers to increase their stake in Subgraphs on the network. In return, Delegators receive a portion of the Indexing Rewards that Indexers receive for processing Subgraphs. +- **Delegator**: Network participants who own GRT and delegate their GRT to Indexers. This allows Indexers to increase their stake in Subgraphs on the network. In return, Delegators receive a portion of the Indexing Rewards that Indexers receive for processing Subgraphs. If the Indexer is not eligible for indexing rewards under the [Rewards Eligibility Oracle](/indexing/rewards-eligibility/), its Delegators do not receive indexing rewards either. - **Delegation Tax**: A 0.5% fee that Delegators previously paid when delegating GRT to Indexers. It was removed under [Graph Horizon](/graph-horizon/what-changes/), so delegating no longer incurs a protocol fee. @@ -54,7 +54,9 @@ title: Glossary - **Slashing**: Indexers can have their self-staked GRT slashed for providing an incorrect POI or for serving inaccurate data. The slashing percentage is a protocol parameter currently set to 2.5% of an Indexer's self-stake. 50% of the slashed GRT goes to the Fisherman that disputed the inaccurate data or incorrect POI. The other 50% is burned. -- **Indexing Rewards**: The rewards that Indexers receive for indexing Subgraphs. Indexing rewards are distributed in GRT. +- **Indexing Rewards**: The rewards that Indexers receive for indexing Subgraphs. Indexing rewards are distributed in GRT, only to Indexers that are eligible under the Rewards Eligibility Oracle. + +- **Rewards Eligibility Oracle (REO)**: The protocol component that decides which Indexers can collect indexing rewards. An Indexer stays eligible by serving qualifying queries across a minimum number of Subgraphs on enough days within a rolling 28-day window. Eligibility status for every Indexer is public on the [REO dashboard](https://reo.thegraph.com/). See [Indexing Rewards Eligibility](/indexing/rewards-eligibility/). - **Delegation Rewards**: The rewards that Delegators receive for delegating GRT to Indexers. Delegation rewards are distributed in GRT. diff --git a/website/src/pages/en/resources/tokenomics.mdx b/website/src/pages/en/resources/tokenomics.mdx index 45892a862bed..7241cb6264c1 100644 --- a/website/src/pages/en/resources/tokenomics.mdx +++ b/website/src/pages/en/resources/tokenomics.mdx @@ -40,7 +40,7 @@ Indexers are delegated GRT by Delegators, increasing the Indexer’s stake in Su For example, if a Delegator were to delegate 15k GRT to an Indexer offering 10%, the Delegator would receive ~1,500 GRT in rewards annually. -Under [Graph Horizon](/graph-horizon/what-changes/), there is no delegation tax, so Delegators can delegate without paying a protocol fee on their GRT. If a Delegator chooses to withdraw their delegated GRT, they must wait for the 28-day undelegation period. Learn more about [delegating](/resources/delegating/delegating/). +Under [Graph Horizon](/graph-horizon/what-changes/), there is no delegation tax, so Delegators can delegate without paying a protocol fee on their GRT. If a Delegator chooses to withdraw their delegated GRT, they must wait for the 28-day undelegation period. Learn more about [delegating](/resources/delegating/). If you're reading this, you're capable of becoming a Delegator right now by heading to the [network participants page](https://thegraph.com/explorer/participants/indexers), and delegating GRT to an Indexer of your choice. @@ -56,7 +56,7 @@ Developers build and query Subgraphs to retrieve blockchain data. Since Subgraph ### Creating a Subgraph -Developers can [create a Subgraph](/developing/creating-a-subgraph/) to index data on the blockchain. Subgraphs are instructions for Indexers about which data should be served to consumers. +Developers can [create a Subgraph](/subgraphs/developing/creating/starting-your-subgraph/) to index data on the blockchain. Subgraphs are instructions for Indexers about which data should be served to consumers. Once developers have built and tested their Subgraph, they can [publish their Subgraph](/subgraphs/developing/deploying-publishing/publishing-a-subgraph/) on The Graph's decentralized network. @@ -76,7 +76,7 @@ Indexers can earn GRT rewards in two ways: 1. **Query fees**: GRT paid by developers or users for Subgraph data queries. Query fees are directly distributed to Indexers according to the exponential rebate function (see GIP [here](https://forum.thegraph.com/t/gip-0051-exponential-query-fee-rebates-for-indexers/4162)). -2. **Indexing rewards**: the 3% annual issuance is distributed to Indexers based on the number of Subgraphs they are indexing. These rewards incentivize Indexers to index Subgraphs, occasionally before the query fees begin, to accrue and submit Proofs of Indexing (POIs), verifying that they have indexed data accurately. +2. **Indexing rewards**: the 3% annual issuance is distributed to Indexers based on the number of Subgraphs they are indexing. Only Indexers that meet the [rewards eligibility](/indexing/rewards-eligibility/) standard, which requires serving queries across a minimum number of Subgraphs, receive indexing rewards. These rewards incentivize Indexers to index Subgraphs, occasionally before the query fees begin, to accrue and submit Proofs of Indexing (POIs), verifying that they have indexed data accurately. Each Subgraph is allotted a portion of the total network token issuance, based on the amount of the Subgraph’s curation signal. That amount is then rewarded to Indexers based on their allocated stake on the Subgraph. @@ -84,7 +84,7 @@ In order to run an indexing node, Indexers must self-stake 100,000 GRT or more w Indexers can increase their GRT allocations on Subgraphs by accepting GRT delegation from Delegators, and they can accept up to 16 times their initial self-stake. If an Indexer becomes "over-delegated" (i.e., more than 16 times their initial self-stake), they will not be able to use the additional GRT from Delegators until they increase their self-stake in the network. -The amount of rewards an Indexer receives can vary based on the Indexer's self-stake, accepted delegation, quality of service, and many more factors. +The amount of rewards an Indexer receives can vary based on the Indexer's self-stake, accepted delegation, quality of service, and many more factors. An Indexer that does not meet the [rewards eligibility](/indexing/rewards-eligibility/) standard receives no indexing rewards until it qualifies again. ## Token Supply: Burning & Issuance diff --git a/website/src/pages/en/subgraphs/developing/creating/advanced.mdx b/website/src/pages/en/subgraphs/developing/creating/advanced.mdx index 3c2ece74ffac..525c92e9feaa 100644 --- a/website/src/pages/en/subgraphs/developing/creating/advanced.mdx +++ b/website/src/pages/en/subgraphs/developing/creating/advanced.mdx @@ -6,13 +6,15 @@ title: Advanced Subgraph Features Add and implement advanced Subgraph features to enhance your Subgraph's build. +### Experimental Features + Starting from `specVersion` `0.0.4`, Subgraph features must be explicitly declared in the `features` section at the top level of the manifest file, using their `camelCase` name, as listed in the table below: -| Feature | Name | -| ---------------------------------------------------- | ---------------- | -| [Non-fatal errors](#non-fatal-errors) | `nonFatalErrors` | -| [Full-text Search](#defining-fulltext-search-fields) | `fullTextSearch` | -| [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | +| Feature | Name | +| --------------------------------------------------------------------------------------------- | ---------------- | +| [Non-fatal errors](#non-fatal-errors) | `nonFatalErrors` | +| [Full-text Search](/subgraphs/developing/creating/ql-schema/#defining-fulltext-search-fields) | `fullTextSearch` | +| [Grafting](#grafting-onto-existing-subgraphs) | `grafting` | For instance, if a Subgraph uses the **Full-Text Search** and the **Non-fatal Errors** features, the `features` field in the manifest should be: @@ -210,7 +212,7 @@ type TokenMetadata @entity { If the relationship is 1:1 between the parent entity and the resulting file data source entity, the simplest pattern is to link the parent entity to a resulting file entity by using the IPFS CID as the lookup. Get in touch on Discord if you are having difficulty modelling your new file-based entities! -> You can use [nested filters](/subgraphs/querying/graphql-api/#example-for-nested-entity-filtering) to filter parent entities on the basis of these nested entities. +> You can use [nested filters](/subgraphs/querying/graphql-api/#nested-entity-filtering-example) to filter parent entities on the basis of these nested entities. #### Add a new templated data source with `kind: file/ipfs` or `kind: file/arweave` @@ -363,7 +365,7 @@ Handlers for File Data Sources cannot be in files which import `eth_call` contra ## Indexed Argument Filters / Topic Filters -> **Requires**: [SpecVersion](#specversion-releases) >= `1.2.0` +> **Requires**: [SpecVersion](/subgraphs/developing/creating/subgraph-manifest/#specversion-releases) >= `1.2.0` Topic filters, also known as indexed argument filters, are a powerful feature in Subgraphs that allow users to precisely filter blockchain events based on the values of their indexed arguments. diff --git a/website/src/pages/en/subgraphs/developing/creating/ql-schema.mdx b/website/src/pages/en/subgraphs/developing/creating/ql-schema.mdx index 2552e08e8d9e..713951e5b4c8 100644 --- a/website/src/pages/en/subgraphs/developing/creating/ql-schema.mdx +++ b/website/src/pages/en/subgraphs/developing/creating/ql-schema.mdx @@ -274,7 +274,7 @@ type Band @entity { } ``` -The example `bandSearch` field can be used in queries to filter `Band` entities based on the text documents in the `name`, `description`, and `bio` fields. Jump to [GraphQL API - Queries](/subgraphs/querying/graphql-api/#queries) for a description of the fulltext search API and more example usage. +The example `bandSearch` field can be used in queries to filter `Band` entities based on the text documents in the `name`, `description`, and `bio` fields. Jump to [GraphQL API - Full-Text Search](/subgraphs/querying/graphql-api/#full-text-search-example) for a description of the fulltext search API and more example usage. ```graphql query { @@ -287,7 +287,7 @@ query { } ``` -> **[Feature Management](#experimental-features):** From `specVersion` `0.0.4` and onwards, `fullTextSearch` must be declared under the `features` section in the Subgraph manifest. +> **[Feature Management](/subgraphs/developing/creating/advanced/#experimental-features):** From `specVersion` `0.0.4` and onwards, `fullTextSearch` must be declared under the `features` section in the Subgraph manifest. ## Languages supported diff --git a/website/src/pages/en/subgraphs/developing/creating/subgraph-manifest.mdx b/website/src/pages/en/subgraphs/developing/creating/subgraph-manifest.mdx index 359c75b3f636..9fe50054e22a 100644 --- a/website/src/pages/en/subgraphs/developing/creating/subgraph-manifest.mdx +++ b/website/src/pages/en/subgraphs/developing/creating/subgraph-manifest.mdx @@ -89,7 +89,7 @@ The important entries to update for the manifest are: - `repository`: the URL of the repository where the Subgraph manifest can be found. This is also displayed in Graph Explorer. -- `features`: a list of all used [feature](#experimental-features) names. +- `features`: a list of all used [feature](/subgraphs/developing/creating/advanced/#experimental-features) names. - `indexerHints.prune`: Defines the retention of historical block data for a Subgraph. See [prune](#prune) in [indexerHints](#indexer-hints) section. @@ -539,14 +539,10 @@ indexerHints: | Version | Release notes | | :-: | --- | -| 1.3.0 | Added support for [Subgraph Composition](/subgraphs/guides/subgraph-composition/) | +| 1.3.0 | Added support for [Subgraph Composition](/subgraphs/best-practices/subgraph-composition/) | | 1.2.0 | Added support for [Indexed Argument Filtering](/subgraphs/developing/creating/advanced/#indexed-argument-filters--topic-filters) & declared `eth_call` | | 1.1.0 | Supports [Timeseries & Aggregations](/subgraphs/developing/creating/advanced/#timeseries-and-aggregations). Added support for type `Int8` for `id`. | | 1.0.0 | Supports [`indexerHints`](/subgraphs/developing/creating/subgraph-manifest/#indexer-hints) feature to prune Subgraphs | -| 1.3.0 | Added support for [Subgraph Composition](/subgraphs/best-practices/subgraph-composition/) | -| 1.2.0 | Added support for [Indexed Argument Filtering](/developing/creating/advanced/#indexed-argument-filters--topic-filters) & declared `eth_call` | -| 1.1.0 | Supports [Timeseries & Aggregations](/developing/creating/advanced/#timeseries-and-aggregations). Added support for type `Int8` for `id`. | -| 1.0.0 | Supports [`indexerHints`](/developing/creating/subgraph-manifest/#indexer-hints) feature to prune Subgraphs | | 0.0.9 | Supports `endBlock` feature | | 0.0.8 | Added support for polling [Block Handlers](/subgraphs/developing/creating/subgraph-manifest/#polling-filter) and [Initialisation Handlers](/subgraphs/developing/creating/subgraph-manifest/#once-filter). | | 0.0.7 | Added support for [File Data Sources](/subgraphs/developing/creating/advanced/#ipfsarweave-file-data-sources). | diff --git a/website/src/pages/en/subgraphs/developing/curating.mdx b/website/src/pages/en/subgraphs/developing/curating.mdx index 7822fe9647b1..34319d026ecc 100644 --- a/website/src/pages/en/subgraphs/developing/curating.mdx +++ b/website/src/pages/en/subgraphs/developing/curating.mdx @@ -14,6 +14,8 @@ Before anyone can query a Subgraph on The Graph Network, an Indexer has to sync - **Select community-supported networks:** On some networks without indexing rewards, community Indexers have committed to sync every published Subgraph above a set signal threshold. For example, InfraDAO supports published Subgraphs with 500+ GRT in signal on select chains. - **Other networks without indexing rewards:** Signal does not attract Indexers, because there are no rewards to direct. Check your Subgraph's [indexing reward eligibility](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md) and network support before you add signal. +On networks with indexing rewards, Indexers must also serve queries across a minimum number of Subgraphs to stay eligible for those rewards under the [Rewards Eligibility Oracle](/indexing/rewards-eligibility/). Indexers therefore look for Subgraphs that combine signal with real query traffic, so a Subgraph that applications actually query is more attractive to sync. + ## How Much Signal to Add Use this table to choose a signal amount for your Subgraph. More signal attracts more Indexers, which gives your Subgraph better redundancy and quality of service. These amounts are guidelines, not guarantees. The number of Indexers your Subgraph attracts also depends on query volume and overall network activity. @@ -74,7 +76,7 @@ If a Subgraph is deleted, Curators can still withdraw their GRT, but GRT is not - If you signal with auto-migrate, your signal moves to the fixed version when the developer publishes it, which incurs the curation tax. - If you signal on a specific version, you need to withdraw and signal on the new version yourself, which incurs the curation tax on the new deposit. -Curators cannot be slashed. For a network role with a different risk profile, see [Delegating](/resources/delegating/delegating/). +Curators cannot be slashed. For a network role with a different risk profile, see [Delegating](/resources/delegating/). ## Curation FAQs diff --git a/website/src/pages/en/subgraphs/developing/deploying-publishing/multiple-networks.mdx b/website/src/pages/en/subgraphs/developing/deploying-publishing/multiple-networks.mdx index c4cce03bd3ee..9d11672134f7 100644 --- a/website/src/pages/en/subgraphs/developing/deploying-publishing/multiple-networks.mdx +++ b/website/src/pages/en/subgraphs/developing/deploying-publishing/multiple-networks.mdx @@ -3,7 +3,7 @@ title: Deploying a Subgraph to Multiple Networks sidebarTitle: Deploy to Multiple Networks --- -This page explains how to deploy a Subgraph to multiple networks. To deploy a Subgraph you need to first install the [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli). If you have not created a Subgraph already, see [Creating a Subgraph](/developing/creating-a-subgraph/). +This page explains how to deploy a Subgraph to multiple networks. To deploy a Subgraph you need to first install the [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli). If you have not created a Subgraph already, see [Creating a Subgraph](/subgraphs/developing/creating/starting-your-subgraph/). ## Deploying the Subgraph to multiple networks diff --git a/website/src/pages/en/subgraphs/developing/deploying-publishing/publishing-a-subgraph.mdx b/website/src/pages/en/subgraphs/developing/deploying-publishing/publishing-a-subgraph.mdx index 2a906601eb8b..278642963595 100644 --- a/website/src/pages/en/subgraphs/developing/deploying-publishing/publishing-a-subgraph.mdx +++ b/website/src/pages/en/subgraphs/developing/deploying-publishing/publishing-a-subgraph.mdx @@ -3,7 +3,7 @@ title: Publishing a Subgraph to the Decentralized Network sidebarTitle: Publish to the Network --- -Once you have [deployed your Subgraph to Subgraph Studio](/deploying/deploying-a-subgraph-to-studio/) and it's ready to go into production, you can publish it to the decentralized network. +Once you have [deployed your Subgraph to Subgraph Studio](/subgraphs/developing/deploying-publishing/using-subgraph-studio/) and it's ready to go into production, you can publish it to the decentralized network. When you publish a Subgraph to the decentralized network, you make it available for: diff --git a/website/src/pages/en/subgraphs/developing/developer-faq.mdx b/website/src/pages/en/subgraphs/developing/developer-faq.mdx index d0b64fcd1999..128f6e920f9d 100644 --- a/website/src/pages/en/subgraphs/developing/developer-faq.mdx +++ b/website/src/pages/en/subgraphs/developing/developer-faq.mdx @@ -13,7 +13,7 @@ A Subgraph is a custom API built on blockchain data. Subgraphs are queried using ### 2. What is the first step to create a Subgraph? -To successfully create a Subgraph, you will need to install The Graph CLI. Review the [Quick Start](/subgraphs/quick-start/) to get started. For detailed information, see [Creating a Subgraph](/developing/creating-a-subgraph/). +To successfully create a Subgraph, you will need to install The Graph CLI. Review the [Quick Start](/subgraphs/quick-start/) to get started. For detailed information, see [Creating a Subgraph](/subgraphs/developing/creating/starting-your-subgraph/). ### 3. Can I still create a Subgraph if my smart contracts don't have events? diff --git a/website/src/pages/en/subgraphs/existing-subgraphs/explorer.mdx b/website/src/pages/en/subgraphs/existing-subgraphs/explorer.mdx index 8bc5ac5d068b..ecbef796fd50 100644 --- a/website/src/pages/en/subgraphs/existing-subgraphs/explorer.mdx +++ b/website/src/pages/en/subgraphs/existing-subgraphs/explorer.mdx @@ -87,6 +87,8 @@ Indexers are the backbone of the protocol. They stake on Subgraphs, index them, In the Indexers table, you can see an Indexer's delegation parameters, their stake, how much they have staked to each Subgraph, and how much revenue they have made from query fees and indexing rewards. +> **Note:** Before delegating, check whether the Indexer is currently eligible for indexing rewards on the [REO dashboard](https://reo.thegraph.com/). If an Indexer is not eligible, neither it nor its Delegators receive indexing rewards. See [Indexing Rewards Eligibility](/indexing/rewards-eligibility/). + **Specifics** - Query Fee Cut: The % of the query fee rebates that the Indexer keeps when splitting with Delegators. @@ -139,7 +141,7 @@ In the Delegators table you can see the active Delegators in the community and i - Total amount of GRT they have currently in the protocol - The date they last delegated -If you want to learn more about how to become a Delegator, check out the [official documentation](/resources/delegating/delegating/) or [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). +If you want to learn more about how to become a Delegator, check out the [official documentation](/resources/delegating/) or [The Graph Academy](https://docs.thegraph.academy/official-docs/delegator/choosing-indexers). ### Step 4. Analyze Network Performance @@ -222,7 +224,7 @@ Track your Indexer performance with visual charts and key metrics, including: #### Delegating Tab -> To learn more about the benefits of delegating, check out [delegating](/resources/delegating/delegating/). +> To learn more about the benefits of delegating, check out [delegating](/resources/delegating/). The Delegators tab displays your active and historical delegations, along with the metrics for the Indexers you've delegated to. diff --git a/website/src/pages/en/subgraphs/existing-subgraphs/polymarket.mdx b/website/src/pages/en/subgraphs/existing-subgraphs/polymarket.mdx index 74efe387b0d7..b157409bf2b1 100644 --- a/website/src/pages/en/subgraphs/existing-subgraphs/polymarket.mdx +++ b/website/src/pages/en/subgraphs/existing-subgraphs/polymarket.mdx @@ -145,4 +145,4 @@ axios(graphQLRequest) For more information about querying data from your Subgraph, read more [here](/subgraphs/querying/introduction/). -To explore all the ways you can optimize & customize your Subgraph for a better performance, read more about [creating a Subgraph here](/developing/creating-a-subgraph/). +To explore all the ways you can optimize & customize your Subgraph for a better performance, read more about [creating a Subgraph here](/subgraphs/developing/creating/starting-your-subgraph/). diff --git a/website/src/pages/en/subgraphs/overview.mdx b/website/src/pages/en/subgraphs/overview.mdx index 0cca64c82cea..953d1baefa54 100644 --- a/website/src/pages/en/subgraphs/overview.mdx +++ b/website/src/pages/en/subgraphs/overview.mdx @@ -25,7 +25,7 @@ The **Subgraph definition** consists of the following files: - `mapping.ts`: [AssemblyScript Mappings](https://github.com/AssemblyScript/assemblyscript) code that translates event data into entities defined in your schema -To learn more about each Subgraph component, check out [creating a Subgraph](/developing/creating-a-subgraph/). +To learn more about each Subgraph component, check out [creating a Subgraph](/subgraphs/developing/creating/starting-your-subgraph/). ## Subgraph Lifecycle @@ -35,9 +35,9 @@ Here is a general overview of a Subgraph’s lifecycle: ## Subgraph Development -1. [Create a Subgraph](/developing/creating-a-subgraph/) -2. [Deploy a Subgraph](/deploying/deploying-a-subgraph-to-studio/) -3. [Test a Subgraph](/deploying/subgraph-studio/#testing-your-subgraph-in-subgraph-studio) +1. [Create a Subgraph](/subgraphs/developing/creating/starting-your-subgraph/) +2. [Deploy a Subgraph](/subgraphs/developing/deploying-publishing/using-subgraph-studio/) +3. [Test a Subgraph](/subgraphs/developing/deploying-publishing/using-subgraph-studio/#testing-your-subgraph) 4. [Publish a Subgraph](/subgraphs/developing/deploying-publishing/publishing-a-subgraph/) 5. [Signal on a Subgraph](/subgraphs/developing/deploying-publishing/publishing-a-subgraph/#adding-signal-to-your-subgraph) @@ -47,7 +47,7 @@ Great Subgraphs start with a local development environment and unit tests. Devel ### Deploy to Subgraph Studio -Once defined, a Subgraph can be [deployed to Subgraph Studio](/deploying/deploying-a-subgraph-to-studio/). In Subgraph Studio, you can do the following: +Once defined, a Subgraph can be [deployed to Subgraph Studio](/subgraphs/developing/deploying-publishing/using-subgraph-studio/). In Subgraph Studio, you can do the following: - Use its staging environment to index the deployed Subgraph and make it available for review. - Verify that your Subgraph doesn't have any indexing errors and works as expected. diff --git a/website/src/pages/en/subgraphs/querying/graphql-api.mdx b/website/src/pages/en/subgraphs/querying/graphql-api.mdx index 9777fb520b65..e4b6def5a418 100644 --- a/website/src/pages/en/subgraphs/querying/graphql-api.mdx +++ b/website/src/pages/en/subgraphs/querying/graphql-api.mdx @@ -282,7 +282,7 @@ Queries support historical state retrieval using the `block` parameter: ### Full-Text Search Example -Full-text search query fields provide an expressive text search API that can be added to the Subgraph schema and customized. Refer to [Defining Full-text Search Fields](/developing/creating-a-subgraph/#defining-fulltext-search-fields) to add full-text search to your Subgraph. +Full-text search query fields provide an expressive text search API that can be added to the Subgraph schema and customized. Refer to [Defining Full-text Search Fields](/subgraphs/developing/creating/ql-schema/#defining-fulltext-search-fields) to add full-text search to your Subgraph. Full-text search queries have one required field, `text`, for supplying search terms. Several special full-text operators are available to be used in this `text` search field. diff --git a/website/src/pages/en/subgraphs/tooling/skills.mdx b/website/src/pages/en/subgraphs/tooling/skills.mdx index 50d5efbf9518..dbc9a93aa625 100644 --- a/website/src/pages/en/subgraphs/tooling/skills.mdx +++ b/website/src/pages/en/subgraphs/tooling/skills.mdx @@ -97,9 +97,9 @@ Once installed, the AI assistant will have access to subgraph development expert - [Subgraph Guides & Best Practices](/subgraphs/best-practices/overview/) - [Subgraph Composition](/subgraphs/best-practices/subgraph-composition/) - Combine multiple subgraphs - [Subgraph Linter](/subgraphs/tooling/subgraph-linter/) - Static analysis tool -- [Subgraph Uncrashable](/subgraphs/developing/subgraph-uncrashable/) - Safe code generation +- [Subgraph Uncrashable](/subgraphs/tooling/subgraph-uncrashable/) - Safe code generation - [Matchstick Testing Framework](/subgraphs/tooling/unit-testing-framework/) -- [AssemblyScript API](/subgraphs/developing/creating/assemblyscript-api/) +- [AssemblyScript API](/subgraphs/developing/creating/graph-ts/api/) ## Platforms diff --git a/website/src/pages/en/substreams/developing/solana/transactions.mdx b/website/src/pages/en/substreams/developing/solana/transactions.mdx index 1542ae22dab7..8e195c98e4d8 100644 --- a/website/src/pages/en/substreams/developing/solana/transactions.mdx +++ b/website/src/pages/en/substreams/developing/solana/transactions.mdx @@ -36,12 +36,12 @@ Within the generated directories, modify your Substreams modules to include addi ## Step 3: Load the Data -To make your Substreams queryable (as opposed to [direct streaming](https://docs.substreams.dev/how-to-guides/sinks/stream)), you can automatically generate a [Substreams-powered Subgraph](/sps/introduction/) or SQL-DB sink. +To make your Substreams queryable (as opposed to [direct streaming](https://docs.substreams.dev/how-to-guides/sinks/stream)), you can automatically generate a [Substreams-powered Subgraph](/substreams/overview/) or SQL-DB sink. ### Subgraph 1. Run `substreams codegen subgraph` to initialize the sink, producing the necessary files and function definitions. -2. Create your [Subgraph mappings](/sps/triggers/) within the `mappings.ts` and associated entities within the `schema.graphql`. +2. Create your [Subgraph mappings](/substreams/overview/) within the `mappings.ts` and associated entities within the `schema.graphql`. 3. Build and deploy locally or to [Subgraph Studio](https://thegraph.com/studio-pricing/) by running `deploy-studio`. ### SQL diff --git a/website/src/pages/en/substreams/public-substreams/substreams-dev.mdx b/website/src/pages/en/substreams/public-substreams/substreams-dev.mdx index 9c46e8b9fe3f..8f9b8a2476eb 100644 --- a/website/src/pages/en/substreams/public-substreams/substreams-dev.mdx +++ b/website/src/pages/en/substreams/public-substreams/substreams-dev.mdx @@ -126,7 +126,7 @@ Projects are especially useful once you've found candidate packages in Datasets After you've found a package that fits your needs, you choose how to consume the data. Substreams supports multiple sinks: -- **[Subgraph](/sps/introduction/)** — configure an API to meet your data needs and host it on The Graph Network. +- **[Subgraph](/substreams/overview/)** — configure an API to meet your data needs and host it on The Graph Network. - **[SQL Database](https://docs.substreams.dev/how-to-guides/sinks/sql-sink)** — send the data to a Postgres or Clickhouse database. - **[Direct Streaming](https://docs.substreams.dev/how-to-guides/sinks/stream)** — stream data directly into your application. - **[PubSub](https://docs.substreams.dev/how-to-guides/sinks/pubsub)** — publish data to a PubSub topic. diff --git a/website/src/pages/en/substreams/quick-start.mdx b/website/src/pages/en/substreams/quick-start.mdx index cf2f3f0f7caa..2c765678f697 100644 --- a/website/src/pages/en/substreams/quick-start.mdx +++ b/website/src/pages/en/substreams/quick-start.mdx @@ -17,7 +17,7 @@ There are many ready-to-use Substreams packages available. You can explore these Once you find a package that fits your needs, you can choose how you want to consume the data: -- **[Subgraph](/sps/introduction/)**: Configure an API to meet your data needs and host it on The Graph Network. +- **[Subgraph](/substreams/overview/)**: Configure an API to meet your data needs and host it on The Graph Network. - **[SQL Database](https://docs.substreams.dev/how-to-guides/sinks/sql-sink)**: Send the data to a database. - **[Direct Streaming](https://docs.substreams.dev/how-to-guides/sinks/stream)**: Stream data directly to your application. - **[PubSub](https://docs.substreams.dev/how-to-guides/sinks/pubsub)**: Send data to a PubSub topic.