Expand description

dApp staking & inflation primitives.

Structs§

  • 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;)
  • Standard tier slots implementation, as proposed in the Tokenomics 2.0 document.

Enums§

Traits§

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

Type Aliases§