tx.gasPrice * l2GasUsed(up to
tx.gasLimit). The L2 gas price will vary depending on network congestion.
l1GasPrice * l1GasUsed. This is the cost of storing the transaction's data on L1.
l1GasPriceis the same as the normal gas price in L1 Ethereum
l1GasUsedis calculated as
1.5*(2750 gas + calldataGas). Thus, more calldata your transaction includes, the more expensive your L1 fee will be. For example, an ETH transfer has no calldata, so it will have the cheapest L1 fee, whereas large contract deployments can have over 25kb of calldata and will result in a high L1 fee. We currently add a 50% overhead to the L1 fee to ensure the fee paid covers the actual L1 costs.