Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/pages/en/resources/roles/_meta.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
delegating: '',
delegating: 'Delegating',
curating: '',
}
4 changes: 4 additions & 0 deletions website/pages/en/resources/roles/delegating/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
delegating: '',
undelegating: 'How to Undelegate',
}
55 changes: 55 additions & 0 deletions website/pages/en/resources/roles/delegating/undelegating.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
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](https://thegraph.com/explorer/delegate?chain=arbitrum-one) section in Graph Explorer.

## How to Withdraw Using Graph Explorer

### Step-by-Step

1. Visit the [Graph Explorer](https://thegraph.com/explorer). Please make sure you're on Explorer and **NOT** 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](https://thegraph.com/explorer/delegate?chain=arbitrum-one) 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](/img/undelegate-button.png)

6. After approximately [30 epochs](https://thegraph.com/explorer/network/epochs?chain=arbitrum-one) (30 days), return to the [Delegate section](https://thegraph.com/explorer/delegate?chain=arbitrum-one) and locate the specific Indexer you undelegated from.
7. Once you find the Indexer, you can click on the Indexer 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 on Arbiscan: [Transaction on Arbiscan](https://arbiscan.io/tx/0xcf2110eac897099f821064445041031efb32786392bdbe7544a4cb7a6b2e4f9a)
2. Navigate to "Transaction Action" where you can find the staking extension contract:
- For the example listed above it looks like this: [Sample Contract](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03)
3. Then click on "Contract". ![contract on arbiscan](/img/Contract-Arbiscan.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: [Sample 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 and the address of the Indexer that you delegated to.

- This will return three numbers. The first number is the amount you can unstake, as shown in the following screenshot:

![Unstake](/img/Unstake-amount.png)

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:

![Withdraw Available](/img/withdraw-available.png)

## Additional Resources

To delegate successfully, review the [delegating documentation](/resources/roles/delegating/) and check out the [delegate](https://thegraph.com/explorer/delegate?chain=arbitrum-one) section in Graph Explorer.
Binary file added website/public/img/Contract-Arbiscan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/img/undelegate-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/img/unstake-amount.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/img/withdraw-available.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.