//! Internal logic functions such as `update_pool_and_staker_rewards` where deliberately written
//! without any side-effects like storage interaction.
//!
//! Storage interaction such as reads and writes are instead all performed in the top level
//! pallet Call method, which while slightly more verbose, makes it much easier to understand the
//! code and reason about where side-effects occur in the pallet.
//!
//! ## Implementation Notes
//!
//! The implementation is based on the [AccumulatedRewardsPerShare](https://dev.to/heymarkkop/understanding-sushiswaps-masterchef-staking-rewards-1m6f) algorithm.
//!
//! Rewards are calculated JIT (just-in-time), when a staker claims their rewards.
...
...
@@ -79,6 +88,14 @@ pub type PoolId = u32;
/// Multiplier to maintain precision when calculating rewards.