What does gas pay for on Linea?
Gas must be paid to cover any kind of onchain computation — simplified, that means anything you do on Linea requires a machine (computer) to process it; the gas fees you must cover pay for the work those machines do.
For a ZK rollup like Linea, gas costs are driven by:
- Executing transactions on L2 (Linea), and storing their data
- Posting L2 transaction and messaging data to L1 (Ethereum Mainnet).
The cost of interacting with L1 has historically been far more costly. The main costs associated with L1 are:
- Verifying 'proofs', the complex mathematical functions that prove to L1 the validity of data about L2 activity
- Posting data about L2 transactions to L1, in 'blobs'. Blobs are groups of transaction data from L2, collected in such a way as to make it cheaper to post to L1.
Since the process of publishing data and verifying zk proofs on Ethereum mainnet is vital, we can consider the Linea gas price to cover two dimensions: the L2 execution and storage resources on Linea, and the L1 cost of guaranteeing the computational integrity of each Linea batch.