From 52195ed01ea78df0d641f2fcaa98b238c8ee01a8 Mon Sep 17 00:00:00 2001 From: seandotau Date: Mon, 5 Aug 2024 02:38:48 +1000 Subject: [PATCH] Adds next steps of installing a node (#547) * Adds next steps of installing a node * Minor improvements? * Update maximise apy content * Update RPC section * Updates to Operators rewards * Update of descriptions * Review improvements * Node Operator Improvements * Minor clarification --------- Co-authored-by: seandotau Co-authored-by: James Bayly --- docs/.vuepress/sidebar.ts | 1 + docs/subquery_network/community.md | 12 +- docs/subquery_network/delegators/rewards.md | 10 +- .../introduction/reward-distribution.md | 10 +- .../node_operators/indexers/index-project.md | 2 +- .../node_operators/maximise-apy.md | 145 ++++++++++++++++++ .../rpc_providers/introduction.md | 2 + .../node_operators/setup/faq.md | 4 + docs/subquery_network/node_operators/stake.md | 12 +- 9 files changed, 185 insertions(+), 13 deletions(-) create mode 100644 docs/subquery_network/node_operators/maximise-apy.md diff --git a/docs/.vuepress/sidebar.ts b/docs/.vuepress/sidebar.ts index 7b3766cfb76..2d6ac0252ba 100644 --- a/docs/.vuepress/sidebar.ts +++ b/docs/.vuepress/sidebar.ts @@ -661,6 +661,7 @@ export const getSidebar = (locale: string) => }, `${locale}/subquery_network/node_operators/stake.md`, `${locale}/subquery_network/node_operators/plans.md`, + `${locale}/subquery_network/node_operators/maximise-apy.md`, ], }, { diff --git a/docs/subquery_network/community.md b/docs/subquery_network/community.md index 44fb94ecaa0..16fefb44328 100644 --- a/docs/subquery_network/community.md +++ b/docs/subquery_network/community.md @@ -1,6 +1,6 @@ # SubQuery Network Community -The key focus of the [SubQuery Foundation](./foundation.md) and community is to ensure that there is enough support that anyone, from an expert blockchain team to a new hobbyist developer, can build their own Project. Together we can pave the way to a more decentralised future! +The key focus of the [SubQuery Foundation](./governance/foundation.md) and community is to ensure that there is enough support that anyone, from an expert blockchain team to a new hobbyist developer, can build their own Project. Together we can pave the way to a more decentralised future! ## Developer Guild @@ -18,6 +18,16 @@ Discord is our main community for talking about SubQuery and learning more. You When the conversation is deeper and requires more thought, we move the conversation to [our Forum](https://forum.subquery.network/). Here you will find longer topics, a history of all announcements to Network, and deeper conversation about the direction of the network. Feel free to join and start posting at [forum.subquery.network](https://forum.subquery.network/)! +### Join the Node Operator community + +If you're a Node Operator on the Network, we strongly suggest that you keep up with the latest news, announcements, and tips by joining the following Discord channels: + +- `#network-announcements` +- `#network-general` +- `#network-services-release` +- `#network-indexer-announcements` +- `#network-indexer-general` + ## Contributing to Codebases SubQuery is open source and open to the community, if you want to contribute (e.g. add a feature, fix a bug, suggest an improvement, or even just fix a typo in our documentation), please review our [contributing guide](../miscellaneous/contributing.md). diff --git a/docs/subquery_network/delegators/rewards.md b/docs/subquery_network/delegators/rewards.md index 62f430b4dde..43122dfedea 100644 --- a/docs/subquery_network/delegators/rewards.md +++ b/docs/subquery_network/delegators/rewards.md @@ -18,9 +18,15 @@ If a Node Operator wishes to increase the Node Operator Commission Rate that the ![Token economic flow](/assets/img/network/token_economy.png) -## How to select what Node Operators to delegate to +## How to select what Node Operators to delegate to? -You need to assess a few things when deciding on what Node Operator to choose. +You might assess a few things when deciding on what Node Operator to choose. For instance you might consider: + +- Having SSL enabled +- Having an ENS domain (aka social credibility is enabled) +- Having a frequent Era Reward Collection period +- Being active in the Discord community +- Having a lower NOCR (a lower Node Operator Commission Rate means more rewards will be shared amongst Delegators) Node Operators set a Node Operator’s Commission Rate (NOCR) which is the percentage Node Operators earn. Therefore, a lower NOCR will be more attractive for Delegators as a larger percentage of rewards is shared between Delegators. diff --git a/docs/subquery_network/introduction/reward-distribution.md b/docs/subquery_network/introduction/reward-distribution.md index 92154e12be1..ddb7430bed1 100644 --- a/docs/subquery_network/introduction/reward-distribution.md +++ b/docs/subquery_network/introduction/reward-distribution.md @@ -17,19 +17,19 @@ There is a reward pool for each deployments Node Operator runs where the adjustm ![Reward Pools](/assets/img/network/reward_pools.png) -## Network Inflation Rewards +## Stake Rewards Some projects in our network are considered “Public Good” projects, for example; network dictionaries and the various SubQuery projects that the [official Network app](https://app.subquery.network) runs on. In these cases, we need to ensure Node Operators will run and host them, but generally there will be no single customer that will take the lead in financing these requests Additionally, for Node Operators, running projects incurs significant costs. Without clear demand, Node Operators might not want to risk the time and resources to setup a new project. -The solution to this comes from network inflation as a reward source for Indexer rewards, in addition to rewards for productive work. We allow Consumers to use [Boosting](../consumers/boosting.md) to direct Network Inflation Rewards, which distributed to Node Operators proportionally based on the total boosted SQT on their projects. +The solution to this comes from network inflation as a reward source for Stake Rewards, in addition to rewards for productive work. We allow Consumers to use [Boosting](../consumers/boosting.md) to direct Stake Rewards, which distributed to Node Operators proportionally based on the total boosted SQT on their projects. -In order to receive network inflation rewards, Node Operators must be running a project that has a non-zero amount of consumer boosting, and be online/available to the public with a sync progress of 100%. Node Operators will not receive all of the network inflation rewards, some rewards are distributed to the Consumers that boosted the project, as described in [Consumer Boosting](../consumers/boosting.md#how-are-boosters-rewarded). +In order to receive Stake Rewards, Node Operators must be running a project that has a non-zero amount of consumer boosting, and be online/available to the public with a sync progress of 100%. Node Operators will not receive all of the Stake Rewards, some rewards are distributed to the Consumers that boosted the project, as described in [Consumer Boosting](../consumers/boosting.md#how-are-boosters-rewarded). -Network inflation rewards are allocated to all project types supported by the SubQuery Network, e.g data indexing projects and RPC endpoints. The split of network inflation rewards between the Consumer that boosted the project, and the Node Operator may vary by project type. +Stake Rewards are allocated to all project types supported by the SubQuery Network, e.g data indexing projects and RPC endpoints. The split of network inflation rewards between the Consumer that boosted the project, and the Node Operator may vary by project type. -The current inflation rate on the SubQuery Network can be found on our [network parameters page](../parameters.md). The majority of network inflation acts as network inflation rewards, while the remainder is allocated to the SubQuery Treasury to fund various programmes. +The current inflation rate on the SubQuery Network can be found on our [network parameters page](../parameters.md). The majority of network inflation acts as Stake Rewards, while the remainder is allocated to the SubQuery Treasury to fund various programmes. ## Cobb-Douglas Production Function diff --git a/docs/subquery_network/node_operators/indexers/index-project.md b/docs/subquery_network/node_operators/indexers/index-project.md index 1abb742857a..b7c586f64f7 100644 --- a/docs/subquery_network/node_operators/indexers/index-project.md +++ b/docs/subquery_network/node_operators/indexers/index-project.md @@ -34,7 +34,7 @@ You have successfully started Indexing. Next we need to get our project online o For a brand new project, the project status will be `Offline`. -Once the project has started indexing, you can Go Online so that the Network knows that you are running the project. When the indexing progress reaches the minimum required block height the network can now start to distribute requests to the Node Operator's project deployment. +Once the project has finished indexing, you should mark it as `online` so that the Network knows that you are running the project. The network will then start to distribute requests to the Node Operator's project deployment. Select the `Go Online` button and send a transaction. diff --git a/docs/subquery_network/node_operators/maximise-apy.md b/docs/subquery_network/node_operators/maximise-apy.md new file mode 100644 index 00000000000..464a1c7a9f5 --- /dev/null +++ b/docs/subquery_network/node_operators/maximise-apy.md @@ -0,0 +1,145 @@ +# Maximising Your APY + +After you have joined the SubQuery Network, completed indexing of your first project, and announced ready to the network, you might have questions on how to maximise your APY and attract as much delegation as possible. + +### Join the Node Operator community + +If you're a Node Operator on the Network, we strongly suggest that you keep up with the latest news, announcements, and tips by joining our Discord. Read more about the [Node Operator community here](../community.md#join-the-node-operator-community). + +## Quick Checks + +- We strongly recommend that you enable [Auto Reduce Over Allocation](./stake.md#automatically-reduce-over-allocation) to prevent being over allocated. +- Ensure you have at least one flex plan enabled for each project deployment so we can send requests to you from our gateway. +- Ensure projects are able to fetch metadata from deployment’s Query Service. An error will appear in the status column if there is an issue. +- Ensure that you are online. `GET:{your_indexer_service_url}/healthy` should return a 200 with something like + +```json +{ + "autoReduceAllocation": true, + "controller": "", + "coordinatorVersion": "v2.2.3", + "indexer": "", + "os": "Debian GNU/Linux 10 4-CPU", + "proxyVersion": "v2.4.2", + "uptime": 8066 +} +``` + +## Weekly Tasks + +You may have already setup a Grafana dashboard to monitor metrics from your `indexer-coordinator` and `indexer-proxy` services, but there are important notifications and settings you should monitor in the [Network App](https://app.subquery.network/). + +We strongly suggest that you log in at the start of each new Era (as close as possible to the start - set a calendar reminder), to resolve any warnings or notifications, as well complete the following key tasks. + +### Weekly tasks - Claim rewards + +If you don't frequently claim your rewards (e.g. once a week), Delegators can see this and may decide against delegating to support you. Make sure you claim your rewards frequently (e.g. once a week), and ideally as soon as they become available after the end of the past Era. + +If you are running v2.2.1 or later, rewards are collected automatically. This will result in an Era Reward Collection status of “Frequent” on the [All Node Operators](https://app.subquery.network/indexer/all-indexers) dashboard meaning that your Delegators can also receive their rewards. Be sure though that enough ETH balance is in your Controller Account for automatic collection. + +### Weekly tasks - Check for new project versions + +Project creators might deploy new versions of their project codebases each time. We strongly suggest following their release notes and updating your project to match the recommended versions. In some cases you wont need to reindex, just update the project version. + +Since [Project Boost affects the amount of Stake rewards distributed](../introduction/reward-distribution.md#stake-rewards) for running a project, you may want to consider what project deployment version has the highest boost to maximise your Stake rewards. + +### Weekly tasks - Update SQT allocation + +- Avoid having tokens allocated to outdated deployment versions. An “Outdated Allocation Projects” pop up will appear if this occurs. This means that you should adjust your allocation to the latest version (and update to the new version). +- Avoid having “Unallocated Stake”. To maximise rewards, ensure all tokens are allocated. An “Unallocated Stake” pop up will appear if this occurs. + +### Weekly tasks - Check Project health +- Ensure your project is online. Appending “/healthy” to the end of your http URL should return: +``` +{ + "autoReduceAllocation": true, + "controller": "", + "coordinatorVersion": "v2.2.3", + "indexer": "", + "os": "Debian GNU/Linux 10 4-CPU", + "proxyVersion": "v2.4.2", + "uptime": 8066 +} +``` +- Ensure you have at least one flexplan enabled for each project. +- Ensure projects are able to fetch metadata from deployment’s Query Service. An error will appear in the status column if there is an issue. + +## Selecting what projects to run. + +As a node operator, two types of endpoints (or nodes) can be run: SubQuery Indexers endpoints or RPC endpoints. See [here](https://app.subquery.network/explorer/home) for a complete list. + +- Indexer endpoints typically receive a higher portion of their rewards via stake rewards which is relatively stable era-to-era. +- RPC endpoints typically receive more query rewards which can produce a higher overall APY but with more volatility as query demand changes. + +These endpoints then index various projects. Project rewards come from a combination of its Stake Rewards and Query Rewards. They are generated by each project based on the amount of boost allocated to a project and then shared proportionally between the number of operators (for that project). + +- Stake rewards are measured in stake APY, the Annual Percentage Yield you can expect from allocating SQT to a project. It is a function of the boost applied to a project, which sets the size of its total stake reward pool, divided by the stake allocated to the project. +- Query Rewards are generated when people pay for queries against a project. + +To maximise rewards: +- look for projects which have high boost, but low allocated stake. (for stake rewards) +- look for projects that have high average query rewards per Node Operator (for query rewards) +- low competition (in general) +- low project complexity (in general) + +Also, project database size is a good indicator of cost + +## Node Operator Rewards FAQs + +### How can I attract more indexing & RPC requests? + +The public gateway will allocate requests based on your: +- Reliability: Improve your uptime to increase queries. +- Block height: Keep your nodes fully synced to receive queries. +- Latency: Reduce latency by keeping your Node CPU usage healthy with good network connection. +- Price: Lower pricing can receive more requests. + +### Should I run all projects or focus on a select few + +For indexer projects, use the stake APY and the cost of running the project to determine the viability of running a project. + +For RPC projects, if you are already running RPC nodes for other networks and have capacity to serve more requests, it may be beneficial to add SubQuery as an extra source of requests to maximise your return from the node with very little added cost. + +### Do I need to allocate stake to earn query rewards? + +No. Your query rewards are only slightly impacted by your total stake, but are not impacted by which project you allocate the stake to, unlike indexer projects. For example, you can allocate 1 SQT to an RPC project and still receive query rewards. + +### So when would I allocate stake to my RPC projects? + +RPC Projects do also earn stake APY. You should allocate stake if it makes competitive stake APY compared to your other projects. + +### Can you add support for the other RPCs I run? + +We are planning to expand our RPC projects. [Letting us know](https://subquery.network/contact) which other nodes you run can help us to onboard new networks faster. + +### Why did I get 0 query rewards last era? + +Projects may receive 0 or low query rewards if: +- Your project is not competitive at price v performance (see [How can I attract more RPC requests?](#how-can-i-attract-more-rpc-requests)) +- Your project was offline +- Your project was unhealthy +- Your project is not fully synced +- You did not have Flex Plan pricing enabled +- Your indexer version does not automatically claim query rewards (must be v2.2.1 or later) +- Your indexer controller account does not have balance to claim query rewards + + +### How can I attract more Delegators + +Understand [what Delegators are looking](./rewards.md#how-to-select-what-node-operators-to-delegate-to) for in Node Operators + +### My delegation increased. Is it more profitable to add more projects, or to increase stake in my existing projects? + +If your current projects continue to earn competitive stake APY after adding additional stake, you may just continue to serve a smaller number of projects. + +However, if you don't increase your APY after allocating new delegation to an existing project, you may want to consider expanding operations with the new Delegation and adding other new projects that are returning higher stake APY and rebalancing your stake. + +### Why do some Node Operators have >100% APY + +Node Operator APY compares their total returns to the amount they have personally staked (self stake) + +Node Operators can achieve high Node Operator APY when: +- They have large delegation relative to their own self stake, meaning they earn extra rewards in commission off somebody else's delegation. +- They prioritise projects with high query rewards so are less dependent on the size of their stake. + +High node operator APY does not necessarily mean that they make more overall rewards or profit. diff --git a/docs/subquery_network/node_operators/rpc_providers/introduction.md b/docs/subquery_network/node_operators/rpc_providers/introduction.md index 3a1d09b3475..bcb97575140 100644 --- a/docs/subquery_network/node_operators/rpc_providers/introduction.md +++ b/docs/subquery_network/node_operators/rpc_providers/introduction.md @@ -6,6 +6,8 @@ An RPC Provider is a SubQuery network participant who is responsible for serving RPC Providers play a very important role within the SubQuery network, they act as the main interface between dApps, indexers, and other consumers to the underlying data on the blockchain, and are also responsible for submitting transactions. +Running RPCs is also very easy if you are already familiar with them or already running one. You can quickly connect an existing RPC endpoint to the SubQuery Network if you are already running an RPC for another usecase (the RPC node does not need to be dedicated to the SubQuery Network). + ## Requirements to be an RPC Provider To become an RPC Provider on the SubQuery Network, the RPC Provider must possess the necessary hardware, run the required SubQuery services, have a publicly accessible network via a static IP or a domain name, and register as an RPC Provider. diff --git a/docs/subquery_network/node_operators/setup/faq.md b/docs/subquery_network/node_operators/setup/faq.md index dd7bd473d71..4d081c74170 100644 --- a/docs/subquery_network/node_operators/setup/faq.md +++ b/docs/subquery_network/node_operators/setup/faq.md @@ -15,6 +15,10 @@ If the indexing node is unhealthy, first visit the service log to determine if a The other option is to restart the service and/or servers involved. +## When should I mark my new project as Online? + +You should mark your project as online when they are fully synced. + ## Can the same Node Operator run 2 services on different platforms? The same Node Operator can index 2 **different** projects on 2 **different** hosting providers. diff --git a/docs/subquery_network/node_operators/stake.md b/docs/subquery_network/node_operators/stake.md index 312d650ce3b..d50b52452f0 100644 --- a/docs/subquery_network/node_operators/stake.md +++ b/docs/subquery_network/node_operators/stake.md @@ -45,6 +45,10 @@ Remember, both network inflation rewards and query rewards (for Flex plans) dist - If a project deployment gets a lot of flex plan queries, allocating more stake means you receive a higher proportion of its rewards compared to other project deployments - If a project deployment is highly competitive, you might want to allocate more stake to it to receive more rewards compared to non-competitive project deployments +### How should I allocate my stake amongst my projects for best rewards? + +You should allocate stake to projects which have the highest stake APY. Note that project stake APY (annualised yeild per SQT staked) can reduce as more stake is allocated to a project. For example allocating significantly more stake to a projcct may not result in lower marginal APY increase compared to the additional stake. Allocating all your stake to your highest performing project could reduce its APY and make it no longer the best choice for allocation. Regularly review and adjust the stake across your projects to find the right balance. + ## Over Allocated Stake :::danger @@ -82,9 +86,9 @@ It runs immediately at the start of the next era when delegation changes take ef There are multiple reasons why Node Operators should consider staking more SQT or attracting more Delegation. -- All Node Operators must stake a minimum amount of SQT to become a Node Operator, the current setting can be found in [network parameters](../parameters.md) -- There is a maximum allowed delegation capacity based on the size of the Node Operator's own stake, this ensures the Node Operator has sufficient skin in the game. Increasing own stake can mean delegators are able to delegate more to you. The current multiple for delegation capacity can be found on our [network parameters](../parameters.md) page. -- More total stake means more SQT to allocate on different deployments the Node Operator runs and more Network Inflation Rewards to earn. -- It provides an advantage over other Node Operators when payment method is flex plan (PAYG) due to the way the [Cobb-Douglas function](../introduction/reward-distribution.md#cobb-douglas-production-function) works. +- All Node Operators must stake a minimum amount of SQT to become a Node Operator. The current amount can be found in [network parameters](../parameters.md) +- There is a maximum allowed delegation capacity based on the size of the Node Operator's own stake. This ensures the Node Operator has sufficient skin in the game. Increasing one's own stake mean Delegators are able to delegate more to you. The current multiple for delegation capacity can be found on our [network parameters](../parameters.md) page. +- More total stake means more SQT to allocate on different deployments the Node Operator runs and more stake rewards that can be earnt. +- More total stake provides an advantage over other Node Operators when the payment method is flex plan (PAYG) due to the way the [Cobb-Douglas function](../introduction/reward-distribution.md#cobb-douglas-production-function) works. In order to become a Node Operator on the SubQuery Network, you must stake a minimum number of SQT. In addition, you will want to attract delegators to [increase the rewards that you receive](./rewards.md).