# dApp Staking - Too High Threshold Incident

**URL:** https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902
**Category:** General
**Created:** [May 29, 2024, 12:34pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902 "2024-05-29T12:34:47Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.astar.network/u/Dino)
#### Post date: [May 29, 2024, 12:34pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/1 "2024-05-29T12:34:47Z")

</div>

Hello everyone,

this is just a quick info sharing regarding the ongoing incident related to dApp staking’s tier thresholds.

## Impact

The issue doesn’t impact stakers, only dApps & developers.

As tier thresholds have increased beyond what was expected, some dApps have been pushed to lower tiers, even though for the current ASTR price they should have remained in the higher tier.

## Issue

The issue is with the formula used to calculate the threshold adjustment. The formula from the report & implemented in the code is _essentially_ correct, but it must account for the fact that thresholds saturate at some point (e.g. for Tier 1 it’s 200M ASTR). Docs [here](https://docs.astar.network/docs/learn/dapp-staking/dapp-staking-protocol/#tier-threshold-entry) cover this, and will be updated after next docs release with corrections.

The slightly adjusted formula will always consider price changes compared to the _base_ price using which the model in the report(s) was made. That way, we have a guarantee that regardless of the current thresholds and number of slots, the calculated thresholds will be as expected. But to avoid tech details, for those interested feel free to check the PR: [Base native currency price for dApp Staking by Dinonard · Pull Request #1252 · AstarNetwork/Astar · GitHub](https://github.com/AstarNetwork/Astar/pull/1252)

The problem wasn’t introduced in any recent updates, but was made visible after the _oracle_ integration since this caused tier configuration to be recalculated on a daily basis.

## Technical Fix

The fix has been made in the PR linked above, and will be deployed any time now. From the next era, thresholds will be back to values similar as before.

NOTE: If ASTR price goes further down, thresholds will continue to increase.

## Missed Reward Compensation

We realize that projects have missed on some rewards due to this bug.  
To remedy that, we’ll compensate them accordingly.

We’ll calculate what the tier assignments would have been if runtime was working correctly, and payout the reward difference to the projects.

The calculation will be done via script, which will simulate reward distribution _if correct runtime logic was used_. The script will be shared publicly.

We cannot specify exact dates yet, but it should be done in the next weeks, by the end of June.

---

<div class="post-metadata">

### Author: ![pithecus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/pithecus/32/5678_2.png) [@pithecus](https://forum.astar.network/u/pithecus)
#### Post date: [May 29, 2024, 12:55pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/2 "2024-05-29T12:55:54Z")

</div>

Glad to see that quick action kicked in after the bug has been discovered and eventually the fix is already prepared!

---

<div class="post-metadata">

### Author: ![defiguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/defiguy/32/1358_2.png) [@defiguy](https://forum.astar.network/u/defiguy)
#### Post date: [May 29, 2024, 1:49pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/3 "2024-05-29T13:49:20Z")

</div>

> [@Dino](#):
>
> we’ll compensate them accord

Hello Dino! Thanks for the quick action.

---

<div class="post-metadata">

### Author: ![tksarah](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/tksarah/32/1947_2.png) [@tksarah](https://forum.astar.network/u/tksarah)
#### Post date: [May 29, 2024, 1:50pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/4 "2024-05-29T13:50:50Z")

</div>

Thank you for providing the information promptly.  
I am trying to extract and graph on-chain data related to dAppStaking, so it is very important when analyzing that it is corrected to the expected correct logic and correct values.

---

<div class="post-metadata">

### Author: ![Juminstock](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/juminstock/32/5942_2.png) [@Juminstock](https://forum.astar.network/u/Juminstock)
#### Post date: [May 29, 2024, 3:49pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/5 "2024-05-29T15:49:19Z")

</div>

It’s amazing to see the very good support Astar generates to the problems he faces, Great news, Dino!

---

<div class="post-metadata">

### Author: ![you425](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/you425/32/3313_2.png) [@you425](https://forum.astar.network/u/you425)
#### Post date: [May 30, 2024, 6:49am UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/6 "2024-05-30T06:49:13Z")

</div>

@Dino Thanks for the report!  
I am relieved at the quick response.

One thing that concerns me is that the threshold was above the MAX Threshold yesterday. Was this also resolved with this update?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/plasmnet/original/2X/9/95c4975f0ce5f1f1c54c0d826b6f333489a5bc62.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/plasmnet/original/2X/4/42ccfd18aa7ba0d50a69f024843f6766072542ff.png)

---

<div class="post-metadata">

### Author: ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.astar.network/u/Dino)
#### Post date: [May 30, 2024, 6:52am UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/7 "2024-05-30T06:52:22Z")

</div>

The first number is not MAX but a starting value associated with base price of 0.05$.

---

<div class="post-metadata">

### Author: ![you425](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/you425/32/3313_2.png) [@you425](https://forum.astar.network/u/you425)
#### Post date: [May 31, 2024, 7:26am UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/9 "2024-05-31T07:26:54Z")

</div>

Sorry, I am not sure what you mean.

Does that mean that a Tier 1 could exceed the 300M threshold?

I understand that a dynamic threshold range is specified regardless of the ASTR price.

---

<div class="post-metadata">

### Author: ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.astar.network/u/Dino)
#### Post date: [May 31, 2024, 8:12am UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/10 "2024-05-31T08:12:17Z")

</div>

> [@you425](#):
>
> Does that mean that a Tier 1 could exceed the 300M threshold?

Yes, that’s correct.

---

<div class="post-metadata">

### Author: ![you425](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/you425/32/3313_2.png) [@you425](https://forum.astar.network/u/you425)
#### Post date: [May 31, 2024, 8:13am UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/11 "2024-05-31T08:13:40Z")

</div>

Okay, thank you very much.

---

<div class="post-metadata">

### Author: ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.astar.network/u/Dino)
#### Post date: [June 12, 2024, 2:22pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/12 "2024-06-12T14:22:11Z")

</div>

Thanks to @ermal, script has already been implemented & results generated.  
The code can be found here: [GitHub - AstarNetwork/dapp-staking-reimbursement-script](https://github.com/AstarNetwork/dapp-staking-reimbursement-script)

We assume that people will be most interested in:

- [Table with overview of eras and reward deltas](https://github.com/AstarNetwork/dapp-staking-reimbursement-script/blob/master/raw-result.csv)
- [Amount to reimburse per dApp](https://github.com/AstarNetwork/dapp-staking-reimbursement-script/blob/master/reimburse.csv)

High level approach is described here: [dApp Staking - Threshold Issue Reimbursement · Issue #1253 · AstarNetwork/Astar · GitHub](https://github.com/AstarNetwork/Astar/issues/1253)

Feel free to check & verify the results.

We will execute the reimbursement call next week.

---

<div class="post-metadata">

### Author: ![BoomBLB](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/boomblb/32/2209_2.png) [@BoomBLB](https://forum.astar.network/u/BoomBLB)
#### Post date: [June 13, 2024, 1:47am UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/13 "2024-06-13T01:47:55Z")

</div>

It’s great, thank you very much for coming to remind us. =)

---

<div class="post-metadata">

### Author: ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.astar.network/u/Dino)
#### Post date: [June 17, 2024, 8:57am UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/14 "2024-06-17T08:57:46Z")

</div>

We will proceed with the refund as calculated in the linked script.

---

<div class="post-metadata">

### Author: ![Leo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/leo/32/1885_2.png) [@Leo](https://forum.astar.network/u/Leo)
#### Post date: [June 30, 2024, 9:00pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/15 "2024-06-30T21:00:52Z")

</div>

Hello Dino,

We have entered July.

Could you please let me know when the error payments will be sent? I would appreciate any information you can provide.

Have a great day. 💙

---

<div class="post-metadata">

### Author: ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.astar.network/u/Dino)
#### Post date: [July 1, 2024, 12:29pm UTC](https://forum.astar.network/t/dapp-staking-too-high-threshold-incident/6902/16 "2024-07-01T12:29:09Z")

</div>

The payment was done after my last message, ~2 weeks ago ([LINK](https://astar.subscan.io/multisig_extrinsic/6408935-2?call_hash=0x123d779d42bb57499be886fca7fa8d8d42c616c8839d9b1e6f04dd8b9fcd8c32)).
