Module dapp_staking

Source
Expand description

dApp staking & inflation primitives.

Structs§

RankedTier
RankedTier is wrapper around u8 to hold both tier and rank. u8 has 2 bytes (8bits) and they’re using in this order 0xrank_tier. First 4 bits are used to hold rank and second 4 bits are used to hold tier. i.e: 0xa1 will hold rank: 10 and tier: 1 (0xa1 & 0xf == 1; 0xa1 >> 4 == 10;)
StandardTierSlots
Standard tier slots implementation, as proposed in the Tokenomics 2.0 document.

Enums§

SmartContract
Multi-VM pointer to smart contract instance.

Constants§

STANDARD_TIER_SLOTS_ARGS
Standard tier slots arguments. Initially decided for Astar, during the Tokenomics 2.0 work.

Traits§

AccountCheck
Used to check whether an account is allowed to participate in dApp staking or not.
CycleConfiguration
Configuration for cycles, periods, subperiods & eras.
Observer
Trait for observers (listeners) of various events related to dApp staking protocol.
SmartContractHandle
Trait defining the interface for dApp staking smart contract types handler.
StakingRewardHandler
Interface for staking reward handler.
TierSlots
Trait for calculating the total number of tier slots for the given price.

Type Aliases§

DAppId
Dapp Id type
EraNumber
Era number type
PeriodNumber
Period number type
Rank
TierId
Tier Id type