Splice.Issuance

Amulet rewards issuance configuration and computation.

Data Types

data IssuanceConfig

IssuanceConfig

Field

Type

Description

amuletToIssuePerYear

Decimal

validatorRewardPercentage

Decimal

appRewardPercentage

Decimal

validatorRewardCap

Decimal

featuredAppRewardCap

Decimal

unfeaturedAppRewardCap

Decimal

optValidatorFaucetCap

Optional Decimal

Maximal amount in $ for the per-validator issuance of validator faucet coupons; Introduced as part of CIP-3. Defaults to 2.85 USD.

instance Eq IssuanceConfig

instance Show IssuanceConfig

instance GetField "amuletToIssuePerYear" IssuanceConfig Decimal

instance GetField "appRewardPercentage" IssuanceConfig Decimal

instance GetField "featuredAppRewardCap" IssuanceConfig Decimal

instance GetField "issuanceConfig" OpenMiningRound IssuanceConfig

instance GetField "issuanceConfig" SummarizingMiningRound IssuanceConfig

instance GetField "issuanceCurve" (AmuletConfig unit) (Schedule RelTime IssuanceConfig)

instance GetField "optValidatorFaucetCap" IssuanceConfig (Optional Decimal)

instance GetField "unfeaturedAppRewardCap" IssuanceConfig Decimal

instance GetField "validatorRewardCap" IssuanceConfig Decimal

instance GetField "validatorRewardPercentage" IssuanceConfig Decimal

instance SetField "amuletToIssuePerYear" IssuanceConfig Decimal

instance SetField "appRewardPercentage" IssuanceConfig Decimal

instance SetField "featuredAppRewardCap" IssuanceConfig Decimal

instance SetField "issuanceConfig" OpenMiningRound IssuanceConfig

instance SetField "issuanceConfig" SummarizingMiningRound IssuanceConfig

instance SetField "issuanceCurve" (AmuletConfig unit) (Schedule RelTime IssuanceConfig)

instance SetField "optValidatorFaucetCap" IssuanceConfig (Optional Decimal)

instance SetField "unfeaturedAppRewardCap" IssuanceConfig Decimal

instance SetField "validatorRewardCap" IssuanceConfig Decimal

instance SetField "validatorRewardPercentage" IssuanceConfig Decimal

data IssuanceTranche

IssuanceTranche

Field

Type

Description

rewardsToIssue

Decimal

Total amulets to issue as rewards in this tranche

issuancePerCoupon

Decimal

Issuence per reward coupon for this tranche

unclaimedRewards

Decimal

Amulets to issue in this tranche that were not claimed

instance GetField "issuancePerCoupon" IssuanceTranche Decimal

instance GetField "rewardsToIssue" IssuanceTranche Decimal

instance GetField "unclaimedRewards" IssuanceTranche Decimal

instance SetField "issuancePerCoupon" IssuanceTranche Decimal

instance SetField "rewardsToIssue" IssuanceTranche Decimal

instance SetField "unclaimedRewards" IssuanceTranche Decimal

data IssuingRoundParameters

Parameters to use in a round that issues amulet as rewards for collected coupons.

IssuingRoundParameters

Field

Type

Description

issuancePerValidatorRewardCoupon

Decimal

issuancePerFeaturedAppRewardCoupon

Decimal

issuancePerUnfeaturedAppRewardCoupon

Decimal

issuancePerSvRewardCoupon

Decimal

unclaimedAppRewards

Decimal

unclaimedValidatorRewards

Decimal

unclaimedSvRewards

Decimal

Can be non-zero due to rounding, or no SV having had the chance to claim their coupons.

issuancePerValidatorFaucetCoupon

Decimal

instance Eq IssuingRoundParameters

instance Show IssuingRoundParameters

instance GetField "issuancePerFeaturedAppRewardCoupon" IssuingRoundParameters Decimal

instance GetField "issuancePerSvRewardCoupon" IssuingRoundParameters Decimal

