3 minutes
Undelegating
Learn how to withdraw your delegated tokens through Graph Explorer or Arbiscan.
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.
How to Withdraw Using Graph Explorer
Step-by-Step
-
Visit Graph Explorer. Please make sure you’re on Explorer and not Subgraph Studio.
-
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.
-
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.
-
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.
-
Select the “Undelegate” option by clicking on the three dots next to the Indexer on the right side, see image below:
Undelegate button -
After approximately 28 epochs (28 days), return to the Delegate section and locate the specific Indexer you undelegated from.
-
Once you find the Indexer, click on the three dots next to them 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
-
Find your delegation transaction on Arbiscan.
- Here’s an example transaction on Arbiscan
-
Navigate to “Transaction Action” where you can find the staking extension contract:
-
Then click on “Contract”.
Contract tab on Arbiscan, between NFT Transfers and Events -
Scroll to the bottom and copy the Contract ABI. There should be a small button next to it that allows you to copy everything.
-
Click on your profile button in the top right corner of the page. If you haven’t created an account yet, please do so.
-
Once you’re in your profile, click on “Custom ABI”.
-
Paste the custom ABI you copied from the staking extension contract, and add the custom ABI for the address: 0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03 (sample address)
-
Go back to the staking extension contract. Now, call the
unstake
function in the Write as Proxy tab, which has been added thanks to the custom ABI, with the number of tokens that you delegated. -
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:Both of the addresses needed - This will return three numbers. The first number is the amount you can unstake.
-
After you have called
unstake
, you can withdraw after approximately 28 epochs (28 days) by calling thewithdraw
function. -
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:Call getWithdrawableDelegatedTokens to see amount of tokens that can be withdrawn
Ytterligare resurser
To delegate successfully, review the delegating documentation and check out the delegate section in Graph Explorer.