Crate pallet_liquidity_rewards
source ·Expand description
§Rewards Pallet
The Rewards pallet provides functionality for distributing rewards to different accounts with different currencies. The distribution happens when an epoch (a constant time interval) finalizes. The user can stake an amount during one of more epochs to claim the reward.
Rewards pallet can be configured with any implementation of
[cfg_traits::rewards
] traits which gives the reward behavior.
The Rewards pallet provides functions for:
- Stake/Unstake a currency amount.
- Claim the reward given to a staked currency.
- Admin methods to configure epochs, currencies and reward groups.
Re-exports§
pub use weights::WeightInfo;
pub use pallet::*;
Modules§
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet. - Provides functionality around the transaction storage.
- Autogenerated weights for
pallet_liquidity_rewards
Structs§
- A bounded map based on a B-Tree.
- Type that contains the pending update.
- Type that contains the associated data of an epoch
Traits§
- Abstraction over a distribution reward system for accounts.
- Support for change currencies among groups.
- Distribution mechanisms over group rewards. This trait is implemented automatically for all
GroupRewards
with the requested bounds. - Abstraction over a distribution reward groups.
Type Aliases§
Attribute Macros§
- Execute the annotated function in a new storage transaction.