logoDeveloper Hub

Parameters

Learn about the different parameters of Elastic Avalanche L1s.

Avalanche Permissioned Avalanche L1s can be turned into Elastic Avalanche L1s via the TransformSubnetTx transaction. TransformSubnetTx specifies a set of structural parameters for the Elastic Avalanche L1.

This reference document describes these structural parameters and illustrates the constraints they must satisfy.

Elastic Avalanche L1 Parameters

Subnet

Subnet has type ids.ID and it's the Avalanche L1 ID (SubnetID). Subnet is the ID of the CreateSubnetTx transaction that created the Avalanche L1 in the first place. The following constraints apply:

  • Subnet must be different from PrimaryNetworkID.

AssetID

AssetID has type ids.ID and it's the ID of the asset to use when staking on the Avalanche L1. The following constraints apply:

  • AssetID must not be the Empty ID.
  • AssetID must not be AVAX ID, the Primary Network asset.

InitialSupply

InitialSupply has type uint64 and it's the initial amount of AssetID transferred in the Elastic Avalanche L1 upon its transformation. Such amount is available for distributing staking rewards. The following constraints apply:

  • InitialSupply must be larger than zero.

MaximumSupply

MaximumSupply has type uint64 and it's the maximum amount of AssetID that Avalanche L1 has available for staking and rewards at any time. The following constraints apply:

  • MaximumSupply must be larger or equal to InitialSupply.

an Avalanche L1 supply can vary in time but it should be no larger than the configured maximum at any point in time, including at Avalanche L1 creation.

MinConsumptionRate

MinConsumptionRate has type uint64 and it's the minimal rate a validator can earn if the UptimeRequirement is satisfied. If StakingPeriod == MinStakeDuration, the validator will earn the MinConsumptionRate.

You can find more details about it in the Reward Formula section. The following constraints apply:

  • MinConsumptionRate must be smaller or equal to PercentDenominator.

See Notes on Percentages section to understand PercentDenominator role.

MaxConsumptionRate

MaxConsumptionRate has type uint64 and it's the maximal rate a validator can earn if the UptimeRequirement is satisfied. If StakingPeriod == MaxStakeDuration == MintingPeriod, the validator will earn the MaxConsumptionRate.

You can find more details about it in the Reward Formula section. The following constraints apply:

  • MaxConsumptionRate must be larger or equal to MinConsumptionRate.
  • MaxConsumptionRate must be smaller or equal to PercentDenominator.

See Notes on Percentages section to understand PercentDenominator role.

MinValidatorStake

MinValidatorStake has type uint64 and it's the minimum amount of funds required to become a validator. The following constraints apply:

  • MinValidatorStake must be larger than zero
  • MinValidatorStake must be smaller or equal to InitialSupply

MaxValidatorStake

MaxValidatorStake has type uint64 and it's the maximum amount of funds a single validator can be allocated, including delegated funds. The following constraints apply:

  • MaxValidatorStake must be larger or equal to MinValidatorStake
  • MaxValidatorStake must be smaller or equal to MaximumSupply

MinStakeDuration

MinStakeDuration has type uint32 and it's the minimum number of seconds a staker can stake for. The following constraints apply:

  • MinStakeDuration must be larger than zero.

MaxStakeDuration

MaxStakeDuration has type uint32 and it's the maximum number of seconds a staker can stake for. The following constraints apply:

  • MaxStakeDuration must be larger or equal to MinStakeDuration.
  • MaxStakeDuration must be smaller or equal to GlobalMaxStakeDuration.

GlobalMaxStakeDuration is defined in genesis and applies to both the Primary Network and all Avalanche L1s.

Its Mainnet value is 365×24×time.Hour365 \times 24 \times time.Hour.

MinDelegationFee

MinDelegationFee has type uint32 and it's the minimum fee rate a delegator must pay to its validator for delegating. MinDelegationFee is a percentage; the actual fee is calculated multiplying the fee rate for the delegator reward. The following constraints apply:

  • MinDelegationFee must be smaller or equal to PercentDenominator.

