# GIP-0046: L2 Transfer Tools

**URL:** <https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023>\
**Category:** Graph Improvement Proposals (GIP)\
**Created:** [February 13, 2023, 9:20pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023 "2023-02-13T21:20:18Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [April 13, 2023, 8:00pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/21 "2023-04-13T20:00:02Z")

</div>

Great question. Yes, delegation migration is per-indexer, so you can choose when to migrate the delegation to each indexer separately, and choose a different L2 beneficiary for each delegation.

---

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [April 13, 2023, 10:15pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/22 "2023-04-13T22:15:38Z")

</div>

Updated the GIP with a PR to the repo:

> <https://github.com/graphprotocol/graph-improvement-proposals/pull/13>

I’ll update the forum post above soon, but here’s a summary of the changes:

- Proposed modifying the Arbitration Charter to make L1 offenses slashable in L2 if the indexer tries to evade slashing by migrating the stake to L2 (noted during the audit)
- Subgraph IDs will have to be aliased in L2 to avoid conflicts, the GIP now specifies the aliasing formula
- Added more details about the vesting contract migration, for fully-vested and still-vesting contracts.

---

<div class="post-metadata">

**Author:** ![DataNexus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/datanexus/32/1830_2.png) [@DataNexus](https://forum.thegraph.com/u/DataNexus)\
**Post date:** [April 21, 2023, 12:02am UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/23 "2023-04-21T00:02:52Z")

</div>

> [@Pablo](#):
>
> The Subgraph Owner confirms the first transaction, and the following will happen:
> 
> - The subgraph will be immediately deprecated in L1

If someone is using their subgraph in production, this will cause a temporary service outage while indexers on arbitrum recognize and open an allocation (and possibly sync) since this does not allow for N-1 support.

From the indexer community I’d like to raise some awareness on this to ensure we jump on subgraphs as soon as we identify the migrate transaction from the subgraph developer. I’ll chat with the dev of the curation station bot to get some alerts broadcasted as these occur.

Edit: Will the endpoints be the same on L2 for the subgraph?

---

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [April 21, 2023, 3:00am UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/24 "2023-04-21T03:00:10Z")

</div>

This is a very important point. There is ongoing work to allow Indexer Agent to support L1 and L2 simultaneously, which would also include a way for indexers to opt-in to keep serving these subgraphs for a while (maybe 24 hours?) after migration. This would give subgraph devs time to change the URLs to the L2 gateway after migration, and it would also allow indexers to use a single Graph Node instance, so they don’t need to re-sync the subgraph. (There’s ongoing work on the Gateway to also allow this by keeping the L1 URL active after the migration).

---

<div class="post-metadata">

**Author:** ![mindstyle\_p-ops](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mindstyle\_p-ops](https://forum.thegraph.com/u/mindstyle_p-ops)\
**Post date:** [April 21, 2023, 11:31am UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/25 "2023-04-21T11:31:40Z")

</div>

Hey guys, apologies i didnt read all the comments here, but as far as i know the migration basically resets indexers delegators, since they need to 1. be aware of the migration (which not everyone will be ofc) and 2. they dont need to stick with the original indexer

Imo this is a bit of a downer for existing indexers that did a lot to get delegation and now they potentially lose it. I am aware as well of the fact that its the delegators choice in the end what to do.

Maybe best thing here is to make sure all delegators are FULLY aware of the migration and what choice they have and what happens if they simply choose the same indexer on the L2. Hope that makes sense

---

<div class="post-metadata">

**Author:** ![DataNexus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/datanexus/32/1830_2.png) [@DataNexus](https://forum.thegraph.com/u/DataNexus)\
**Post date:** [April 21, 2023, 12:37pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/26 "2023-04-21T12:37:42Z")

</div>

> [@Pablo](#):
>
> There’s ongoing work on the Gateway to also allow this by keeping the L1 URL active after the migration

So the L1 endpoint will differ from the L2 endpoint? Having 24 hours will be very useful, huge +1 to that.

> [@mindstyle\_p-ops](#):
>
> they dont need to stick with the original indexer

Pablo, will the default option be to stick with the indexer if they have provided a L2 address? I would think that this would minimize delegator flight to other indexers.

> [@mindstyle\_p-ops](#):
>
> Maybe best thing here is to make sure all delegators are FULLY aware of the migration and what choice they have and what happens if they simply choose the same indexer on the L2.

We can probably utilize the help from the AdvocatesDAO to help raise awareness.

---

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [April 21, 2023, 2:06pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/27 "2023-04-21T14:06:57Z")

</div>

> [@mindstyle\_p-ops](#):
>
> 1. they dont need to stick with the original indexer

Delegators _do_ need to stick with the original indexer if they’re migrating. If they want to switch indexers, they’d have to undelegate waiting for the 28 day period, or wait until the indexer has fully migrated (i.e. no stake left behind on L2), and only then undelegate without waiting.

---

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [April 21, 2023, 2:09pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/28 "2023-04-21T14:09:59Z")

</div>

Yes, there are separate Gateway instances for L1 and L2, so the endpoints will be different. There’s some work going on to see if we can make the L1 Gateway redirect or proxy to the L2 Gateway for migrated subgraphs but it’s not quite straightforward.

I agree communication will be important, core devs and the Foundation will be using all available channels, and I think Indexers also using their channels to reach Delegators will also be very useful.

---

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [May 5, 2023, 7:58pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/29 "2023-05-05T19:58:48Z")

</div>

Hey folks, there’s some potential for confusion with the word “migration” as it’s been used to refer to migrating from the hosted service to the Network.

So we’re editing the proposal to rename the “Migration Helpers” to “L2 Transfer Tools”, and change function/contract/event names accordingly. I’ll be pushing the changes and editing the GIP above soon.

I’ll also edit GIP-0052 to reflect this.

Edit: this GIP has now been edited with this change.

---

<div class="post-metadata">

**Author:** ![PaulieB](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/paulieb/32/2006_2.png) [@PaulieB](https://forum.thegraph.com/u/PaulieB)\
**Post date:** [May 18, 2023, 11:51am UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/30 "2023-05-18T11:51:51Z")

</div>

Hey @Pablo ! I wanted to confirm if possible if curators/delegators would have to pay gas on each position if using the transfer tool. Or can they possibly do this in one transaction?

---

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [May 18, 2023, 2:42pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/31 "2023-05-18T14:42:13Z")

</div>

Hi @PaulieB, the delegation to each indexer and the curation to each subgraph have to be transferred separately.  
While it might’ve been technically possible to “bundle” these into a single retryable ticket, the added complexity would increase the risk of a ticket being unable to redeem in L2, which would mean all the transferred state is lost, besides making the validation on each side much trickier. So we tried to keep it as simple as possible (and even with this it’s still a relatively complex solution in the end).

---

<div class="post-metadata">

**Author:** ![PaulieB](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/paulieb/32/2006_2.png) [@PaulieB](https://forum.thegraph.com/u/PaulieB)\
**Post date:** [May 18, 2023, 3:03pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/32 "2023-05-18T15:03:51Z")

</div>

Makes sense. Thanks. This helps prepare for how to handle.

---

<div class="post-metadata">

**Author:** ![toxf1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/toxf1/32/2114_2.png) [@toxf1](https://forum.thegraph.com/u/toxf1)\
**Post date:** [May 31, 2023, 9:00am UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/33 "2023-05-31T09:00:12Z")

</div>

We have another question regarding migration of indexers with fully vested tokenlock contracts

Do i understand correctly that we have 2 options:

1. create an indexer on Arbitrum without tokenlock contract
2. create an indexer on Arbitrum with tokenlock contract

And in the 1st option we won’t be able to change the beneficiary of the tokenlock contract (aka owner of the indexer)?

If in 2 or 3 years we will have a necessity to change the owner address (reasons were highlighted in [GIP-0045](https://forum.thegraph.com/t/gip-0045-enable-beneficiary-change-for-indexers-tokenlock-smart-contracts/4017)) would the only way to do it be to migrate via creating a new tokenlock contract on Arbitrum (option №2)?

---

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [May 31, 2023, 12:52pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/34 "2023-05-31T12:52:01Z")

</div>

I’m not sure I follow what you mean with those two options, but to hopefully clarify, vesting lock beneficiaries **that are fully vested** have only one option to transfer to L2, and that option is to use the token lock transfer tool to choose what their L2 address will be. This can be any L2 address, so generally it will be an EOA or Arbitrum multisig (e.g. a Safe). After setting this address (and depositing some ETH for L2 gas), they can use the transfer tool to send their stake to L2, where it will be owned by the address they have chosen.

Since this address is not a vesting lock, there is no beneficiary to set or change once you’re in L2. If you need to change the _indexer_ address, that’s a whole different thing, and it would be quite tricky to allow it in the protocol as we discussed in that GIP-0045 thread. If you’re thinking about having to change the address you use for your indexer down the line, I’d suggest you use a multisig as your indexer address in L2 so that you can rotate the owner addresses or manage it however you prefer, but keeping the indexer address constant.

Not sure if this answers your question so please let me know!

---

<div class="post-metadata">

**Author:** ![toxf1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/toxf1/32/2114_2.png) [@toxf1](https://forum.thegraph.com/u/toxf1)\
**Post date:** [May 31, 2023, 1:38pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/35 "2023-05-31T13:38:13Z")

</div>

Yes, ok, multisig will also do the trick with the change of indexer’s owners, thanks.

So, now we have the structure:  
Beneficiary (=owner) → Tokenlock contract (Indexer) ← Operator

But in multisig case Indexer = Beneficiary (one address), correct?  
How can we assign different address to receive rewards?

---

<div class="post-metadata">

**Author:** ![Pablo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/pablo/32/1623_2.png) [@Pablo](https://forum.thegraph.com/u/Pablo)\
**Post date:** [May 31, 2023, 2:19pm UTC](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023/36 "2023-05-31T14:19:54Z")

</div>

In the multisig case, the Indexer will be the multisig (one address), which can have many owners and can be changed/rotated as needed. The rewards will by default be restaked for the Indexer, but you can also use `setRewardsDestination(address _destination)` on the Staking contract to set an address where rewards are sent. And you can also have an Operator address (or many) to handle day to day operations, just like before - the Operator is set on the Staking contract, not the vesting lock.

[Previous page](https://forum.thegraph.com/t/gip-0046-l2-transfer-tools/4023.md?page=1)