instance GetField "issuancePerUnfeaturedAppRewardCoupon" IssuingRoundParameters Decimal

instance GetField "issuancePerValidatorFaucetCoupon" IssuingRoundParameters Decimal

instance GetField "issuancePerValidatorRewardCoupon" IssuingRoundParameters Decimal

instance GetField "unclaimedAppRewards" IssuingRoundParameters Decimal

instance GetField "unclaimedSvRewards" IssuingRoundParameters Decimal

instance GetField "unclaimedValidatorRewards" IssuingRoundParameters Decimal

instance SetField "issuancePerFeaturedAppRewardCoupon" IssuingRoundParameters Decimal

instance SetField "issuancePerSvRewardCoupon" IssuingRoundParameters Decimal

instance SetField "issuancePerUnfeaturedAppRewardCoupon" IssuingRoundParameters Decimal

instance SetField "issuancePerValidatorFaucetCoupon" IssuingRoundParameters Decimal

instance SetField "issuancePerValidatorRewardCoupon" IssuingRoundParameters Decimal

instance SetField "unclaimedAppRewards" IssuingRoundParameters Decimal

instance SetField "unclaimedSvRewards" IssuingRoundParameters Decimal

instance SetField "unclaimedValidatorRewards" IssuingRoundParameters Decimal

data OpenMiningRoundSummary

A summary of total reward coupons issued against a specific open mining round.

OpenMiningRoundSummary

Field

Type

Description

totalValidatorRewardCoupons

Decimal

totalFeaturedAppRewardCoupons

Decimal

totalUnfeaturedAppRewardCoupons

Decimal

totalSvRewardWeight

Int

optTotalValidatorFaucetCoupons

Optional Int

Introduced as part of CIP-3.

instance Eq OpenMiningRoundSummary

instance Show OpenMiningRoundSummary

instance GetField "optTotalValidatorFaucetCoupons" OpenMiningRoundSummary (Optional Int)

instance GetField "summary" AmuletRules_MiningRound_StartIssuing OpenMiningRoundSummary

instance GetField "totalFeaturedAppRewardCoupons" OpenMiningRoundSummary Decimal

instance GetField "totalSvRewardWeight" OpenMiningRoundSummary Int

instance GetField "totalUnfeaturedAppRewardCoupons" OpenMiningRoundSummary Decimal

instance GetField "totalValidatorRewardCoupons" OpenMiningRoundSummary Decimal

instance SetField "optTotalValidatorFaucetCoupons" OpenMiningRoundSummary (Optional Int)

instance SetField "summary" AmuletRules_MiningRound_StartIssuing OpenMiningRoundSummary

instance SetField "totalFeaturedAppRewardCoupons" OpenMiningRoundSummary Decimal

instance SetField "totalSvRewardWeight" OpenMiningRoundSummary Int

instance SetField "totalUnfeaturedAppRewardCoupons" OpenMiningRoundSummary Decimal

instance SetField "totalValidatorRewardCoupons" OpenMiningRoundSummary Decimal

Functions

getValidatorFaucetCap

: IssuanceConfig -> Decimal

Getter with the right default value for the validator faucet cap. Use this consistently instead of accessing the field directly.

validIssuanceCurve

: Schedule RelTime IssuanceConfig -> Bool

validIssuanceConfig

: IssuanceConfig -> Bool

getTotalValidatorFaucetCoupons

: OpenMiningRoundSummary -> Int

validateOpenMiningRoundSummary

: CanAssert m => OpenMiningRoundSummary -> m ()

computeIssuingRoundParameters

: RelTime -> Decimal -> IssuanceConfig -> OpenMiningRoundSummary -> IssuingRoundParameters

computeIssuanceTranche

: Decimal -> Decimal -> Decimal -> IssuanceTranche

computeIssuanceTranche rewardsToIssue capPerCoupon totalCoupons

computes parameters that issue as many rewards per coupon as possible up to a maximum of capPerCoupon amulets.