The MinDelegationFee rate applies to Primary Network as well. Its Mainnet value is 2%2\%.

MinDelegatorStake

MinDelegatorStake has type uint64 and it's the minimum amount of funds required to become a delegator. The following constraints apply:

  • MinDelegatorStake must be larger than zero.

MaxValidatorWeightFactor

MaxValidatorWeightFactor has type uint8 and it's the factor which calculates the maximum amount of delegation a validator can receive. A value of 1 effectively disables delegation. You can find more details about it in the Delegators Weight Checks section. The following constraints apply:

  • MaxValidatorWeightFactor must be larger than zero.

UptimeRequirement

UptimeRequirement has type uint32 and it's the minimum percentage of its staking time that a validator must be online and responsive for to receive a reward. The following constraints apply:

  • UptimeRequirement must be smaller or equal PercentDenominator.

See Notes on Percentages section to understand PercentDenominator role.

Reward Formula

Consider an Elastic Avalanche L1 validator which stakes a StakeStake amount AssetID for StakingPeriodStakingPeriod seconds.

Assume that at the start of the staking period there is a SupplySupply amount of AssetID in the Avalanche L1. The maximum amount of Avalanche L1 asset is MaximumSupplyMaximumSupply AssetID.

Then at the end of its staking period, a responsive Elastic Avalanche L1 validator receives a reward calculated as follows:

Reward=(MaximumSupplySupply)×StakeSupply×StakingPeriodMintingPeriod×EffectiveConsumptionRateReward = \left(MaximumSupply - Supply \right) \times \frac{Stake}{Supply} \times \frac{Staking Period}{Minting Period} \times EffectiveConsumptionRate

where,

