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

[Task (gas-price-modulation-tf)] Implement a fixed protocol-based gas price #3122

Open
vekkiokonio opened this issue Oct 8, 2024 · 2 comments · May be fixed by #3517
Open

[Task (gas-price-modulation-tf)] Implement a fixed protocol-based gas price #3122

vekkiokonio opened this issue Oct 8, 2024 · 2 comments · May be fixed by #3517
Assignees
Labels
research tokenomics Issues related to tokenomics and gas price modulation

Comments

@vekkiokonio
Copy link
Contributor

vekkiokonio commented Oct 8, 2024

Move from the validators’ guide price through gas price surveys to the implementation of a fixed gas price. This requires a restructure of the flow of payments. This fixed posted-price does not adapt based on congestion metrics of any kind, and any increase in demand would be handled by the FPA component of the TFM.

@vekkiokonio vekkiokonio added research tokenomics Issues related to tokenomics and gas price modulation labels Oct 8, 2024
@vekkiokonio
Copy link
Contributor Author

The required changes to address this issue are:

  1. Introduce a protocol parameter BaseGasPrice with units of Nanos per computation unit. This parameter should be available to all actors required to check the validity of a transaction.
  2. Introduce a validity check for all transactions that the specified gas_price field is greater than or equal to BaseGasPrice, else the transaction should be deemed invalid.
  3. In the SDK and any user-facing application for transaction creation, the gas_price field should default to BaseGasPrice and users should be warned if they set their gas price any lower that their transaction will be invalid.
  4. The advance_epoch function should be updated to handle the new distribution of fees.
  • The total fees from the epoch, denoted computation_rewards is already provided in units of Nanos.
  • A variable called computation_units containing the total number of computation units from all transactions in the epoch should also be passed to advance_epoch.
  • The match_computation_reward_to_target_reward function should be modified so that:
If validator_target_rewards > computation_units*BaseGasPrice
    Mint validator_target_rewards - computation_units*BaseGasPrice
Else 
    Burn computation_units*BaseGasPrice - validator_target_rewards
Then validator_target_rewards + [computation_rewards - 
    computation_units*BaseGasPrice] goes to the validators as rewards.

Note that no change is required to the prioritization rules applied by validators for sequencing, and with this change, the existing priority rules (highest gas_price first) are properly incentivised because higher gas_price actually means higher rewards for validators.

@vekkiokonio
Copy link
Contributor Author

Working on the topic in #3517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research tokenomics Issues related to tokenomics and gas price modulation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants