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;)

Enums§

SmartContract
Multi-VM pointer to smart contract instance.

Constants§

FIXED_NUMBER_OF_TIER_SLOTS
Fixed number of tier slots used by dApp-staking recalculation.
FIXED_TIER_SLOTS_ARGS
Standard tier slots arguments. Decided for Astar, during the Tokenomics 3.0 revamp.

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.

Type Aliases§

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