Fee Schedule

Table of Contents

Fee Schedule

The fee schedule is separated into fees for sequencer-included transactions and fees for L1-initiated transactions.

Sequencer-Included Transactions

The fee for transactions sent to the sequencer is comprised of two parts, an execution fee and a data fee. Fees from transactions sent to (and included by) the sequencer are funded from the L2 and collected by the sequencer. The execution fee is denominated in gas, which users bid on on a per unit basis. The gas cost by transaction type is listed below.

Transaction TypeGas Cost ConstantGas
KeystoreTxType.WITHDRAWWITHDRAW_GAS100_000
KeystoreTxType.UPDATEUPDATE_GAS100_000

The data fee is dynamically calculated using the following function:

function getDataFee(
    bytes memory transaction,
    uint256 l1Origin,
    uint256 l1BaseFeeScalar,
    uint256 l1BlobBaseFeeScalar,
    bool isL1Initiated
) returns (uint256) {
    if (isL1Initiated) return 0;

    return transaction.length *
      (16 * l1Origin.readL1BaseFee() * l1BaseFeeScalar
      + l1Origin.readL1BlobBaseFee() * l1BlobBaseFeeScalar)
      / 1e6;
}
  • transaction is the serialized transaction envelope specified in Keystore Transactions
  • l1Origin is the sequencer-assigned L1 origin of the batch in which the tx was executed.
    • The baseFee and blobBaseFee are the values from the L1 origin block. How this is enforced depends on the execution context.
      • For derivation purposes, the rollup node is expected to maintain an index of baseFee and blobBaseFee values on a per-block basis.
      • For ZK verification, these values are proven using SSZ Merkle proofs against the beaconBlockRoot.
  • l1BaseFeeScalar and l1BlobBaseFeeScalar are scalars applied to the L1 base fee and L1 blob base fee respectively
    • The scalar values allow the sequencer to adjust the proportion of DA costs allocated to calldata versus blobs.
    • Both values are interpreted as fixed-point decimals with 6 decimal places.

Estimation for data fees is also performed using the above function. Note that there may be divergence between actual fees charged and estimates based upon differences in L1 origin between the estimate and actual L1 inclusion of the batch.

Note that the data fee is charged automatically. Currently, it is not possible to limit the maximum data fee that a transaction is willing to pay.

L1-Initiated Transactions

The fee schedule for L1-initiated transactions is:

Transaction TypeGas Cost ConstantValue
KeystoreTxType.DEPOSITDEPOSIT_L1_COST0.001 ether
KeystoreTxType.WITHDRAWWITHDRAW_L1_COST0.005 ether
KeystoreTxType.UPDATEUPDATE_L1_COST0.005 ether

Transaction fees from L1-initiated transactions are paid on the bridge and directed towards the prover.

Unlike most rollups, depositing onto L2 is not free. This is a consequence of automatic inclusion imposing a workload on the prover. Under normal operations, the sequencer is responsible for paying the prover1. However, when the sequencer is bypassed via an L1-initiated transaction, that burden is shifted to the user.

These fees should not affect most users, since we expect users to primarily transact via native account abstraction. Deposits are primarily anticipated to be utilized by the actors powering native account abstraction (sponsors) whose operational designs generally revolve around the existence of a small cost for deposits to pay L1 gas fees in any case.

1

Currently, the sequencer and prover are both run by the same entity, and the protocol does not provide for provers to receive payments from the sequencer. However, the protocol is designed to enable such payments in the future.

Native Account Abstraction

All Update transactions can have fees either paid for by the user or sponsored by a sponsor account.