| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Cardano.Ledger.State.SnapShots
Synopsis
- preDijkstraMaxPool ∷ NonNegativeInterval → NonZero Word16 → Coin → Rational → Rational → Coin
- z0Of ∷ NonZero Word16 → Rational
- genNOpt ∷ Gen (NonZero Word16)
- genSigmaAndRelativePledge ∷ NonZero Word16 → Gen (Rational, Rational)
- genMaxPledgeLeverage ∷ Gen NonNegativeInterval
- leverageCap ∷ NonNegativeInterval → MaxPledgeLeverage
- noLeverageCap ∷ MaxPledgeLeverage
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.
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], sincez0is 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.