|
| 1 | +--- |
| 2 | +title: Undelegating |
| 3 | +--- |
| 4 | + |
| 5 | +Learn how to withdraw your delegated tokens through [Graph Explorer](https://thegraph.com/explorer) or [Arbiscan](https://arbiscan.io/). |
| 6 | + |
| 7 | +> 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 section in Graph Explorer. |
| 8 | +
|
| 9 | +## How to Withdraw Using Graph Explorer |
| 10 | + |
| 11 | +### Step-by-Step |
| 12 | + |
| 13 | +1. Visit [Graph Explorer](https://thegraph.com/explorer). Please make sure you're on Explorer and **not** Subgraph Studio. |
| 14 | +2. Click on your profile. You can find it on the top right corner of the page. |
| 15 | + - Make sure that your wallet is connected. If it's not connected, you will see the "connect" button instead. |
| 16 | +3. Once you're in your profile, click on the Delegating tab. In the Delegating tab, you can view the list of Indexers you have delegated to. |
| 17 | +4. Click on the Indexer from which you wish to withdraw your tokens. |
| 18 | + - Make sure to note the specific Indexer, as you will need to find them again to withdraw. |
| 19 | +5. Select the "Undelegate" option by clicking on the three dots next to the Indexer on the right side, see image below: |
| 20 | + |
| 21 | +  |
| 22 | + |
| 23 | +6. After approximately [28 epochs](https://thegraph.com/explorer/network/epochs?chain=arbitrum-one) (28 days), return to the Delegate section and locate the specific Indexer you undelegated from. |
| 24 | +7. Once you find the Indexer, click on the three dots next to them and proceed to withdraw all your tokens. |
| 25 | + |
| 26 | +## How to Withdraw Using Arbiscan |
| 27 | + |
| 28 | +> This process is primarily useful if the UI in Graph Explorer experiences issues. |
| 29 | +
|
| 30 | +### Step-by-Step |
| 31 | + |
| 32 | +1. Find your delegation transaction on Arbiscan. |
| 33 | + - Here's an [example transaction on Arbiscan](https://arbiscan.io/tx/0xcf2110eac897099f821064445041031efb32786392bdbe7544a4cb7a6b2e4f9a) |
| 34 | +2. Navigate to "Transaction Action" where you can find the staking extension contract: |
| 35 | + - [This is the staking extension contract for the example listed above](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03) |
| 36 | +3. Then click on "Contract".  |
| 37 | +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. |
| 38 | +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. |
| 39 | +6. Once you're in your profile, click on "Custom ABI”. |
| 40 | +7. Paste the custom ABI you copied from the staking extension contract, and add the custom ABI for the address: 0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03 (**sample address**) |
| 41 | +8. Go back to the [staking extension 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. |
| 42 | +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 (delegator address) and the address of the Indexer that you delegated to, as shown in the following screenshot: |
| 43 | + |
| 44 | +  |
| 45 | + |
| 46 | + - This will return three numbers. The first number is the amount you can unstake. |
| 47 | + |
| 48 | +10. After you have called `unstake`, you can withdraw after approximately 28 epochs (28 days) by calling the `withdraw` function. |
| 49 | +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: |
| 50 | + |
| 51 | +  |
| 52 | + |
| 53 | +## Additional Resources |
| 54 | + |
| 55 | +To delegate successfully, review the [delegating documentation](/resources/roles/delegating/) and check out the delegate section in Graph Explorer. |
0 commit comments