From 79ddba6441d94bfec1af59258a3fbf73567461ca Mon Sep 17 00:00:00 2001 From: James Bayly Date: Tue, 19 Mar 2024 13:11:52 +1300 Subject: [PATCH] Network parameters (#498) * Network parameters * Add more parameters * Update docs/subquery_network/parameters.md Co-authored-by: Ian He <39037239+ianhe8x@users.noreply.github.com> --------- Co-authored-by: Ian He <39037239+ianhe8x@users.noreply.github.com> --- docs/.vuepress/sidebar.ts | 1 + docs/subquery_network/consumers/boosting.md | 6 +++--- docs/subquery_network/delegators/rewards.md | 12 ++++++++--- .../introduction/design-philosophy.md | 20 ++++++++++++++----- docs/subquery_network/introduction/era.md | 2 +- .../introduction/reward-distribution.md | 4 ++-- .../setup/becoming-a-node-operator.md | 4 ++-- docs/subquery_network/node_operators/stake.md | 6 +++--- docs/subquery_network/parameters.md | 15 ++++++++++++++ docs/subquery_network/token/tokenomics.md | 2 +- 10 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 docs/subquery_network/parameters.md diff --git a/docs/.vuepress/sidebar.ts b/docs/.vuepress/sidebar.ts index 04b08a6d31e..35174027552 100644 --- a/docs/.vuepress/sidebar.ts +++ b/docs/.vuepress/sidebar.ts @@ -567,6 +567,7 @@ export const getSidebar = (locale: string) => `${locale}/subquery_network/node_operators/plans.md`, ], }, + `${locale}/subquery_network/parameters.md`, `${locale}/subquery_network/architects/introduction.md`, `${locale}/subquery_network/foundation.md`, { diff --git a/docs/subquery_network/consumers/boosting.md b/docs/subquery_network/consumers/boosting.md index 3ea5d5cd7d6..8cef12eb195 100644 --- a/docs/subquery_network/consumers/boosting.md +++ b/docs/subquery_network/consumers/boosting.md @@ -13,11 +13,11 @@ Consumer Boosting is similar to delegating, where Consumers (individuals or team The difference between boosting and delegating, is that in return, boosters receive free request units over the time and they attract more Node Operators to a project by allowing them to receive a higher cut of rewards from [network inflation](../introduction/reward-distribution.md#network-inflation-rewards). -## How are boosters rewarded +Note there is a minimum boost amount that must be boosted against a project deployment in order for the project deployment to start receiving booster rewards, and in turn, for Consumers to receive boost rewards. You can see the current value in [network parameters](../parameters.md). -In the SubQuery Network, the inflation rate is expected to be `1.2%`. The majority of these rewards acts as network inflation rewards (`1%`), while the remainder is allocated to the SubQuery Treasury to fund various network enhancement programmes and grants. +## How are boosters rewarded -These rewards are distributed to each project deployment based on the proportion of boosted tokens each project deployment is allocated over the time. +In the SubQuery Network, the majority of network inflation ([see exact amount here](../parameters.md)) is distributed to each project deployment based on the proportion of boosted tokens each project deployment is allocated over the time. This reward pool is then split into two groups: diff --git a/docs/subquery_network/delegators/rewards.md b/docs/subquery_network/delegators/rewards.md index a174f20a5b1..ffde55014f7 100644 --- a/docs/subquery_network/delegators/rewards.md +++ b/docs/subquery_network/delegators/rewards.md @@ -24,7 +24,7 @@ You need to assess a few things when deciding on what Node Operator to choose. Node Operators set an 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. -For example, Node Operator A has set an NOCR of 80% and has received SQT from 8 Delegators. This means that the 8 Delegators plus the Node Operator itself, will be rewarded a share of the remaining 20% of what the Node Operator has earned. The share will be split proportionally between them based on the amount staked/delegated. Alternatively, if Node Operator A had an NOCR of 30%, then the 8 delegators and Node Operator would share proportionally rewards from the remaining 70% of rewards. In short, the lower the NOCR - the better it is for Delegators. +For example, Node Operator A has set an NOCR of 30% and has received SQT from 8 Delegators. This means that the 8 Delegators plus the Node Operator itself, will be rewarded a share of the remaining 70% of what the Node Operator has earned. The share will be split proportionally between them based on the amount staked/delegated. Alternatively, if Node Operator A had an NOCR of 20%, then the 8 delegators and Node Operator would share proportionally rewards from the remaining 80% of rewards. In short, the lower the NOCR - the better it is for Delegators. Note that Delegators must have delegated their tokens for the entire [Era](../introduction/era.md) to be eligible for these rewards (note [Non-reward period](#non-reward-period)). @@ -36,7 +36,7 @@ Besides the period when Delegators can effectively earn money, a non-reward peri Delegators can change the Node Operator that their SQT is delegated to (called redelegating), this change will be queued to happen automatically at the end of the Era and no lock period will occur. -If a Delegator decides to undelegate their SQT, a 28 day lock period starts. The tokens cannot be used during this period, no fees can be accrued, and no rewards will be gained. +If a Delegator decides to undelegate their SQT, a lock period starts ([see length here](../parameters.md)). The tokens cannot be used during this period, no fees can be accrued, and no rewards will be gained. ## Delegation Lifecycle @@ -44,10 +44,16 @@ Delegators delegate (deposit) SQT into an Node Operator’s contract. Delegators can then decide how much to redelegate to each Node Operator of their choice. -Delegator can undelegate (withdraw) tokens back to their wallet. This will trigger a lock period of 28 days. +Delegator can undelegate (withdraw) tokens back to their wallet. This will trigger a [lock period](../parameters.md). After the unlocking period has been completed, tokens become available for withdrawal/claim. +::: info You can redelegate without waiting for the unlocking period + +If you want to switch your delegation from one Node Operator to another, you can avoid the undelegation lock period by instead redelegating. When you initially delegate to an Node Operator, you can instead select another Node Operator's delegation as the source of funds to redelegate. + +::: + ## How to claim your rewards To claim rewards, head to `My Profile` -> `Rewards`. Then select `Claim` in the last column. diff --git a/docs/subquery_network/introduction/design-philosophy.md b/docs/subquery_network/introduction/design-philosophy.md index 6d184d780f2..3213992ad26 100644 --- a/docs/subquery_network/introduction/design-philosophy.md +++ b/docs/subquery_network/introduction/design-philosophy.md @@ -2,17 +2,27 @@ The guiding principle of the SubQuery Network is simplicity and flexibility for different use cases, payment methods, and networks. While other data services have many different major network participants, SubQuery focuses on three key ones. While other networks have complicated algorithmic signalling mechanisms, SubQuery relies on the most fundamental signal, consumer demand. While other networks provide only one type of payment model (generally PAYG), SubQuery provides several advanced subscription based options for Consumers and Node Operators, And finally, while other networks only support one layer-1 chain, SubQuery is designed to be multi-chain from the outset. +## Different types of Infrastructure + +Web3 middleware services like indexers, RPCs, oracles and storage services are pivotal in blockchain dApp development. In fact, the utilisation of these middleware services is what sets apart successful, large-scale, production dApps - they accelerate performance and can scale to thousands of users, while providing a superior developer experience to bring in more users, TVL, and value. Indexers and RPCs shoulder the heavy lifting, standing as mission-critical services that underpin the functionality and efficiency of web3 applications. + +Knowing that the SubQuery Network could give our existing community of top node runners a solution to trustlessly receive rewards for running data indexing infrastructure, why couldn’t it work for those other services, for other parts of the dApp tech stack? + +![The vision for SubQuery Network to encompass key web3 infrastructure components in a completely decentralised manner](/assets/img/network/technical_stack.png) + +We realised the full potential of the SubQuery Network mainnet should not be limited to just data indexing; its fundamental contracts, tools, and reward flows enable it to be so much more. By harnessing the power of the existing participants and mechanisms, the SubQuery Network is ready to extend to various infrastructure verticals. It dawned on us that there is a massive opportunity ahead of us when we think holistically about the entire developer experience. + +Our next step is to decentralise the biggest infrastructure component for dApps - Remote Procedure Call or RPC services. + ## Multi-Chain by Design _SubQuery believes in the idea that a community of blockchains, working together to encourage web3 adoption, is the future._ -SubQuery is native to the Polkadot ecosystem, it’s our home and will be the location of the SubQuery Network. The core premise of Polkadot is to create a thriving community of developers, users, and businesses that will tap into its multichain interoperability. SubQuery believes in the idea that a community of blockchains, working together to encourage web3 adoption, is the future and that Polkadot will be a leading player in that initiative. - -But the future is multi-chain. SubQuery knows that there are going to be many different blockchains working together to solve different problems. The plan is to take SubQuery and to adapt it to work for other blockchains that don't have sufficient indexing solutions. The multi-chain approach that is needed to make it work for Polkadot means SubQuery is uniquely suited for this challenge. +SubQuery is multi-chain. SubQuery knows that there are going to be many different blockchains working together to solve different problems. The plan is to take SubQuery and to adapt it to work for other blockchains that don't have sufficient indexing solutions - to support builders wherever they decide to build and launch their dApps. -The SubQuery Network is designed to support any SubQuery Project from any Layer 1 network (within Polkadot or not) within it. It will be designed and built to be multi-chain from the outset, where you will see projects from one network being indexed alongside projects from another. +The SubQuery Network is designed to support any SubQuery Project from any Layer 1 network within it. It will be designed and built to be multi-chain from the outset, where you will see projects from one network being indexed alongside projects from another. -SubQuery currently supports Polkadot, Avalanche, and Terra. Expect more layer-1 support over the coming months. +[SubQuery currently supports over 150 chains, with many more being added each week](https://subquery.network/networks). ## Simple and Accessible diff --git a/docs/subquery_network/introduction/era.md b/docs/subquery_network/introduction/era.md index 095d680250a..69e77fd65e1 100644 --- a/docs/subquery_network/introduction/era.md +++ b/docs/subquery_network/introduction/era.md @@ -2,7 +2,7 @@ The SubQuery Network is oriented around a single constant heartbeat or period - this is called the **Era**. -Currently the Era is 7 days (earth time). The Era represents a period that many settings and actions within the SubQuery Network are orientated around including: +Currently the Era is 7 days ([confirm this on our network parameters page](../parameters.md)). The Era represents a period that many settings and actions within the SubQuery Network are orientated around including: - Network reward allocations are made at the end of an Era - The length of Plans are represented in a number of Era diff --git a/docs/subquery_network/introduction/reward-distribution.md b/docs/subquery_network/introduction/reward-distribution.md index 3724ec3cc6f..30d19539109 100644 --- a/docs/subquery_network/introduction/reward-distribution.md +++ b/docs/subquery_network/introduction/reward-distribution.md @@ -29,7 +29,7 @@ In order to recieve network inflaton rewards, Node Operators must be running a p 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. -In the SubQuery Network, the inflation rate is expected to be `1.2%`. The majority of these rewards acts as network inflation rewards (`1%`), 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 network inflation rewards, while the remainder is allocated to the SubQuery Treasury to fund various programmes. ## Cobb-Douglas Production Function @@ -41,7 +41,7 @@ This approach was championed by the 0x team, and in simple terms, means that rev ## Minimum Staking Requirements -The beauty of the Cobb Douglas equation (above) is that a rational Node Operator must maintain a stable level of staked SQT relative to the work they do in order in each reward pool in order to receive optimal rewards from either of the reward sources. As a result, the SubQuery Network does not need to enforce arbitrary staking requirements because Node Operators are incentivised to self-manage and maintain a stake or skin in the game. +The beauty of the Cobb Douglas equation (above) is that a rational Node Operator must maintain a stable level of staked SQT relative to the work they do in order in each reward pool in order to receive optimal rewards from either of the reward sources. As a result, the SubQuery Network does not need to enforce many arbitrary staking requirements because Node Operators are incentivised to self-manage and maintain a stake or skin in the game (we do enforce a [minimum Node Operator Stake however](../node_operators/stake.md#how-much-sqt-should-you-stake)). SubQuery does require Node Operator must allocate their staked and delegated SQT on the deployment they run, so they can earn Allocation Rewards. When a Node Operator's stake decreases beneath the amount they have allocated, they will stop earning Allocation Rewards until they either increase their stake or reduce the allocated SQT to recover from this status. diff --git a/docs/subquery_network/node_operators/setup/becoming-a-node-operator.md b/docs/subquery_network/node_operators/setup/becoming-a-node-operator.md index bdeb3bb2608..35839add8f9 100644 --- a/docs/subquery_network/node_operators/setup/becoming-a-node-operator.md +++ b/docs/subquery_network/node_operators/setup/becoming-a-node-operator.md @@ -89,8 +89,8 @@ We highly recommend setting up SSL on your new server and [consulting our securi Once your Indexing Service is all set and running successfully, you should open the Node Operator Admin App and follow the steps to register yourself (usually this is `http://localhost:8000/` depending on your installation). This includes: - Connect your metamask -- Register and stake your minimum required stake (currently 200,000 SQT) -- Add metadata information for your network +- Register and stake your minimum required stake ([see the current value](../../parameters.md)) +- Add metadata information for your node operator ## 4. Index or Sync a Project diff --git a/docs/subquery_network/node_operators/stake.md b/docs/subquery_network/node_operators/stake.md index ad6b4acabd9..39e3bab257c 100644 --- a/docs/subquery_network/node_operators/stake.md +++ b/docs/subquery_network/node_operators/stake.md @@ -6,9 +6,9 @@ One key difference between Kepler and the mainnet is that now Node Operators mus ::: -In order to register and become a Node Operator, a minimum amount of SQT is required to stake in the staking contract. +In order to register and become a Node Operator, a minimum amount of SQT is required to stake in the staking contract - see [how much SQT should you stake](#how-much-sqt-should-you-stake). -If a Node Operator is caught misbehaving (such as by providing invalid, incomplete, or incorrect data), they are liable to have a portion of their staked SQT (on the particular reward pool) reallocated to the SubQuery Foundation Treasury, diminishing their staked SQT in the network and therefore reducing their potential rewards. +If a Node Operator is caught misbehaving (such as by providing invalid, incomplete, or incorrect data), they are liable to have a portion of their staked SQT (on the particular reward pool) slashed or reallocated to the SubQuery Foundation Treasury, diminishing their staked SQT in the network and therefore reducing their potential rewards. ## Managing Staking Allocation @@ -63,7 +63,7 @@ You can use the estimate of the Own Stake and Total Delegated for the next Era o 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, at the moment this is 200,000 SQT +- 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 amount based on the size of the Node Operator's self stake, this ensures the Node Operator has sufficient skin in the game. Increasing self stake can mean delegators are able to delegate more to you. - 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. diff --git a/docs/subquery_network/parameters.md b/docs/subquery_network/parameters.md new file mode 100644 index 00000000000..eb20bf0f45d --- /dev/null +++ b/docs/subquery_network/parameters.md @@ -0,0 +1,15 @@ +# Current Network Parameters + +The SubQuery technical council is constantly adjusting various parameters of the SubQuery Network to optimise for APR and sustainability, while ensuring prices are competitive compared to centralised alternatives. This page lists all the current network parameters and is kept up to date. + +| Parameter | Value | Description | +| -------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Era Length | 7 days | See [Era](./introduction/era.md) | +| Minimum Node Operator Stake | 200,000 SQT | All Node Operators must stake a minimum amount of SQT to become a Node Operator. See [Node Operator Stake](./node_operators/stake.md). | +| Network Inflation Rate | 1.2% | New tokens minted and allocated to [network inflation rewards](./introduction/reward-distribution.md#network-inflation-rewards), or distributed to the SubQuery treasury. | +| Network Inflation Rewards Rate | 1% | The majority of network inflation acts as [network inflation rewards](./introduction/reward-distribution.md#network-inflation-rewards), while the remainder (0.2%) goes to the SubQuery Tresury | +| Staking/Delegation Unlock Period | 14 days | How long SQT is locked when it is unstaked or undelegated. Note that you can skip this period if you instead redelegate. | +| Staking/Delegation Unlock Fee | 0.1% | The network fee to unstake or undelegate your SQT | +| Dispute Deposit | 10,000 SQT | The minimum amount to open up a network dispute. | +| Offer Cancellation Penalty Rate | 10% | When a consumer cancels an unexpired purchase offer, this penalty is taken from the offer and sent to the SubQuery treasury. | +| Minimum Deployment Booster | 1,000 SQT | The minimum boost amount that must be boosted against a project deployment in order for the project deployment to start receiving booster rewards. | diff --git a/docs/subquery_network/token/tokenomics.md b/docs/subquery_network/token/tokenomics.md index 574c8f10a09..602aa967f11 100644 --- a/docs/subquery_network/token/tokenomics.md +++ b/docs/subquery_network/token/tokenomics.md @@ -2,7 +2,7 @@ **Total Supply**: The total supply will initally be 10 Billion SQT tokens. -**Inflation**: The inflation is expected to be ~1.3% per annum. This will be used to help the SubQuery Foundation bootstrap the network by supporting Node Operators during the early launch phase where Consumers numbers will still be growing, as well as contribute funds to the SubQuery Foundation treasury. Read more about [network inflation rewards here](../introduction/reward-distribution.md#network-inflation-rewards). +**Inflation**: SubQuery Network is inflationary, you can see the current rate on the [parameters page](../parameters.md). This will be used to help the SubQuery Foundation bootstrap the network by supporting Node Operators during the early launch phase where Consumers numbers will still be growing, as well as contribute funds to the SubQuery Foundation treasury. Read more about [network inflation rewards here](../introduction/reward-distribution.md#network-inflation-rewards). ![token allocation](/assets/img/network/token_allocation.png)