Skip to content

Commit c06e99e

Browse files
committed
Run fix-pages-structure script
1 parent f938d65 commit c06e99e

File tree

88 files changed

+4576
-3095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+4576
-3095
lines changed

website/pages/ar/resources/roles/delegating.mdx

Lines changed: 0 additions & 137 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import meta from '../../../../en/resources/roles/delegating/_meta.js'
2+
3+
export default {
4+
...meta,
5+
}
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
title: Delegating
3+
---
4+
5+
To start delegating right away, check out [delegate on the graph](https://thegraph.com/explorer/delegate?chain=arbitrum-one).
6+
7+
## Overview
8+
9+
Delegators earn GRT by delegating GRT to Indexers, which helps network security and functionality.
10+
11+
<VideoEmbed youtube="VACg8bitnVc" />
12+
13+
## Benefits of Delegating
14+
15+
- Strengthen the network’s security and scalability by supporting Indexers.
16+
- Earn a portion of rewards generated by the Indexers.
17+
18+
## How Does Delegation Work?
19+
20+
Delegators earn GRT rewards from the Indexer(s) they choose to delegate their GRT to.
21+
22+
An Indexer's ability to process queries and earn rewards depends on three key factors:
23+
24+
1. The Indexer's Self-Stake (GRT staked by the Indexer).
25+
2. The total GRT delegated to them by Delegators.
26+
3. The price the Indexer sets for queries.
27+
28+
The more GRT staked and delegated to an Indexer, the more queries they can serve, leading to higher potential rewards for both the Delegator and Indexer.
29+
30+
### What is Delegation Capacity?
31+
32+
Delegation Capacity refers to the maximum amount of GRT an Indexer can accept from Delegators, based on the Indexer's Self-Stake.
33+
34+
The Graph Network includes a delegation ratio of 16, meaning an Indexer can accept up to 16 times their Self-Stake in delegated GRT.
35+
36+
For example, if an Indexer has a Self-Stake of 1M GRT, their Delegation Capacity is 16M.
37+
38+
### Why Does Delegation Capacity Matter?
39+
40+
If an Indexer exceeds their Delegation Capacity, rewards for all Delegators become diluted because the excess delegated GRT cannot be used effectively within the protocol.
41+
42+
This makes it crucial for Delegators to evaluate an Indexer's current Delegation Capacity before selecting an Indexer.
43+
44+
Indexers can increase their Delegation Capacity by increasing their Self-Stake, thereby raising the limit for delegated tokens.
45+
46+
## Delegation on The Graph
47+
48+
<VideoEmbed youtube="HVyIrMcNu7I" />
49+
50+
> Please note this guide does not cover steps such as setting up MetaMask. The Ethereum community provides a [comprehensive resource regarding wallets](https://ethereum.org/en/wallets/).
51+
52+
There are two sections in this guide:
53+
54+
- The risks of delegating tokens in The Graph Network
55+
- How to calculate expected returns as a Delegator
56+
57+
## Delegation Risks
58+
59+
Listed below are the main risks of being a Delegator in the protocol.
60+
61+
### The Delegation Tax
62+
63+
Delegators cannot be slashed for bad behavior, but there is a tax on Delegators to disincentivize poor decision-making that could harm the integrity of the network.
64+
65+
As a Delegator, it's important to understand the following:
66+
67+
- You will be charged 0.5% every time you delegate. This means that if you delegate 1,000 GRT, you will automatically burn 5 GRT.
68+
69+
- In order to be safe, you should calculate your potential return when delegating to an Indexer. For example, you might calculate how many days it will take before you have earned back the 0.5% tax on your delegation.
70+
71+
### The Undelegation Period
72+
73+
When a Delegator chooses to undelegate, their tokens are subject to a 28-day undelegation period.
74+
75+
This means they cannot transfer their tokens or earn any rewards for 28 days.
76+
77+
After the undelegation period, GRT will return to your crypto wallet.
78+
79+
### Why is this important?
80+
81+
If you choose an Indexer that is not trustworthy or not doing a good job, you will want to undelegate. This means you will be losing opportunities to earn rewards.
82+
83+
As a result, it’s recommended that you choose an Indexer wisely.
84+
85+
<div sx={{ mx: 'auto', maxWidth: '400px' }}>
86+
![Delegation unbonding](/img/Delegation-Unbonding.png) _Note the 0.5% fee in the Delegation UI, as well as the 28 day
87+
unbonding period._
88+
</div>
89+
90+
#### Delegation Parameters
91+
92+
In order to understand how to choose a trustworthy Indexer, you need to understand the Delegation Parameters.
93+
94+
- **Indexing Reward Cut** - The portion of the rewards the Indexer will keep for themselves.
95+
- If an Indexer's reward cut is set to 100%, as a Delegator, you will get 0 indexing rewards.
96+
- If it is set to 80%, as a Delegator, you will receive 20%.
97+
98+
<div sx={{ mx: 'auto', maxWidth: '700px' }}>
99+
![Indexing Reward Cut](/img/Indexing-Reward-Cut.png) *The top Indexer is giving Delegators 90% of the rewards. The
100+
middle one is giving Delegators 20%. The bottom one is giving Delegators ~83%.*
101+
</div>
102+
103+
- **Query Fee Cut** - This is just like the Indexing Reward Cut, but it applies to returns on the query fees that the Indexer collects.
104+
105+
- It is highly recommended that you explore [The Graph Discord](https://discord.gg/graphprotocol) to determine which Indexers have the best social and technical reputations.
106+
- Many Indexers are active in Discord and will be happy to answer your questions.
107+
108+
## Calculating Delegators Expected Return
109+
110+
> Calculate the ROI on your delegation [here](https://thegraph.com/explorer/delegate?chain=arbitrum-one).
111+
112+
A Delegator must consider a variety of factors to determine a return:
113+
114+
An Indexer's ability to use the delegated GRT available to them impacts their rewards.
115+
116+
If an Indexer does not allocate all the GRT at their disposal, they may miss out on maximizing potential earnings for both themselves and their Delegators.
117+
118+
Indexers can close an allocation and collect rewards at any time within the 1 to 28-day window. However, if rewards are not promptly collected, the total rewards may appear lower, even if a percentage of rewards remain unclaimed.
119+
120+
### Considering the query fee cut and indexing fee cut
121+
122+
You should choose an Indexer that is transparent about setting their Query Fee and Indexing Fee Cuts.
123+
124+
The formula is:
125+
126+
![Delegation Image 3](/img/Delegation-Reward-Formula.png)
127+
128+
### Considering the Indexer's delegation pool
129+
130+
<VideoEmbed youtube="G0HyUZ0m_Q8" />
131+
132+
Delegators should consider the proportion of the Delegation Pool they own.
133+
134+
All delegation rewards are shared evenly, with a pool rebalancing based on the amount the Delegator deposited into the pool.
135+
136+
This gives the Delegator a share of the pool:
137+
138+
![Share formula](/img/Share-Forumla.png)
139+
140+
> The formula above shows that it is possible for an Indexer offering only 20% to Delegators to provide a better reward than an Indexer giving 90%. Simply do the math to determine the best reward.
141+
142+
## Delegator FAQs and Bugs
143+
144+
### MetaMask "Pending Transaction" Bug
145+
146+
At times, attempts to delegate to Indexers via MetaMask can fail and result in prolonged periods of "Pending" or "Queued" transaction attempts.
147+
148+
A simple resolution to this bug is to restart the browser (e.g., using "abort:restart" in the address bar), which will cancel all previous attempts without gas being subtracted from the wallet. Several users who have encountered this issue have reported successful transactions after restarting their browser and attempting to delegate.
Lines changed: 55 additions & 0 deletions
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/delegating/) and check out the delegate section in Graph Explorer.

0 commit comments

Comments
 (0)