MaximumSupplySupply=the number of tokens left to emit in the avalanche-l1MaximumSupply - Supply = \text{the number of tokens left to emit in the avalanche-l1} StakeSupply=the individual’s stake as a percentage of all available tokens in the network\frac{Stake}{Supply} = \text{the individual's stake as a percentage of all available tokens in the network} StakingPeriodMintingPeriod=time tokens are locked up divided by the MintingPeriod\frac{StakingPeriod}{MintingPeriod} = \text{time tokens are locked up divided by the $MintingPeriod$} MintingPeriod is one year as configured by the Primary Network).\text{$MintingPeriod$ is one year as configured by the Primary Network).} EffectiveConsumptionRate=EffectiveConsumptionRate = MinConsumptionRatePercentDenominator×(1StakingPeriodMintingPeriod)+MaxConsumptionRatePercentDenominator×StakingPeriodMintingPeriod\frac{MinConsumptionRate}{PercentDenominator} \times \left(1- \frac{Staking Period}{Minting Period}\right) + \frac{MaxConsumptionRate}{PercentDenominator} \times \frac{Staking Period}{Minting Period}

Note that StakingPeriodStakingPeriod is the staker's entire staking period, not just the staker's uptime, that is the aggregated time during which the staker has been responsive. The uptime comes into play only to decide whether a staker should be rewarded; to calculate the actual reward only the staking period duration is taken into account.

EffectiveConsumptionRateEffectiveConsumptionRate is the rate at which the validator is rewarded based on StakingPeriodStakingPeriod selection.

MinConsumptionRateMinConsumptionRate and MaxConsumptionRateMaxConsumptionRate bound EffectiveConsumptionRateEffectiveConsumptionRate:

MinConsumptionRateEffectiveConsumptionRateMaxConsumptionRateMinConsumptionRate \leq EffectiveConsumptionRate \leq MaxConsumptionRate

The larger StakingPeriodStakingPeriod is, the closer EffectiveConsumptionRateEffectiveConsumptionRate is to MaxConsumptionRateMaxConsumptionRate. The smaller StakingPeriodStakingPeriod is, the closer EffectiveConsumptionRateEffectiveConsumptionRate is to MinConsumptionRateMinConsumptionRate.

A staker achieves the maximum reward for its stake if StakingPeriodStakingPeriod = MintingPeriodMinting Period. The reward is:

MaxReward=(MaximumSupplySupply)×StakeSupply×MaxConsumptionRatePercentDenominatorMax Reward = \left(MaximumSupply - Supply \right) \times \frac{Stake}{Supply} \times \frac{MaxConsumptionRate}{PercentDenominator}

Note that this formula is the same as the reward formula at the top of this section because EffectiveConsumptionRateEffectiveConsumptionRate = MaxConsumptionRateMaxConsumptionRate.

The reward formula above is used in the Primary Network to calculate stakers reward. For reference, you can find Primary network parameters in the section below.

Delegators Weight Checks

There are bounds set of the maximum amount of delegators' stake that a validator can receive.

The maximum weight MaxWeightMaxWeight a validator ValidatorValidator can have is:

MaxWeight=min(Validator.Weight×MaxValidatorWeightFactor,MaxValidatorStake)MaxWeight = \min(Validator.Weight \times MaxValidatorWeightFactor, MaxValidatorStake)

where MaxValidatorWeightFactorMaxValidatorWeightFactor and MaxValidatorStakeMaxValidatorStake are the Elastic Avalanche L1 Parameters described above.

A delegator won't be added to a validator if the combination of their weights and all other validator's delegators' weight is larger than MaxWeightMaxWeight. Note that this must be true at any point in time.

Note that setting MaxValidatorWeightFactorMaxValidatorWeightFactor to 1 disables delegation since the MaxWeight=Validator.WeightMaxWeight = Validator.Weight.

Notes on Percentages

PercentDenominator = 1_000_000 is the denominator used to calculate percentages.

It allows you to specify percentages up to 4 digital positions. To denominate your percentage in PercentDenominator just multiply it by 10_000. For example:

  • 100% corresponds to 100 * 10_000 = 1_000_000
  • 1% corresponds to 1* 10_000 = 10_000
  • 0.02% corresponds to 0.002 * 10_000 = 200
  • 0.0007% corresponds to 0.0007 * 10_000 = 7

Primary Network Parameters on Mainnet

An Elastic Avalanche L1 is free to pick any parameters affecting rewards, within the constraints specified above. For reference we list below Primary Network parameters on Mainnet:

  • AssetID = Avax
  • InitialSupply = 240_000_000 Avax
  • MaximumSupply = 720_000_000 Avax.
  • MinConsumptionRate = 0.10 * reward.PercentDenominator.
  • MaxConsumptionRate = 0.12 * reward.PercentDenominator.
  • Minting Period = 365 * 24 * time.Hour.
  • MinValidatorStake = 2_000 Avax.
  • MaxValidatorStake = 3_000_000 Avax.
  • MinStakeDuration = 2 * 7 * 24 * time.Hour.
  • MaxStakeDuration = 365 * 24 * time.Hour.
  • MinDelegationFee = 20000, that is 2%.
  • MinDelegatorStake = 25 Avax.
  • MaxValidatorWeightFactor = 5. This is a platformVM parameter rather than a genesis one, so it's shared across networks.
  • UptimeRequirement = 0.8, that is 80%.

Interactive Graph

The graph below demonstrates the reward as a function of the length of time staked. The x-axis depicts StakingPeriodMintingPeriod\frac{StakingPeriod}{MintingPeriod} as a percentage while the y-axis depicts RewardReward as a percentage of MaximumSupplySupplyMaximumSupply - Supply, the amount of tokens left to be emitted.

Graph variables correspond to those defined above:

  • h (high) = MaxConsumptionRateMaxConsumptionRate
  • l (low) = MinConsumptionRateMinConsumptionRate
  • s = StakeSupply\frac{Stake}{Supply}

Last updated on

On this page

Edit on Github