cardano-ledger-core-1.24.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellNone
LanguageHaskell2010

Test.Cardano.Ledger.State.SnapShots

Synopsis

Documentation

preDijkstraMaxPool ∷ NonNegativeInterval → NonZero Word16 → Coin → Rational → Rational → Coin Source #

A frozen copy of the reward pot formula as it was before the maximum pledge leverage was introduced in Dijkstra. Used to ensure that a pool that is not subject to a leverage cap is rewarded exactly as it was in the previous eras.

z0Of ∷ NonZero Word16 → Rational Source #

z0 = 1/k, the global saturation point.

genSigmaAndRelativePledge ∷ NonZero Word16 → Gen (Rational, Rational) Source #

A pool's relative stake σ together with its relative pledge.

Both are generated the way they actually occur on chain, otherwise the leverage cap almost never binds and the properties below become vacuous:

  • σ is generated around the saturation point z0 = 1/k, rather than uniformly in [0, 1], since z0 is where the reward pot stops growing.
  • the pledge is a fraction of the stake, since a pool that pledges more than its own stake receives no rewards at all. The leverage of the pool, σ over the pledge, ranges over the whole interval that the maximum pledge leverage can be set to, and beyond.

noLeverageCap ∷ MaxPledgeLeverage Source #

No maximum pledge leverage, ie. the behavior of all the eras prior to Dijkstra.