-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
88 changed files
with
4,576 additions
and
3,095 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import meta from '../../../../en/resources/roles/delegating/_meta.js' | ||
|
||
export default { | ||
...meta, | ||
} |
148 changes: 148 additions & 0 deletions
148
website/pages/ar/resources/roles/delegating/delegating.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
--- | ||
title: Delegating | ||
--- | ||
|
||
To start delegating right away, check out [delegate on the graph](https://thegraph.com/explorer/delegate?chain=arbitrum-one). | ||
|
||
## Overview | ||
|
||
Delegators earn GRT by delegating GRT to Indexers, which helps network security and functionality. | ||
|
||
<VideoEmbed youtube="VACg8bitnVc" /> | ||
|
||
## Benefits of Delegating | ||
|
||
- Strengthen the network’s security and scalability by supporting Indexers. | ||
- Earn a portion of rewards generated by the Indexers. | ||
|
||
## How Does Delegation Work? | ||
|
||
Delegators earn GRT rewards from the Indexer(s) they choose to delegate their GRT to. | ||
|
||
An Indexer's ability to process queries and earn rewards depends on three key factors: | ||
|
||
1. The Indexer's Self-Stake (GRT staked by the Indexer). | ||
2. The total GRT delegated to them by Delegators. | ||
3. The price the Indexer sets for queries. | ||
|
||
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. | ||
|
||
### What is Delegation Capacity? | ||
|
||
Delegation Capacity refers to the maximum amount of GRT an Indexer can accept from Delegators, based on the Indexer's Self-Stake. | ||
|
||
The Graph Network includes a delegation ratio of 16, meaning an Indexer can accept up to 16 times their Self-Stake in delegated GRT. | ||
|
||
For example, if an Indexer has a Self-Stake of 1M GRT, their Delegation Capacity is 16M. | ||
|
||
### Why Does Delegation Capacity Matter? | ||
|
||
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. | ||
|
||
This makes it crucial for Delegators to evaluate an Indexer's current Delegation Capacity before selecting an Indexer. | ||
|
||
Indexers can increase their Delegation Capacity by increasing their Self-Stake, thereby raising the limit for delegated tokens. | ||
|
||
## Delegation on The Graph | ||
|
||
<VideoEmbed youtube="HVyIrMcNu7I" /> | ||
|
||
> 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/). | ||
There are two sections in this guide: | ||
|
||
- The risks of delegating tokens in The Graph Network | ||
- How to calculate expected returns as a Delegator | ||
|
||
## Delegation Risks | ||
|
||
Listed below are the main risks of being a Delegator in the protocol. | ||
|
||
### The Delegation Tax | ||
|
||
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. | ||
|
||
As a Delegator, it's important to understand the following: | ||
|
||
- 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. | ||
|
||
- 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. | ||
|
||
### The Undelegation Period | ||
|
||
When a Delegator chooses to undelegate, their tokens are subject to a 28-day undelegation period. | ||
|
||
This means they cannot transfer their tokens or earn any rewards for 28 days. | ||
|
||
After the undelegation period, GRT will return to your crypto wallet. | ||
|
||
### Why is this important? | ||
|
||
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. | ||
|
||
As a result, it’s recommended that you choose an Indexer wisely. | ||
|
||
<div sx={{ mx: 'auto', maxWidth: '400px' }}> | ||
 _Note the 0.5% fee in the Delegation UI, as well as the 28 day | ||
unbonding period._ | ||
</div> | ||
|
||
#### Delegation Parameters | ||
|
||
In order to understand how to choose a trustworthy Indexer, you need to understand the Delegation Parameters. | ||
|
||
- **Indexing Reward Cut** - The portion of the rewards the Indexer will keep for themselves. | ||
- If an Indexer's reward cut is set to 100%, as a Delegator, you will get 0 indexing rewards. | ||
- If it is set to 80%, as a Delegator, you will receive 20%. | ||
|
||
<div sx={{ mx: 'auto', maxWidth: '700px' }}> | ||
 *The top Indexer is giving Delegators 90% of the rewards. The | ||
middle one is giving Delegators 20%. The bottom one is giving Delegators ~83%.* | ||
</div> | ||
|
||
- **Query Fee Cut** - This is just like the Indexing Reward Cut, but it applies to returns on the query fees that the Indexer collects. | ||
|
||
- 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. | ||
- Many Indexers are active in Discord and will be happy to answer your questions. | ||
|
||
## Calculating Delegators Expected Return | ||
|
||
> Calculate the ROI on your delegation [here](https://thegraph.com/explorer/delegate?chain=arbitrum-one). | ||
A Delegator must consider a variety of factors to determine a return: | ||
|
||
An Indexer's ability to use the delegated GRT available to them impacts their rewards. | ||
|
||
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. | ||
|
||
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. | ||
|
||
### Considering the query fee cut and indexing fee cut | ||
|
||
You should choose an Indexer that is transparent about setting their Query Fee and Indexing Fee Cuts. | ||
|
||
The formula is: | ||
|
||
 | ||
|
||
### Considering the Indexer's delegation pool | ||
|
||
<VideoEmbed youtube="G0HyUZ0m_Q8" /> | ||
|
||
Delegators should consider the proportion of the Delegation Pool they own. | ||
|
||
All delegation rewards are shared evenly, with a pool rebalancing based on the amount the Delegator deposited into the pool. | ||
|
||
This gives the Delegator a share of the pool: | ||
|
||
 | ||
|
||
> 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. | ||
## Delegator FAQs and Bugs | ||
|
||
### MetaMask "Pending Transaction" Bug | ||
|
||
At times, attempts to delegate to Indexers via MetaMask can fail and result in prolonged periods of "Pending" or "Queued" transaction attempts. | ||
|
||
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. |
55 changes: 55 additions & 0 deletions
55
website/pages/ar/resources/roles/delegating/undelegating.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 section in Graph Explorer. | ||
## How to Withdraw Using Graph Explorer | ||
|
||
### Step-by-Step | ||
|
||
1. Visit [Graph Explorer](https://thegraph.com/explorer). Please make sure you're on Explorer and **not** Subgraph 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 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: | ||
|
||
 | ||
|
||
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. | ||
7. 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 | ||
|
||
1. Find your delegation transaction on Arbiscan. | ||
- Here's an [example transaction on Arbiscan](https://arbiscan.io/tx/0xcf2110eac897099f821064445041031efb32786392bdbe7544a4cb7a6b2e4f9a) | ||
2. Navigate to "Transaction Action" where you can find the staking extension contract: | ||
- [This is the staking extension contract for the example listed above](https://arbiscan.io/address/0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03) | ||
3. Then click on "Contract".  | ||
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](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 (delegator address) and the address of the Indexer that you delegated to, as shown in the following screenshot: | ||
|
||
 | ||
|
||
- This will return three numbers. The first number is the amount you can unstake. | ||
|
||
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: | ||
|
||
 | ||
|
||
## Additional Resources | ||
|
||
To delegate successfully, review the [delegating documentation](/resources/roles/delegating/delegating/) and check out the delegate section in Graph Explorer. |
Oops, something went wrong.