Files
zeekay ede37547f6 refactor(platformvm): consolidate block code, drop atomic_block, add v0 lift
- Drop atomic_block.go + legacy *_block_test.go (consolidated)
- Add block/v0/ subdir + lift_v0.go for old version handling
- Copyright header: 'Lux Industries, Inc.' → 'Lux Industries Inc' (no comma)
- block_adapter.go: new adapter layer
2026-06-01 15:22:27 -07:00

35 lines
1.1 KiB
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package reward
import (
"math/big"
"time"
)
// PercentDenominator is the denominator used to calculate percentages
const PercentDenominator = 1_000_000
// consumptionRateDenominator is the magnitude offset used to emulate
// floating point fractions.
var consumptionRateDenominator = new(big.Int).SetUint64(PercentDenominator)
type Config struct {
// MaxConsumptionRate is the rate to allocate funds if the validator's stake
// duration is equal to [MintingPeriod]
MaxConsumptionRate uint64 `json:"maxConsumptionRate"`
// MinConsumptionRate is the rate to allocate funds if the validator's stake
// duration is 0.
MinConsumptionRate uint64 `json:"minConsumptionRate"`
// MintingPeriod is period that the staking calculator runs on. It is
// not valid for a validator's stake duration to be larger than this.
MintingPeriod time.Duration `json:"mintingPeriod"`
// SupplyCap is the target value that the reward calculation should be
// asymptotic to.
SupplyCap uint64 `json:"supplyCap"`
}