Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Ctx = decimal.Context128 One = decimal.WithContext(Ctx).SetUint64(1) LogTwo = Ctx.Log(decimal.WithContext(Ctx), decimal.WithContext(Ctx).SetUint64(2)) // TenYears contains one extra layer to account for the effective genesis (zero) layer. TenYears = decimal.WithContext(Ctx).SetUint64(10*constants.OneYear + 1) IssuanceNum = decimal.WithContext(Ctx).SetUint64(constants.TenYearTarget - constants.TotalVaulted) IssuanceDenom = decimal.WithContext(Ctx).SetUint64(constants.TotalSubsidy) IssuanceFrac = Ctx.Sub(decimal.WithContext(Ctx), One, Ctx.Quo(decimal.WithContext(Ctx), IssuanceNum, IssuanceDenom)) HalfLife = Ctx.Mul(decimal.WithContext(Ctx), decimal.WithContext(Ctx).Neg(TenYears), Ctx.Quo(decimal.WithContext(Ctx), LogTwo, Ctx.Log(decimal.WithContext(Ctx), IssuanceFrac))) Lambda = Ctx.Quo(decimal.WithContext(Ctx), LogTwo, HalfLife) NegLambda = decimal.WithContext(Ctx).Neg(Lambda) TotalSubsidy = decimal.WithContext(Ctx).SetUint64(constants.TotalSubsidy) FinalIssuanceFrac = Ctx.Quo(decimal.WithContext(Ctx), Ctx.Sub(decimal.WithContext(Ctx), TotalSubsidy, One), TotalSubsidy) FinalLayer = Ctx.Quo(decimal.WithContext(Ctx), Ctx.Log(decimal.WithContext(Ctx), Ctx.Sub(decimal.WithContext(Ctx), One, FinalIssuanceFrac)), NegLambda) )
Functions ¶
func TotalAccumulatedSubsidyAtLayer ¶
TotalAccumulatedSubsidyAtLayer returns the total accumulated block subsidy paid by the protocol as of the given layer, denominated in smidge.
func TotalSubsidyAtLayer ¶
TotalSubsidyAtLayer returns the total subsidy issued in the layer
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.