If you’re using Scroll, it’s essential to grasp the transaction fees associated with this blockchain. Here’s a breakdown:

Overview of Scroll Fees:

  • Scroll fees are generally lower compared to its supporting layer.
  • For users and developers, Scroll fees can resemble Ethereum mainnet fees.
  • The fee displayed in the wallet may not be comprehensive unless the software accounts for Scroll’s fee calculations.

L2 and L1 Fees:

  • L2 fee: The cost of executing transactions on the L2 sequencer.
  • L1 fee: Covers data sending to L1 for availability, calculated based on transaction size.
  • Total transaction fee (l2Fee + l1Fee) is denominated in ETH, the native gas token for Scroll.

Where Transaction Fees Go:

  • All fees are collected into the L2ScrollFeeVault contract balance.
  • The block producer does not receive direct rewards; the COINBASE opcode returns the fee vault address.

Calculating Execution Fee (L2 Fee):

  • L2 execution fee = gas_used * gas_price.
  • Users set the gas price; gas used is estimated using a Scroll node’s estimateGas endpoint.

Estimating L1 Data Fee:

  • Each transaction’s calldata must be committed to Ethereum, incurring an additional “L1 Fee.”
  • Pre-deployed L1GasPriceOracle estimates the L1 data fee for transaction raw data.

Handling L1 Gas Price Changes:

  • Once the sequencer processes a transaction, the user’s L1 fee is locked in.
  • Scroll’s short block times mitigate the impact of L1 gas changes between submission and block inclusion.

Future Roadmap:

  • Current proof generation is completed and subsidized by Scroll and proving partners.
  • As the prover network decentralizes, incentives for proof generation will integrate into the protocol.

 

Understanding Scroll transaction fees is crucial for optimizing transactions effectively. For detailed insights, refer to the complete guide on Scroll Gas Fees.