Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
  • Loading branch information
kianenigma authored Jun 11, 2020
commit 340347e1904c3100b3ffb046990b69b62bcc31ff
6 changes: 2 additions & 4 deletions bin/node/runtime/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl Convert<u128, Balance> for CurrencyToVoteHandler {
/// - `v ≤ p / k * (s − s')`
/// - or, solving for `p`: `p >= v * k * (s - s')`
///
/// where `p` is the amount of change of `k` blocks.
/// where `p` is the amount of change over `k` blocks.
///
/// Hence:
/// - in an fully congested chain: `p >= v * k * (1 - s')`.
Expand All @@ -85,14 +85,12 @@ impl Convert<u128, Balance> for CurrencyToVoteHandler {
/// p >= 0.00001 * 28800 * 3 / 4
/// p >= 0.216
///
/// Meaning that fees can change at most by ~20% per day, given extreme congestion.
/// Meaning that fees can change by around ~21% per day, given extreme congestion.
///
/// More info can be found at:
/// https://w3f-research.readthedocs.io/en/latest/polkadot/Token%20Economics.html
pub struct TargetedFeeAdjustment<S, V>(sp_std::marker::PhantomData<(S, V)>);

// TODO: migrate FixedI128 to FixedU128.
// TODO: think about how this value + how to store/configure it.
const PARTS: i128 = 1_000_000_000;
pub const MIN_MULTIPLIER: Multiplier = Multiplier::from_inner(PARTS);

Expand Down