Skip to main content

Fees

Fees on Lisk Mainnet are, for the most part, significantly lower than on the L1 Ethereum network. The low transaction fees can be provided because Lisk is a Layer 2 optimistic rollup network.

Gas tracker

To track the current and past gas fees on Lisk, check the gas tracker for the respective network on Blockscout:

How are fees on Lisk calculated?

Every Lisk Mainnet transaction has two costs: An L2 execution fee and an L1 data fee. At a high level, the L2 fee is the cost to execute your transaction on L2 and the L1 fee is the estimated cost to publish your transaction on L1 (in a rollup batch).

transaction_fee = l2_execution_fee + l1_data_fee
note

Lisk's fee calculation is based on the fee system of OP Mainnet, using the latest Fjord upgrade. Check the Fees page in the Optmism documentation, to learn more about how the fee system works in detail.

L2 Execution Fee

The L2 Execution Fee is equal to the amount of gas used by the transaction multiplied by the gas price attached to the transaction.

l2_execution_fee = transaction_gas_price * l2_gas_used

Because Lisk Mainnet is EVM equivalent, the gas used by a transaction on Lisk Mainnet is exactly the same as the gas used by the same transaction on Ethereum. If a transaction costs 100,000 gas units on Ethereum, it will cost 100,000 gas units on Lisk Mainnet. The only difference is that the gas price on Lisk Mainnet is much lower than the gas price on Ethereum so you'll end up paying much less in ETH. This also means that the total cost of the L2 Execution Fee of a transaction can be estimated using the same tools you would use to estimate the cost of a transaction on Ethereum.

L2 Execution Fee calculation

The transaction gas price is the sum of the Base Fee and the optional additional Priority Fee.

transaction_gas_price = l2_base_fee + l2_priority_fee

Like Ethereum, Lisk Mainnet uses the EIP-1559 mechanism to set the Base Fee for transactions (although with different parameter values compared to Ethereum).

You can read more about how Ethereum's gas fees work over on Ethereum.org.

L1 Data Fee

The L1 Data Fee is the only part of the Lisk Mainnet transaction fee that differs from the Ethereum transaction fee. This fee arises from the fact that the transaction data for all Lisk Mainnet transactions is published to Ethereum. This guarantees that the transaction data is available for nodes to download and execute.

The L1 Data Fee is automatically charged for any transaction that is included in a Lisk Mainnet block. It is deducted directly from the address that sent the transaction.

The L1 Data Fee is most heavily influenced by the Ethereum base fee that is continuously and trustlessly relayed from Ethereum to Lisk Mainnet.

The actual amount of this fee depends on the following input values:

  1. The signed transaction, serialized according to the standard Ethereum transaction RLP encoding.
  2. The current Ethereum base fee and/or blob base fee (trustlessly relayed from Ethereum).
  3. Two scalar parameters that independently scale the base fee and blob base fee.

L1 Data Fee calculation

The L1 data fee is calculated according to the following formula:

l1_data_fee = estimatedSize * weighted_gas_price

Here estimatedSize is an estimation of the size that the transaction will occupy when posted in Ethereum L1 blobs. It’s calculated based on the size of the serialized transaction, using a linear regression model based on historical OP Mainnet data, assuming that it’s compressed with Brotli compression. For more details see the OP documentation or the smart contract code.

Next, the two scalars are applied to the base fee and blob base fee parameters to compute a weighted gas price multiplier.

weighted_gas_price = 16*base_fee_scalar*base_fee + blob_base_fee_scalar*blob_base_fee

The current values for the scalars are:

  • base_fee_scalar = 0.020698
  • blob_base_fee_scalar = 1.364961

They can be adjusted depending on network conditions, to mitigate spikes in the transaction fees.

note

It is currently not possible to limit the maximum L1 Data Fee that a transaction is willing to pay.

For further information about transaction fees, please check the Optimism Developer Docs > Transaction Fees

EIP-1559 Parameters

The EIP-1559 parameters used by the Lisk Mainnet differ from those used by Ethereum as follows:

ParameterLisk Mainnet valueEthereum value (for reference)
Block gas limit30,000,000 gas30,000,000 gas
Block gas target1,500,000 gas15,000,000 gas
EIP-1559 elasticity multiplier202
EIP-1559 denominator1,0008
Maximum base fee increase (per block)1.9%12.5%
Maximum base fee decrease (per block)0.1%12.5%
Block time in seconds212

How do fluctuations in gas price on Ethereum (L1) affect transaction costs on Lisk (L2)?

While the L1 Data Fee will be always cheaper compared to posting the transaction directly to the Ethereum mainnet (due to the efficient encoding in batching transactions), its value will vary depending on the amount of transactions on the L1. If the timing of your transaction is flexible, you can save cost by submitting transactions during periods when gas prices on L1 are lower than usual for example, over the weekend.

Changes after the transaction is processed on the sequencer do not affect the cost the user pays.

For an L2 transaction, the normal process is:

  1. The wallet estimates the cost of the transaction and shows it to the user.
  2. The user then submits the transaction.
  3. The sequencer processes the transaction in two phases.
    • First, it processes the transaction.
    • Then, it deducts the gas cost, based on the L1 and L2 gas prices at that time.
  4. After that, the transaction is written to L1.

In principle, between steps 1 and 3 the gas price might change. However, it can not increase by more than 12.5%, therefore the difference between the price shown to the user in step 1 and the actual one is bounded by 12.5%. After step 3, the finality of the transaction is Lisk's responsibility. If the L1 gas price spikes, Lisk pays the new cost.

In conclusion, the user will pay at most 12.5% more than expected. See the Optimism Docs > Transaction Fees for more information about transaction fees.