Skip to content

IOST 3.0 L2 Mainnet Gas Fees

In the IOST 3.0 Layer 2 network, every transaction requires the consumption of a certain amount of Gas. Gas is the fuel that powers the execution of transactions and smart contract operations on the IOST L2 network. Each operation has a fixed Gas consumption, which is defined by the rules of the Ethereum Virtual Machine (EVM). Understanding the Gas calculation of the IOST L2 is a key part of understanding how the network operates.

What is Gas?

Gas is the unit of measurement used to quantify the computational work and storage operations in the IOST L2 network. Whenever users want to execute a transaction or smart contract, they must specify a Gas Limit and Gas Price. The Gas Limit is the maximum amount of Gas that the user is willing to pay for the computation, while the Gas Price is the amount of BNB the user is willing to pay for each unit of Gas.

Standard Gas Calculations

In the IOST L2 network, transaction fees are composed of two parts: the base fee and the priority fee, also known as a tip.

The base fee is the minimum fee that must be paid for every block and is a dynamic value that adjusts automatically based on network congestion. Each block has a target size, and the base fee increases if the previous block exceeds this target size; it decreases if the block is below the target size. This mechanism is designed to help the network regulate itself and maintain stability in transaction fees.

The priority fee is an additional fee that users are willing to pay to validators to have their transactions prioritized. When the network is congested, validators may prefer transactions with higher priority fees because it allows them to earn more revenue. Therefore, if users want their transactions to be processed quickly, they can incentivize validators by increasing the priority fee.

In Solidity smart contracts, you can access the current block's base fee using block.basefee, but there is no direct way to set the priority fee. Instead, when users or applications initiate a transaction, they need to specify maxPriorityFeePerGas (the maximum priority fee) and maxFeePerGas (the maximum fee, including both the base and priority fees) in the transaction parameters. Validators consider these parameters when selecting transactions to include in a block.

Gas Limit and Gas Price

Users need to set a Gas Limit and Gas Price when sending transactions.

Gas Limit: This is the maximum total amount of Gas that the user is willing to pay for executing the transaction or contract operation. If the transaction consumes more Gas than the Gas Limit, the transaction will fail, and the consumed Gas will not be refunded.

Gas Price: This is the price that the user is willing to pay per unit of Gas. The higher the Gas Price, the higher the priority validators will give to processing the transaction.

Estimating Gas Costs

Most EVM wallets and clients automatically estimate the Gas required for a transaction on the IOST L2 network. They usually take into account the current network congestion and the complexity of the transaction.

Gas Efficiency on IOST L2

The IOST 3.0 Layer 2 solution is designed to offer lower gas fees compared to many Layer 1 blockchains while maintaining security through its connection to BNB Chain. By batching multiple transactions and optimizing execution environments, IOST L2 can provide a more cost-effective solution for decentralized applications.

Gas and Fees

opIOST is a Layer 2 scaling solution that aims to achieve higher throughput and lower cost for transactions on the BNB Smart Chain. The cost of opIOST transactions consists of two components: the Layer 2 gas fee and the Layer 1 gas fee. The Layer 2 gas fee reflects the computational complexity of the transaction. The Layer 1 gas fee covers the expense of submitting batches of transactions to the BSC for verification and finality.

Gas price = base price + priority price

Layer 2 transaction cost = Layer 2 gas price × Layer 2 gas consumed + Layer 1 gas price × Layer 1 gas consumed.

Current Configuration

NameFloor Base PriceMinimum Priority Price
opIOST Mainnet8 wei (dynamic)1001 wei
BSC Mainnet03

What Does This Mean?

Please note the floor base price is the minimum base price opIOST can set, and according to the usage, the base price can fluctuate. For example, according to the current configuration, if the usage of a block reaches 50% of 100M gas, the base price will increase by 12.5%.

The minimum priority price is preconfigured, and users can give any priority price that is higher than this number. Usually users will get the estimate gas price by calling the API of "estimate gas price". It is a recommended gas price according to the current average gas price of history blocks.

BNB Chain aims to reduce the transaction cost to the level that enable the mass adoption, for opIOST, the target of the transfer transaction is lower than $0.001.

How opIOST Keeps Reducing the Cost of L2 Transactions

  • Enhanced Data Compression: Implementing more advanced data compression algorithms to reduce the size of L2 transaction data before submitting it to L1.

  • Efficient Transaction Batching: Optimizing how transactions are batched together to maximize space efficiency and reduce costs per transaction.

  • Data Availability Solutions: Utilizing solutions like those in BNB Greenfield for offloading some data storage from the main chain, thereby reducing data costs.

  • Zero-Knowledge Proofs: Employing zero-knowledge proofs to validate transactions without disclosing full transaction data, thus minimizing L1 data load.

  • Protocol-Level Optimizations: Making improvements at the protocol level to reduce overhead in transaction processing on L2.

Released under the MIT License.