| # | Field | Meaning (in L1) | Source | Source | Notes | Sample for Txn | Sample for Txn2 | Sample Txn3 | UserOp | Sample Txn4 | UserOp_1 | Sample Txn4 | UserOps_2 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | callGasLimit | GasLimit of the actual Exec.call inside the EP contract to used the userOp calldata | Graph | userOpInput | | 39551 | | 166271 | 57307 | 300000 | | 2 | verificationGasLimit | the maximum cost of verification step - including contract creation (initCode execution), validateUserOp and validatePaymasterUserOp (if there is a paymaster) | Graph | userOpInput | | 100000 | | 57019 | 150000 | 150000 | | 3 | preVerificationGas | covers the cost that can't be calculated on-chain: the cost of putting the entire transaction "calldata" on-chain (roughly 4 gas per zero byte, 16 byte per nonzero byte) and the static transaction overhead (21000 gas stipend, and some handleOps overhead) | Graph | userOpInput | The idea behind perVerificationGas:
So what we tried to do is make sure these are constants, by making all UserOp dependent calcs inside the "gasleft deltas". The user needs to add these values to preVG .
The entire preVerificationGas amount is paid always. | 49264 | | | 46444 | 51232 | | 4 | maxFeePerGas | Maximum Fee to be paid for the UserOp (irrespective of the EIP1559 usage) | Graph | userOpInput | | 35579741989 | | 7125033220 | 13597415618 | 13597415618 | | 5 | maxPriorityFeePerGas | If EIP1559 is used, it’s the maximum incentive for the execution layer. | Graph | userOpInput | | 54687739 | | 100000000 | 1500000000 | 1500000000 | | 6 | gasPrice | Amount of (Wei) paid per gas | Graph | Transaction Input | | 19532149368 | | | 5855574942 | 5855574942 | | 7 | gasLimit | the maximum amount of gas the transaction is authorized to consume | etherscan | TransactionInput | | 226976 | | | 732603 | 732603 | | 8 | gasUsed | Actual Gas Consumed by the txn | etherscan | TransactionReceipt | | 102924 | | | 346938 | 346938 | | 9 | baseFeePerGas | Fee burned by the network in EIP1559 | etherscan | Block | | 19483753135 | | | 5755574942 | 5755574942 | | 10 | actualGasCost | actual amount paid (by account or paymaster) for this UserOperation | Graph | UserOp Event | | 2103274083204352 | | | 818160397184746 | 1719564005679058 | | 11 | actualGasUsed | total gas used by this UserOperation (including preVerification, creation, validation and execution) | Graph | UserOp Event | | 107648 | | | 112763 | 236999 | | 12 | *gas | | etherscan | Transaction Input | | 226976 | | | 732,603 | 732,603 | | 13 | *maxFeePerGas | | etherscan | Transaction Input | | 39932523843 | | | 8265755543 | 8265755543 | | 14 | *maxPriorityFeePer Gas | | etherscan | Transaction Input | | 48396233 | | | 100000000 | 100000000 | | 15 | cumulativeGasPrice | Gas price paid in the block till the current transaction | | TransactionReceipt | | 10971345 | | | | | | 16 | *effectiveGasPrice | | etherscan | TransactionReceipt | | 19532149368 | | | 5855574942 | 5855574942 |
Txn Fee (as shown on etherscan)
= Gas Price (16) * Gas Used (8)
= 19.532149368 * 102924
= 0.002,010,326,941,552,032 ETH =
UserOp Gas Price
= actualGasCost (10) / actualGasUsed (11)
= 2,103,274,083,204,352 / 107648
= 19538440874 wei
Amount Transferred to Beneficiary (Bundler): 0**.**002103274083204352 ETH = actualGasCost (10)
UserOp Gas Price
= maxPriorityFee (5) + baseFeePerGas (9)
= 54687739 + 19483753135
= 19538440874 wei
Gas Markup:
= UserOpGasPrice ( 5+9)/TxnGasPrice (16) = 19538440874/ 19532149368
1.0003221102748 = 0.032211%
Txn Fee (as shown on etherscan)
= Gas Price (16) * Gas Used (8)
= 5855574942 * 346938
= 0.002,031,521,459,227,596 ETH
UserOp Gas Price
UserOp Gas Price
= actualGasCost (10) / actualGasUsed (11)
=
= 7,255,574,942 wei
Amount Transferred to Beneficiary (Bundler): 0**.**002537724402863804 ETH
= ActualGasCost_1 + ActualGasCost_2
= 818160397184746 + 1719564005679058
Total Txn MarkUp:
= Amount Transferred to Bundler/Txn Fee Paid
= 2537724402863804/2031521459227596
= 1.249174303
UserOp Gas Price
UserOp Gas Price
= maxPriorityFee (5) + baseFeePerGas (9)
= 1500000000 + 5755574942
= 7,255,574,942 wei
Gas Markup:
= UserOpGasPrice ( 5+9)/TxnGasPrice (16)
= 7,255,574,942 / 5855574942
= 1.2390883925 = 23.9088%
Total Gas Units based on UserOpEvent Logs:
Actual Gas Units By Txn:
346938
= 112763+236990
= 349,753
Txn Fee (as shown on etherscan)
= Gas Price (16) * Gas Used (8)
= 5855574942 * 346938
= 0.002,031,521,459,227,596 ETH