AstarNetwork / astar-apps

The official Astar Network portal for accessing your tokens and other native features!
https://portal.astar.network/
GNU General Public License v3.0
67 stars 85 forks source link

Burned rewards calculation #1269

Closed bobo-k2 closed 2 months ago

bobo-k2 commented 2 months ago

Pull Request Summary

Fixed existing 'tokens to be burned' calculation to use real dApp tiers allocation.

The code goes from the first era in the current period 'till current_era - 1 and calculates how much reward are allocated for empty tiers slots (those are burned rewards). Those calculation is based on real data.

Second part of the calculations calculates the same from current_era until last era of the current period under assumption that we will have the same dApp tier allocations as in previous era. Since we are looking for total tokens to be burned this is the best we can. The more we are progressing till the end of the current period the more precise calculation will be.

image

Check list

github-actions[bot] commented 2 months ago

Visit the preview URL for this PR (updated for commit f40ec50):

https://astar-apps--pr1269-fix-burned-rewards-w3lcu4xd.web.app

(expires Fri, 03 May 2024 06:57:49 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: dd76fe72958fe2910fef9d53f0b4539b82b849db

Kahonnohak commented 2 months ago

Thanks @bobo-k2 I'll check & verify by manually adding tokens tomorrow!