We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
gasPrice
[0 - 255]
effectiveGasPrice = Floor((signedGasPrice * (effectivePercentage + 1)) / 256)
where:
effectiveGasPRice
signedGasPrice
effectivePercentage
note that no reduction is achieved with 0xff byte. Therefore, effectiveGasPRice = signedGasPrice
0xff
effectiveGasPRice = signedGasPrice
rlp(nonce, gasprice, gaslimit, to, value, data, chainId, 0, 0) # r # s # v # effectivePercentage
16 GAS/byte * 113 bytes * L1GasPrice = 1808 GAS * 100 Gwei = 0.0001808 ether
fairGasPrice = 0.0001808 ether / 21000 = 8.6 Gwei
signedGasPrice = 15 GWei
effectiveGasPercentage
15 Gwei
8.6 Gwei
percentage = (8.6 GWei / 15 gWei) * 100 = 56.66 %
effectivePercentage = 145
effectiveGasPrice = Floor((15 gWei * (145 + 1)) / 256) = 8.55 GWei
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Effective Gas Price (EGP)
Motivation
gasPrice
(provided by the RPC) which must cover the L1 data-availability and L2 execution costsgasPrice
to cover above costsgasPrice
will be appliedSpecification
[0 - 255]
to indicate reduction in thegasPrice
by a percentageFormula
where:
effectiveGasPRice
: the gas price applied when executing the transactionsignedGasPrice
: gas price signed by the usereffectivePercentage
: percenttage index to apply that specifies the reductionTable
Examples
rlp(nonce, gasprice, gaslimit, to, value, data, chainId, 0, 0) # r # s # v # effectivePercentage
Ethereum transfer
16 GAS/byte * 113 bytes * L1GasPrice = 1808 GAS * 100 Gwei = 0.0001808 ether
fairGasPrice = 0.0001808 ether / 21000 = 8.6 Gwei
signedGasPrice = 15 GWei
effectiveGasPercentage
to reduce gasPrice applied from15 Gwei
to8.6 Gwei
percentage = (8.6 GWei / 15 gWei) * 100 = 56.66 %
effectivePercentage = 145
which correspond to a 42.97 % reductioneffectiveGasPrice = Floor((15 gWei * (145 + 1)) / 256) = 8.55 GWei
The text was updated successfully, but these errors were encountered: