Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/learn/dapp-staking/dapp-staking-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ There you can find your current tier, number of stakers, total earned (total sta

### Q: How are dApps assigned to tiers?

At the end of each **Build&Earn** Subperiod, dApps are assigned to a tier based on the total value staked on them by users. There are *4 tiers*.
At the end of each **Build&Earn** Subperiod, dApps are assigned to a tier based on the total value staked on them by users. There are *4 tiers* with a **fixed maximum of 16 slots** distributed across all tiers.

The threshold for tier 4 is fixed, while it is dynamic for the other tiers.
Each tier has entry thresholds defined as **fixed percentages** of total issuance. These percentages remain constant, though the absolute threshold amounts adjust proportionally with changes in total issuance.

### Q: Is the amount of dApp Staking rewards fixed per dApp?

Expand Down
68 changes: 6 additions & 62 deletions docs/learn/dapp-staking/dapp-staking-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,67 +249,25 @@ Each tier also has a _threshold_ which a dApp must satisfy in order to enter it.
#### Tiers Capacity

There is a limited amount of slots for dApps which means dApps have to compete for them.
The amount isn't static but is recalculated at the start of each period.

Since the purpose of dApp staking isn't for dApps to earn obscene amounts of rewards, but to provide
support to operate and further develop existing dApp, number of slots is scaled with the value of **ASTR** expressed in **USD**.
The protocol uses a **fixed maximum of 16 slots** distributed across all tiers. This fixed capacity provides predictability and stability to the tier system.

At the beginning of **each era**, using the _moving average_ **ASTR** price, new number of slots is calculated:

$ number\_of\_slots_{Astar} = floor(1000 * ASTR_{USD} + 50)$

This approach means that as **ASTR** value increases, so does the number of slots for dApp staking, and vice-versa.

Once number of slots is calculated, it is divided up into slots per tier.
The portions are statically configured, e.g. _tier 1_ gets **10%** of the slots, _tier 2_ gets **25%** of the slots, and so on.

Same principle is applied to Shiden, but with a slightly modified formula:

$ number\_of\_slots_{Shiden} = floor(100 * SDN_{USD} + 50)$

These formulas were designed with a _baseline_ price in mind.
Using the _baseline_ price, the _baseline_ number of slots can be calculated using the listed formulas.

This value is important since it's used as a reference when calculating tier threshold adjustment.
The slots are divided among tiers according to statically configured portions. For example, on Astar, _tier 2_ gets **37.5%** of the slots and _tier 3_ gets **62.5%** of the slots (_tier 1_ and _tier 4_ have no slots). For a total of 16 slots, this represents 6 slots in _tier 2_ and 10 slots in _tier 3_. The exact slot distribution per tier varies by network and is defined in the [network parameters](/docs/learn/dapp-staking/protocol-parameters#network-values).

#### Tier Threshold Entry

A dApp isn't entitled to a tier by just participating in the dApp Staking.
It needs to attract sufficient support to even be eligible for entry into a tier.

E.g. a threshold to enter _tier 1_ might be set to **1,000,000 ASTR**.
Since number of slots is dynamic, so has to be the threshold to allow for more realistic competition.
It's not fair to define the same threshold for entering a tier if there are 50 slots or 500 slots since the
staked amount will be more diluted between various dApps.

The formula for adjusting tier entry threshold with dApps slot changes:

$\Delta\%_{threshold} = (\frac{100\%}{100\% + \Delta\%_{dApps}} - 1) * 100\%$

where $\Delta\%_{dApps}$ is the change in the number of dApps, expressed as a percent. In case number has been reduced, the _delta_ will be negative.
The comparison is always done between the _baseline_ number of slots (determined using the baseline price) and the new number of slots.

$new\_threshold = base\_threshold * (1 + \Delta\%_{threshold})$

There are two types of tier entry thresholds:
Tier entry thresholds are defined as **fixed percentages** of the total issuance. These percentages remain constant across periods, but the absolute threshold amounts adjust proportionally as the total issuance changes (e.g., through burn events).

* `Dynamic` - A percentage of the total issuance as staked funds that can change between periods. It includes:
- A **minimum** percentage that the threshold cannot fall below
- A **maximum** percentage cap that limits how high the threshold can grow
For example, suppose the total issuance is **8.4 billion** ASTR tokens. For a tier with a threshold percentage set at **2.32%**, this equals approximately **195 million ASTR**. If the total issuance drops to **8.0 billion** ASTR, the threshold adjusts to:

This type is used for _higher_ tiers.
$new\_threshold = 2.32\% * 8.0 billion = 185,600,000\ ASTR$

* `Fixed` - A constant percentage of the total issuance as staked funds, which does not change between periods. Used for the _lowest_ tier, and defines a static value.

These percentages are calculated based on a total issuance of **8.4 billion ASTR** tokens when dApp Staking V3 was launched. As the total issuance changes (e.g. burn events), the dynamic thresholds will adjust accordingly, ensuring a fair and adaptive staking environment.

For example, suppose the total issuance is **8.4 billion** ASTR tokens. For **Tier 1**, the dynamic threshold percentage is set at **3.57%** (*approximately 299,880,000 ASTR*), with a minimum required percentage of **2.38%** (*approximately 199,920,000 ASTR*) and a maximum possible percentage set according to network parameters. If the total issuance decreases due to a burn event, the threshold adjusts accordingly. For example, if the total issuance drops to **8.0 billion** ASTR, the **Tier 1** threshold adjusts to:

$new\_threshold = 3.57\% * 8.0 billion = 285,600,000\ ASTR$

The maximum cap ensures that during periods of high competition or changing token price conditions, tier thresholds don't grow beyond reasonable limits, maintaining accessibility for dApps.

If the number of slots changes, the threshold is further adjusted based on the delta percentage formula.
This approach ensures that tier thresholds scale with the token supply while maintaining consistent percentage requirements.

*Refer to the [dApp staking parameters](/docs/learn/dapp-staking/protocol-parameters#network-values) page to find out more about the percentage values for each network.*

Expand Down Expand Up @@ -412,17 +370,3 @@ However, this should not be a problem given how the system is designed.
There is no longer _stake&forget_ - users are expected to revisit dApp staking at least at the
beginning of each new period to pick out old or new dApps on which to stake on.
If they don't do that, they miss out on earning staker rewards.

### Oracle Price Feed

Tier slots, thresholds and rewards need to be adjusted for the native currency price. This has been mentioned in previous chapters. E.g. if price of the **ASTR** goes up, the protocol can accommodate more dApps, and vice-versa.

This is done in multiple steps:

1. Permissioned oracle feeds the native currency price on-chain.
2. Price is aggregated over the defined time period (e.g. the entire day), and average value is calculated.
3. Aggregated price is stored into a circular buffer used to calculate moving average.
4. dApp staking tier configuration re-calculation relies on the moving average price.

The _moving-average_ approach is utilized to soften the impact of crypto's high price volatility.
It's important to keep the _window_ small enough to be able to react to price changes in timely manner, but long enough to _dampen_ sudden & temporary spikes.
2 changes: 1 addition & 1 deletion docs/learn/dapp-staking/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Tier System is a method to rank dApps based on the total value staked on them. T

There are a limited number of tiers, each with a set number of slots and a minimum threshold for dApps to qualify.

A dApp must gain enough support to enter a tier, with dynamic thresholds for fair competition. Higher tiers offer larger rewards.
A dApp must gain enough support to enter a tier, with thresholds defined as fixed percentages of total issuance. Higher tiers offer larger rewards.

Within a tier, dApps can also have a **rank (0..10)**. Tokenomics 3.0 uses a deterministic `tier_rank_multipliers` weight model so a dApp's rewards can depend on **tier + rank** (not on empty slots). For the technical details and formulas, see the [technical overview](/docs/learn/dapp-staking/dapp-staking-protocol.md).

Expand Down
23 changes: 5 additions & 18 deletions docs/learn/dapp-staking/protocol-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,8 @@ For each tier, this value defines how much **rank 10** earns relative to **rank
### Tier Thresholds

The threshold a dApp must meet, based on a percentage of the total issuance staked, to enter a tier.
There are two types of threshold percentages:

* `Fixed` - A percentage of the total issuance as staked funds.
* `Dynamic` - A percentage of the total issuance as staked funds. This variant includes an additional adjustment in later calculations with a delta based on changes in the number of slots for each era. The threshold amount derived cannot drop below a defined minimum percentage, *minimum_required_percentage*. Similarly, the derived threshold amount cannot exceed a defined maximum percentage, *maximum_possible_percentage*.

### Price Aggregation Duration

Time period, expressed in blocks, during which native currency price is aggregated. When expired, average value is calculated and stored into the _moving-average_ circular buffer.

## Circular Buffer Length

Length of the circular buffer used to implement the _moving-average_ solution.
Tier thresholds are defined as **fixed percentages** of the total issuance. As the total issuance changes (e.g., through burn events), the absolute threshold amounts adjust proportionally, but the percentage remains constant.

## Network Values

Expand All @@ -108,14 +98,11 @@ Length of the circular buffer used to implement the _moving-average_ solution.
| Max Number Of Staked Contracts | 16 | 16 | 8 |
| Minimum Stake Amount | 500 ASTR | 50 SDN | 5 SBY |
| Max Bonus Safe Moves Per Period (legacy/internal) | 2 | 2 | 2 |
| Baseline Native Currency Price | 0.05 USD | 0.05 USD | 0.05 USD (mock) |
| Number Of Tiers | 4 | 4 | 4 |
| Reward Distribution | [0%, 70%, 30%, 0%] | [25%, 47%, 25%, 3%] | [40%, 30%, 20%, 10%] |
| Slot Portions | [0%, 37.5%, 62.5%, 0%] | [5%, 20%, 30%, 45%] | [10%, 20%, 30%, 40%] |
| Tier Rank Multipliers (bips; rank10 vs rank0) | [0, 24_000, 46_700, 0] | Runtime configured | Runtime configured |
| Tier 1 Threshold (total issuance % - base/min/max) | Fixed(2.32%) | Dynamic(3.57%/2.38%/100%) | Dynamic(0.0020%/0.0017%/0.0030%) |
| Tier 2 Threshold (total issuance % - base/min/max) | Fixed(0.93%) | Dynamic(0.89%/0.6%/100%) | Dynamic(0.0013%/0.0010%/0.0020%) |
| Tier 3 Threshold (total issuance % - base/min/max) | Fixed(0.35%) | Dynamic(0.238%/0.179%/100%) | Dynamic(0.00054%/0.00034%/0.0010%) |
| Tier 4 Threshold (total issuance % - base/min/max) | Fixed(0%) | Fixed(0.06%) | Fixed(0.00014%) |
| Price Aggregation Duration | 7200 blocks | 7200 blocks | 7200 blocks |
| Circular Buffer Length | 7 | 7 | 7 |
| Tier 1 Threshold (% of total issuance) | 2.32% | 2.32% | 2.32% |
| Tier 2 Threshold (% of total issuance) | 0.93% | 0.93% | 0.93% |
| Tier 3 Threshold (% of total issuance) | 0.35% | 0.35% | 0.35% |
| Tier 4 Threshold (% of total issuance) | 0% (unreachable) | 0% (unreachable) | 0% (unreachable) |
4 changes: 2 additions & 2 deletions docs/use/how-to-guides/layer-1/dapp-staking/for-devs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Before reading the dApp Staking section for dApp owner, make sure you understand

dApp Staking introduces the concept of a tier system for dApps. It's important to fully understand the [tier mechanism](/docs/learn/dapp-staking/dapp-staking-protocol.md#tier-system) before proceeding with dApp Staking application and registration as a dApp owner.

dApp Staking uses reward tiers (each with a limited number of slots), and where applicable assigns ranks within tiers so dApp rewards are determined deterministically by **tier + rank**. Tier capacity for dApp staking is calculated at the start of each period based on the ASTR price as described [here](/docs/learn/dapp-staking/dapp-staking-protocol.md#tier-system).
dApp Staking uses reward tiers (each with a limited number of slots), and where applicable assigns ranks within tiers so dApp rewards are determined deterministically by **tier + rank**. The protocol uses a **fixed maximum of 16 slots** distributed across all tiers, providing predictability and stability to the tier system.

The slots allocated to each tier can be viewed on the [dApp Staking Page](https://portal.astar.network/astar/dapp-staking/discover) of the Astar Portal.

At the end of each **Build&Earn** subperiod, dApps are assigned to a tier based on the total value staked on them by users. Each tier has a **threshold** that a dApp must reach in order to access it.

At the protocol level, at most **16 dApps are reward-eligible per era** (across tiers).

The threshold for tier 4 is fixed, but for the other tiers, the threshold is **dynamic** and calculated at the start of each new period based on the total number of slots for the period. To find out more, [click here](/docs/learn/dapp-staking/dapp-staking-protocol.md#tier-threshold-entry).
Tier thresholds are defined as **fixed percentages** of total issuance. These percentages remain constant across periods, though the absolute threshold amounts adjust proportionally with changes in total issuance. To find out more, [click here](/docs/learn/dapp-staking/dapp-staking-protocol.md#tier-threshold-entry).

**Rewards** for dApps are also **dynamic**, fluctuating from tier to tier. The higher the tier, the greater the number of ASTR tokens allocated from inflation as rewards for that tier.

Expand Down