Skip to content

Commit 8f719c8

Browse files
idalithbbenface
andauthored
Undelegating (#868)
* How-to-Guide --------- Co-authored-by: Benoît Rouleau <[email protected]>
1 parent 01ded01 commit 8f719c8

File tree

8 files changed

+60
-1
lines changed

8 files changed

+60
-1
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export default {
2-
delegating: '',
2+
delegating: 'Delegating',
33
curating: '',
44
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
delegating: '',
3+
undelegating: 'Undelegating',
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
![Undelegate button](/img/undelegate-button.png)
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". ![Contract tab on Arbiscan, between NFT Transfers and Events](/img/arbiscan-contract.png)
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+
![Both of the addresses needed](/img/get-delegate.png)
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+
![Call `getWithdrawableDelegatedTokens` to see amount of tokens that can be withdrawn](/img/withdraw-available.png)
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.
14 KB
Loading

website/public/img/get-delegate.png

30.8 KB
Loading
96.8 KB
Loading
44.7 KB
Loading

0 commit comments

Comments
 (0)