cip | title | author | discussions-to | status | type | category | created | requires | license |
---|---|---|---|---|---|---|---|---|---|
42 |
Modification to EIP-1559 |
Joshua Gutow <@trianglesphere> |
Final |
Standards Track |
Ring 0 |
2021-08-11 |
EIP-2718 Typed Transaction Envelopes - https://eips.ethereum.org/EIPS/eip-2718 |
Apache 2.0 |
This specifies modifications to EIP-1559 for Celo.
Users pay basefee + tip
with the tip
going to the validator and basefee
to the community fund (governance proxy) instead of paying gas_price
with basefee
going to the community fund and gas_price - basefee
going to validators.
This CIP specifies how EIP-1559 should be modified and implemented on Celo. In particular, the gas price minimum (also known as the basefee) should be kept the same, but the gas price should be split into max_priority_fee_per_gas
and max_fee_per_gas
and the effective gas price should be paid as specified in EIP-1559.
Celo implemented part of EIP-1559 at launch. The implementation sets a gas price minimum through smart contract logic, but continues to keep a single gas price field. Thus transactions on Celo behave like legacy Ethereum transactions post London. Implementing the basefee
and tip
system will enable users to more reliably include their transactions at a lower and more predictable price.
EIP-1559 should be implemented on Celo with the following modifications:
- The block header shall not be modified
- The
base_fee_per_gas
shall be calculated by callinggetGasPriceMinimum
to theGasPriceMinimum
smart contract. - The
basefee
orgas_price_minimum
shall be paid to the community fund (governance proxy contract) if it exists or refunded to the sender if not. - There shall be a typed transaction with the code
0x7c
that has the following format:0x7c || rlp([chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, feecurrency, gatewayfeerecipient, gatewayfee, destination, amount, data, access_list, signature_y_parity, signature_r, signature_s])
. This will be in addition to the type0x02
transaction as specified in EIP-1559.
This brings only the portions of EIP-1559 that have not been implemented to Celo. This is required to continue to maintain compatibility with Ethereum.
Legacy transactions will continue to work and will still be included in blocks.
EIP-1559 compatibility issues also apply with the exception that the Celo block header is not changing.
One EVM modification is that the GASPRICE
opcode will now refer to the effective_gas_price
(basefee+tip
) not the amount paid to the validator.
TODO
EIP-1559 has been fully implemented in go-ethereum. On Celo the basefee
is already set via the gas price minimum contract
, however this CIP has not yet been implemented.
This contains the same set of security considerations as EIP-1559. One additional consideration is that this CIP reduces the amount of fees paid to the validators.
This work is licensed under the Apache License, Version 2.0.