Skip to main content

GRT $0.02006 up 3.10% Market cap $221.3M

Create altruistic allocations and close stale allocations

GGP-0012 · Council vote #13 on The Graph

Overview

Updated

Approved

Voting ended
Jun 7, 2022
Opened May 31, 2022
Submitted
May 31, 2022
May 31, 12:51 UTC
Members voted
6
One vote each, on Snapshot

Put to the Council by 0x38fa68…4da8

Votes

  • Yes 6 votes
  • No 0 votes

How BitBasic reads the result

  • Approved when more Council members chose Yes than No.
  • Each member has one vote, and Snapshot keeps a member's last.

Description

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.

How the Council voted

In the order they voted. Snapshot knows members by address only, so BitBasic doesn't name them.

Member Vote When
0x38fa68…4da8 Yes May 31, 13:17 UTC
0xb02ce5…80b0 Yes May 31, 18:05 UTC
0x37bc95…b391 Yes May 31, 18:58 UTC
0xe0fade…e639 Yes May 31, 19:00 UTC
0xd201c9…22aa Yes May 31, 22:13 UTC
0x4530af…ba9a Yes Jun 7, 09:38 UTC