-
Notifications
You must be signed in to change notification settings - Fork 77
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
Update cgp-0063.md #184
Update cgp-0063.md #184
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,78 @@ | ||
--- | ||
cgp: 63 | ||
title: Increase gas price | ||
date-created: <date created on, in ISO 8601 (yyyy-mm-dd) format> | ||
author: <a list of the author's or authors' name(s) and/or username(s), or name(s) and email(s), e.g. (use with the parentheses or triangular brackets): FirstName LastName (@GitHubUsername), FirstName LastName <foo@bar.com>, FirstName (@GitHubUsername) and GitHubUsername (@GitHubUsername)> | ||
status: <DRAFT | PROPOSED | EXECUTED | EXPIRED | WITHDRAWN> | ||
discussions-to: <link to discussion on forum.celo.org> | ||
governance-proposal-id: [if submitted] | ||
date-executed: [if executed] <date created on, in ISO 8601 (yyyy-mm-dd) format> | ||
title: Increase minimum gas threshold | ||
date-created: 2022-11-21 | ||
author: Martin (@martinvol), Mathieu (@prdouct-matt) | ||
status: DRAFT | ||
discussions-to: https://forum.celo.org/t/increase-of-minimum-gas-fee/4616 | ||
governance-proposal-id: NA | ||
date-executed: NA | ||
--- | ||
## Overview | ||
|
||
CGP - Celo Governance Proposal | ||
CGP - Celo Governance Proposal 0063 | ||
|
||
Pick a four digit number subsequent to the latest PR raised and name your file that with the suffic P (for pending). | ||
Eg. if the latest PR to the CGP folder was [0034], then your PR should be [0035P]. | ||
### Definitions | ||
Let | ||
* gas_price_minimum = the minimal gas price for a given block = a function of (gas_price_minimum of last block, utilization of the last block, gas_price_minimum_(lower_bound)) | ||
* utilization of a block = (gas used in block) / (gas limit of block) | ||
* gas_price_minimum_(lower_bound) = a lower bound of the function gas_price_minimum beyond which it can never fall, even if blocks are empty | ||
* gas_price = the gas price specified by a user for a transaction | ||
* gas_used = the gas used by a transaction | ||
* base = gas of a transaction paid to community fund = gas_price_minimum * gas_used | ||
* tip = gas of a transaction paid to validators = gas_price * gas_used - base | ||
|
||
### Status | ||
- DRAFT = Feedback collection | ||
- PROPOSED = The governance proposal was submitted to the network | ||
- EXECUTED = The governance proposal was executed on the network | ||
- EXPIRED = The governance proposal expired | ||
- WITHDRAWN = The governance proposal is withdrawn before being submitted on the network | ||
### Current Situation | ||
Currently, gas pricing on Celo roughly works as follows: | ||
* Every block a gas_price_minimum is defined (accessible through the GasPriceMinimum smart contract). If the block is full (measured in gas), gas_price_minimum increases, if the block is empty, gas_price_minimum decreases (until gas_price_minimum_(lower_bound) is reached). These increases and decreases can be exponential, and thus the value of gas_price_minimum can change quickly. | ||
* In any given block, only transactions specifying a gas_price higher or equal than gas_price_minimum are valid | ||
* The gas paid by users is split between validators (tip) and the community fund (base) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and when the price is at minimum, in reality the majority goes to the community fund. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. at minimum, I believe 100% goes to community fund? I've added equations for tip and base which makes this clear. |
||
* A user only specifies gas_price, which then defines tip implicitly (whereas base is defined by the protocol every block) | ||
|
||
Describe the issue that motivates this CGP. It should indicate all parameters that are being changed and why doing so is important. | ||
Note: this means gas on Celo behaves very similarly to gas on Ethereum, with the big difference that the tip is defined implicitly through the gas_price specified by a user and gas_price_minimum specified by the protocol. | ||
|
||
Explain what benefits the enhancement this change will bring. To the extent possible, enumerate use cases affected by this CGP. | ||
Actual gas fees are currently almost always at the gas_price_minimum_(lower_bound). They only rarely spike up from that. | ||
|
||
Once the proposal is successfully proposed on chain, update this file so that the title number matches the proposal ID. | ||
### Proposal Overview | ||
We propose to increase gas_price_minimum_(lower_bound) so that a simple ERC20 transaction costs around 0.1 cents or USD 0.001. | ||
|
||
Note: | ||
* This increase only impacts the base, meaning that the validator rewards from gas remain unaltered | ||
* We are confident this increase addresses the issues we discuss under _Rationale_, while at the same time the proposed fees are so low that they should not interfere with most use of the blockchain | ||
|
||
### Rationale | ||
There are three core reasons for this proposal: | ||
1) Ecosystem cost of transactions | ||
As the creator of a transaction, the main (marginal) cost of any transaction is the gas users have to pay to get it included in the blockchain. Currently, gas prices on Celo are very low, transactions are virtually free. | ||
|
||
The cost of a transaction for the wider Celo ecosystem has additional dimensions to it than the gas spent. Namely, every transaction needs to be processed by nodes and is stored forever in the Celo blockchain. Note that the processing needs to happen by _all full nodes_ and not validators only. While it does not have an effect on the blockchain today, this will have consequences in the long term. We realized we never accounted for this scenario when gas prices were calculated and proposed. | ||
|
||
Increasing the gas price would ensure that transactions which are processed achieve a higher minimum benefit (= the gas paid), which warrants the long-term cost for the overall ecosystem. | ||
|
||
2.1) Stability and security of the network 1 | ||
Low gas prices allow actors to spam the network at virtually no cost. Currently, it would take time until the gas_price_minimum increases substantially, to stop the attack. Increasing gas_price_minimum_(lower_bound) ensures that such an attack is a lot more costly from the get go, even if it is only sustained for a short period fo time. | ||
|
||
2.2) Stability and security of the network 2 | ||
An additional benefit is that higher minimum transaction fees can be leveraged to increase the health and security of the overall blockchain by linking the network token to gas spent (e.g., through a burn mechanism - see Future Changes) and, thus, render 51% or similar attacks more difficult. | ||
|
||
### Future Changes | ||
We plan to propose to burn a substantial amount of the fees collected through gas fees by the blockchain. | ||
|
||
## Proposed Changes | ||
|
||
Fill out the following template for each transaction in the proposal | ||
|
||
1. Description of transaction 1 | ||
- Destination: A human readable description of the address and method being called | ||
- Data: A human readable description of the transaction data | ||
- Value: How much CELO is being sent, and why? | ||
1. Setting a new gas price minimum | ||
- Destination: GasPriceMinimum.setGasPriceMinimumFloor | ||
- Data: ["25,000,000,000"] | ||
product-matt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Value: 0 | ||
|
||
## Verification | ||
|
||
An explanation of how voters can verify that this CGP does what it intends to do. Can be left as “TODO” until the proposal is made. Include things like CLI commands to run and pointers to code. | ||
|
||
## Risks | ||
`$ celocli governance:view --proposalID $proposalID` | ||
|
||
Highlight any risks and concerns that may affect consensus, proof-of-stake, governance, protocol economics, the stability protocol, security, and privacy. | ||
|
||
## Useful Links | ||
|
||
* Optional section | ||
* Links to related CIPs or other documents (eg. if this is a proposal to point to a new instance of a smart contract that was updated) | ||
* Forum Post https://forum.celo.org/t/increase-of-minimum-gas-fee/4616 | ||
* Celo Docs: Gas Pricing https://docs.celo.org/protocol/transaction/gas-pricing | ||
* Chart: Gas price minimum on Celo https://datastudio.google.com/u/0/reporting/379ac465-6095-4e07-8648-7b3b3851a785/page/tEnnC/edit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really full but exceeds the density target
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding "denisty target" as word as well - was mostly to describe roughly how it works..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made the commit but cannot see the changes above, if there's a better way to respond to comments, let's discuss
511e2e4