Skip to main content

Fees on Chain Network

Chain Network employs a dual-layer fee structure to optimize both execution and security.

L2 Fee

AspectDetails
Calculation Formulatransaction_gas_price = l2_base_fee + l2_priority_fee
l2_execution_fee = transaction_gas_price * l2_gas_used
Ethereum ComparisonChain Network's L2 execution fees are significantly lower than Ethereum's fee structure.

L1 Fee

AspectDetails
PurposeCover costs for publishing transactions on the Ethereum blockchain.
Base FeeSubject to short-term fluctuations, influenced by network congestion and previous block's base fee.
Priority FeeUser-set fee, advised to be kept as low as possible.

Fee Calculation

LayerCalculation Method
Layer 2 (L2)Estimate using: Gas price × Gas limit
Layer 1 (L1)Calculate using tools like GasPriceOracle.
Total Fee ComputationSum of L2 execution and L1 data/security fees.

Handling

AspectDetails
Transaction ProcessSimilar to Ethereum, with additional considerations for L2 and L1 fees.
Displaying FeesEssential to show the total of both L2 and L1 fees for accurate cost estimation.
Error PreventionManage potential 'insufficient funds' errors by accounting for both types of fees.