• © Goverland Inc. 2026
  • v1.0.5
  • Privacy Policy
  • Terms of Use
The Graph CouncilThe Graph Councilby0xd201C95461F69A031Cdc317f453ff190890722aAadmin.palla.eth

GGP 0017: L2 Bridge and Protocol Deployment

Voting ended over 3 years agoSucceeded

GGP: 0017 Scope: Smart Contracts Created: 2022-11-08

GIPs

GIP-0040

GIP: 0040 Title: L2 Bridge and Protocol Deployment Authors: Pablo Carranza Vélez pablo@edgeandnode.com, Ariel Barmat ariel@edgeandnode.com, Tomás Migone tomas@edgeandnode.com Created: 2022-11-03 Updated: 2022-11-03 Category: Protocol Operations

Abstract

This GIP proposes the deployment of The Graph contracts on Arbitrum from the latest published version.

Motivation

As mentioned in GIP-0031, there is an interest in the community to move to an L2 to benefit from gas savings, and Arbitrum is thought by many to be the best candidate at this time. It is desirable to move to L2 gradually, however, as Arbitrum is still in beta and such a big protocol change is not without risks. Therefore, we’ve proposed having an experimental stage where rewards are not distributed in L2.

High Level Description

We propose a gradual move to L2 by deploying the new L2 protocol in parallel to the existing L1 deployment. Initially, this new deployment would be experimental because indexing rewards would be disabled. Eventually, governance can enable reward distribution.

The L2 network will mostly work like the existing L1 network. Most of the contracts will be deployed with no functional changes, so staking and curation can be done in the same way as in L1. To participate in the L2 network, users can move GRT to L2 using the bridge proposed in GIP-0031, though future GIPs can propose ways to facilitate migration of staked tokens or subgraphs and curated signal.

We propose deploying the L2 in 3 stages, though this GIP is only about the deployment of the first stage:

  • Stage 1: Deploy a mirror of L1 contracts on Arbitrum, including an L1-L2 bridge with disabled indexing rewards. In addition to that, we propose to deploy Curation in L2 with a flattened bonding curves as explained in GIP-0039.
  • Stage 2: Upgrade the protocol to support indexing rewards on L2.
  • Stage 3: Add migration helpers to facilitate users moving stake, delegations and subgraphs from L1 to L2. A similar GIP to this will be written to propose the deployments of phase 2 and 3 in the future.

Related Work

This GIP propose the deployment of the updates described in GIP-0031 and GIP-0039 and giving an outline about the different stages.

Stage 1: L2 Bridge and Protocol Deployment

  • GIP-0031: An Arbitrum GRT Bridge
  • GIP-0039: Curation 1.x

Stage 2: L2 Rewards

  • GIP-0034: The Graph Arbitrum deployment with rewards distribution using drip mechanism
  • GIP-0037: The Graph Arbitrum deployment with linear reward distribution minted on L2

L1 vs L2 Contracts Changes

Most of the protocol contracts are the same as the ones deployed on Mainnet Ethereum. The only difference is that the GraphToken is upgradeable on L2 and adds a few more functions required by the L2 Bridge.

New Contracts

Having a functioning L2 requires the deployment of an L1-L2 Bridge that can move state over. The bridge is comprised of three contracts that are in charge of passing cross-chain messages and lock GRT. We propose deploying the L1GraphTokenGateway, Escrow and L2GraphTokenGateway and set them up as the canonical bridge for GRT. Please refer to GIP-0031 for more information.

Operations

Most of the L2 deployment can be performed using a deployer account with sufficient funds that will then transfer governance to the Council. However, certain actions require the intervention from the Council.

  • Base L2 protocol contracts: deployed and configured by deployer, and then transferred to governance.
  • Bridge on L2: deployed and configured by deployer, and then transferred to governance.
  • Bridge on L1: deployed by deployer, configured by the Council.

The Bridge is Paused by default when deployed, the Council will send a transaction to unpause when the deployer verifies that the configuration is complete. The Council signals the acceptance of the L2 deployment by accepting ownership of the contracts and unpausing the bridge.

Dependencies

This document is proposing the deployment of the work described in GIP-0031 and GIP-0039.

Risks and Security Considerations

Please see the Related Work section for a full risk registry.

Validation

  • GIP-0031 has been audited by OpenZeppelin. You can find the audit report in the contracts repo.

  • The GIP-0031 code has been audited by a CodeArena bounty with no critical issues found.

  • The updates that this GIP propose to deploy has been tested in a private testnet using Goerli and Goerli Arbitrum Nitro according to a test plan developed by Edge & Node.

  • We will make public both the test plan and the contingency plan describing potential risks and failure modes.

Copyright Waiver

Copyright and related rights waived via CC0.

GIP-0031

GIP: 0031 Title: Arbitrum GRT bridge Authors: Pablo Carranza Velez pablo@edgeandnode.com Created: 2022-04-20 Updated: 2022-09-29 Discussions-To: https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305 Category: Protocol Logic, Protocol Interfaces Implementations: Original implementation was https://github.com/graphprotocol/contracts/pull/552 - superseded by https://github.com/graphprotocol/contracts/pull/699 Audits: Main report at https://github.com/graphprotocol/contracts/blob/a2a09a5aac15dd468d73f9c02618a74edafb0fff/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf - relevant issues summarized in https://github.com/graphprotocol/contracts/blob/a2a09a5aac15dd468d73f9c02618a74edafb0fff/audits/OpenZeppelin/2022-07-pr552-summary.pdf

Link to GIP-0031.

GIP 0039

GIP: 0039 Title: Curation v1.x Authors: Howard Heaton, Anirudh Patel Created: 2022-09-29 Updated: 2022-09-29 Category: Protocol Economics

Link to GIP-0039.


Graph Governance Proposal 0017

Following the approval of this proposal, Stage 1 of the protocol deployment to Arbitrum One will be executed as described on GIP 0040.

Off-Chain Vote

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

Timeline

Nov 08, 2022Proposal created
Nov 08, 2022Proposal vote started
Nov 15, 2022Proposal vote ended
Sep 09, 2024Proposal updated