From 76d1e18dd9c91e904d7dd321a1379c647b2855f8 Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Mon, 4 Dec 2023 17:47:51 +0100 Subject: [PATCH] More docs --- primitives/src/dapp_staking.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/primitives/src/dapp_staking.rs b/primitives/src/dapp_staking.rs index 0e04c68b1c..92ead96b15 100644 --- a/primitives/src/dapp_staking.rs +++ b/primitives/src/dapp_staking.rs @@ -18,9 +18,13 @@ use super::{Balance, BlockNumber}; -// TODO2: However this ends up looking in the end, we should not duplicate these parameters in the runtime. -// Both the dApp staking & inflation pallet should use the same source. -/// TODO: docs! +/// Configuration for cycles, periods, subperiods & eras. +/// +/// * `cycle` - Time unit similar to 'year' in the real world. Consists of one or more periods. At the beginning of each cycle, inflation is recalculated. +/// * `period` - Period consists of two distinct subperiods: `Voting` & `Build&Earn`. They are integral parts of dApp staking. +/// Length is expressed in standard eras or just _eras_. +/// * `era` - Era is the basic time unit in the dApp staking protocol. At the end of each era, reward pools for stakers & dApps are calculated. +/// Era length is expressed in blocks. pub trait CycleConfiguration { /// How many different periods are there in a cycle (a 'year'). ///