Gas and Fee Mechanism
Fee Overview
Gate Layer uses the Fjord release of OP-Stack and posts all L2 transaction data to GateChain via EIP-4844 blobs
(not using calldata
or external DA). The total fee for a transaction is the sum of three components:
L2 Execution Fee
- Based on the EIP-1559 model, reflecting the computational resources consumed for executing the transaction on Gate Layer.
L1 Data Fee
- The cost required to post transaction data to GateChain
blobs
. This fee is proportional to the size of the transaction data and the current Blob Base Fee on GateChain.
- The cost required to post transaction data to GateChain
Operator Fee
- A configurable fee, either linear with gas used or constant, intended to cover the operational costs of the chain (not applied to deposit transactions).
Fee Formulas
The total fee (totalFee
) for a transaction is calculated as follows:
The components are calculated as follows:
L2 Execution Fee:
This is a standard EIP-1559 model where
gasUsed
is the gas consumed by the transaction,baseFee
is the L2 network's base fee, andpriorityFee
is an optional tip for the sequencer.L1 Data Fee:
Operator Fee:
Fee Component Breakdown
L2 Execution Fee
The execution fee model is identical to what you would pay for the same transaction on Ethereum or GateChain. Because Gate Layer is EVM-equivalent, the gasUsed
for a transaction on Gate Layer is exactly the same as it would be on Ethereum.
The core difference is the Gas Price. The gas price on Gate Layer is significantly lower than on Ethereum, so even with the same gas usage, the final fee in USD is much cheaper.
L1 Data Fee
Gate Layer integrates the FastLZ compression estimator from the Fjord upgrade, which allows for a more accurate calculation of the L1 data fee for each transaction.
The calculation process is as follows:
Estimate the compressed transaction size:
fastlzSize
: The actual size of the transaction after FastLZ compression post-signing.intercept
andfastlzCoef
: Model parameters inherited from the OP-Stack.
Calculate the weighted gas price multiplier:
l1BaseFee
: The current base fee of GateChain (L1).l1BlobBaseFee
: The current blob base fee of GateChain (L1).baseFeeScalar
andblobFeeScalar
: Chain configuration parameters used to adjust the fee.
Current Gate Layer Parameters:
baseFeeScalar
:113016
blobFeeScalar
:801949
Calculate the final L1 data fee: The results from the first two steps are multiplied and scaled to get the final
l1DataFee
.
Operator Fee
This fee provides an additional revenue model for the chain operator to cover specific operational costs.
- Deposit transactions are exempt from the operator fee.
- The fee is determined by two operator-configurable parameters:
operatorFeeScalar
andoperatorFeeConstant
.
Current Gate Layer Parameters:
operatorFeeScalar
:0
operatorFeeConstant
:0
This means that Gate Layer currently does not charge any operator fees.