• © Goverland Inc. 2026
  • v1.0.5
  • Privacy Policy
  • Terms of Use
The Graph CouncilThe Graph Councilby0x38FA68D1C06BD272893908a74E6BcC67E28d4Da80x38FA…4Da8

GGP 0012: Create altruistic allocations and close stale allocations

Voting ended over 3 years agoSucceeded

GGP: 0012 Scope: Staking contract Created: GIPs-Repo-Latest-Commit: 9385b40faedd77c9af14eb6703b9c3f459e30949

GIPs

GIP: 0027 Title: Create altruistic allocations and close stale allocations Authors: Ariel Barmat ariel@thegraph.com , Sam Green sam@semiotic.ai Created: 2022-03-24 Stage: Candidate Discussions-To: https://forum.thegraph.com/t/gip-0027-create-altruistic-allocations-and-close-stale-allocations/3217

Abstract

Provide a mechanism so that indexers can opt-out of indexing rewards by allocating zero tokens to a subgraph. This would be useful for an indexer who wants to altruistically serve queries. In addition, this implementation allows the public to close stale allocations after the max allocation period, however, nobody can close an altruistic allocation.

Motivation

Stale allocations affect the stability of the network when an indexer that has a big proportional allocated stake on a subgraph does not keep it active, as other indexers won’t want to allocate if it already has a big allocation. Stale allocations also reduce the speed of how value flows through the protocol, reducing the frequency at which curators and delegators get their share of rewards and fees. Currently, delegators of an indexer are the only ones who can close stale allocations, but this is an unnecessary validation considering that anyone could turn into a delegator, even with the smallest amount of tokens, and then close it. For a summary of the current stale allocation statistics, see the “Allocation Age” histogram here: Dune 3.

Today, indexers must allocate more than zero tokens. However, indexers might want to index and serve queries on a particular subgraph altruistically by opting out of rewards. Today indexers can serve queries altruistically by presenting an empty PoI on closeAllocation, however, this is not efficient because they must still pay Ethereum transaction fees to “refresh” (i.e., close and re-open) their allocations. By allowing altruistic indexers to allocate zero tokens, we can skip all the code paths for updating indexing rewards and provide a huge gas improvement.

References

Audit report: https://github.com/graphprotocol/contracts/blob/064d362af559b6ebb3df18634b0141f12ad0ed53/audits/ConsenSysDiligence/2022-03-graph-altruistic-alloc-and-query-versioning.pdf Implementations: https://github.com/graphprotocol/contracts/pull/549 Implementations latest commit-hash: e999cb6d210a85bfb074dfe814c5d4b2bf3e88c1


Graph Governance Proposal-0012

Create altruistic allocations and close stale allocations

This proposal is to upgrade The Graph's protocol smart contracts running on Ethereum mainnet with the changes described in Graph Improvement Proposal (GIP) 0027, including the motivation and scope of the changes described in this proposal.

The code deployed that implements GIP-0027 must correspond to the commit hash included in the front matter of this governance proposal.

Following a successful "yes" vote, the protocol upgrade should be carried out at the earliest convenience using The Graph Council's Gnosis Multisig.

Off-Chain Vote

Yes
6 GC100%
No
0 GC0%
Download mobile app to vote

Discussion

The Graph CouncilGGP 0012: Create altruistic allocations and close stale allocations

Timeline

May 31, 2022Proposal created
May 31, 2022Proposal vote started
Jun 07, 2022Proposal vote ended
Oct 26, 2023Proposal updated