Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.7.1804 Inflation-Based Staking #11

Merged
merged 8 commits into from May 23, 2023
Merged

v1.7.1804 Inflation-Based Staking #11

merged 8 commits into from May 23, 2023

Conversation

sprwn
Copy link
Contributor

@sprwn sprwn commented May 22, 2023

The added function

func (e *ProposalTxExecutor) getCurrentInflationSettings(currentTimestamp time.Time) (uint64, uint64, uint64, uint32, time.Duration, time.Duration, time.Duration, time.Time)
takes the current timestamp of the P-chain, and returns parameters:

  • minValidatorStake: the minimum stake that a validator can have on the network. uint64
  • maxValidatorStake: the maximum stake that a validator can have on the network. uint64
  • minDelegatorStake: the minimum stake that a delegator can delegate to a validator. uint64
  • minDelegationFee: the minimum delegation fee percentage that is paid from the validator to the delegator. This will be set to zero in practice because rewards are disabled on the P-chain. uint32
  • minStakeDuration: the minimum length of time that a validator can be staked on the network. time.Duration
  • maxStakeDuration: the maximum length of time that a validator can be staked on the network. time.Duration
  • minFutureStartTimeOffset: the time delay between when a staking transaction is made and when a validator can become active. time.Duration
  • minStakeStartTime: the earliest date that a validator can set for their staking period to begin. time.Time

This enables a way to have future hard forks that change these parameters over time as more inflation has occurred on the network. Avalanche staking was originally designed for a capped supply asset, so this added function enables the same staking mechanism to be used with an uncapped supply asset.

@sprwn sprwn requested a review from JoshuaGEdwards May 23, 2023 15:08
@JoshuaGEdwards JoshuaGEdwards merged commit 4c99e8f into flare-foundation:main May 23, 2023
JoshuaGEdwards added a commit that referenced this pull request May 23, 2023
* main:
  v1.7.1804 Inflation-Based Staking (#11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants