AstarNetwork / Astar

The dApp hub for blockchains of the future
https://astar.network/
GNU General Public License v3.0
732 stars 236 forks source link

dApp Staking v3 - Tier Assignemt & Reward Distribution Algorithm Assignment Proposal #1198

Closed Dinonard closed 2 weeks ago

Dinonard commented 3 months ago

Overview

For better visibility of the proposed solution: https://forum.astar.network/t/dapp-staking-v3-tier-algorithm-adjustment-proosal/6411

Once dApp staking v3 performance is revised, this is one of the items that can be considered as an improvement approach.

NOTE: This issue ticket does not mean this approach will be adopted.

Solution Idea

It's important to keep the PoV size limited when describing the tier, so we shouldn't replace u8 with a larger footprint value (e.g. u16 or u32).

To implement the proposed ladder system between the tiers, we can do discretization of the space between the two tiers. E.g. we can split the space between tier 3 and tier 4 into 10 or 20 discrete steps. That way we can keep using u8, and will only need to do logic change and tier value adjustment in the existing reward storage.

E.g. if we have a situation where:

In general, number of steps should be kept low. The idea is not to achieve full linearity between the tiers, but to reward significant increases in the TVL of a dApp. So something between 5 to 10 steps between tiers should be more than enough.

Implementation Details

ermalkaleci commented 2 months ago
  • reward_step = (30 - 10) / 2

@Dinonard I guess this needs to be reward_step = (30 - 10) / 10?

Dinonard commented 2 months ago
  • reward_step = (30 - 10) / 2

@Dinonard I guess this needs to be reward_step = (30 - 10) / 10?

Good catch, I'll fix it.