Next funding settles in --:--:--Same $10,000 SOXL long, one week: $54 more on MEXC than on BybitOpen Bybit →

· four exchange APIs · rebuilt daily

What are gas fees and why transaction costs vary across chains

What are gas fees and why transaction costs vary across chains

The finding

Gas fees measure total execution effort, calculated as gas units consumed multiplied by the sum of the base fee and priority fee.

A standard transfer consumes 21000 gas units while a perpetual contract call consumes 100000 units or more.

Base fees are burned by the network based on block space demand, while priority fees go to block builders.

When block space demand exceeds target limits, the base fee increases by up to 12.5% in the following block.

Understanding what are gas fees in network execution

Understanding what are gas fees requires looking at computational work rather than flat transaction charges. A gas fee pays for the raw compute and storage operations executed by network nodes.

Every operation inside the Ethereum Virtual Machine consumes a specific number of gas units. Adding two numbers costs 3 gas units. Reading a storage slot costs 2100 gas units. Writing a new value to a storage slot costs up to 20000 gas units. A standard native ETH transfer requires exactly 21000 gas units because it only updates account balances.

Perpetual trading contract calls require far more work. Depositing collateral, verifying oracle signatures, and updating leverage accounts involve multiple storage writes and cross-contract calls. A single margin adjustment consumes between 100000 and 250000 gas units. This difference in computational effort explains why a perpetual margin transfer costs five to ten times more than a simple wallet payment on the exact same network at the exact same second.

Worth knowing

Layer 2 networks use the same gas unit accounting as Layer 1, but they publish batch transaction data back to Ethereum mainnet, which introduces a secondary state data fee.

Base fee against priority fee mechanics

Under EIP-1559 execution rules, every transaction fee consists of two distinct components: the base fee and the priority fee. The total gas price per unit is the sum of these two components, measured in gwei. One gwei equals 0.000000001 ETH.

The base fee is determined algorithmically by the network based on the full usage of the preceding block. Target block size is set at 15 million gas units, with a maximum limit of 30 million gas units. If a block is 100% full at 30 million units, the base fee for the next block rises by exactly 12.5%. If a block is completely empty, the base fee decreases by 12.5%. The entire base fee amount is burned by the protocol and removed from circulation.

The priority fee is paid directly to the block builder or validator. It incentives builders to prioritize your transaction over competing transactions submitted in the same block window.

Operation TypeGas Units ConsumedGas Price (20 Base + 2 Tip)Total Cost in ETH
Native Transfer21,00022 gwei0.000462 ETH
ERC-20 Transfer65,00022 gwei0.001430 ETH
Margin Deposit120,00022 gwei0.002640 ETH
Multi-Position Liquidation350,00022 gwei0.007700 ETH

Where this goes wrong

Setting a high max fee does not mean you pay that maximum amount; the network refunds the difference between your max fee and the actual base fee plus tip.

Why transactions get stuck in the mempool

A transaction remains pending in the mempool when its max priority fee per gas is lower than the tip required by current block builders, or when its max fee per gas falls below the current block base fee.

When network activity surges, the base fee climbs rapidly block by block. If you submit a transaction with a max fee of 30 gwei while the base fee is 25 gwei, your transaction enters the pool. If the base fee rises to 32 gwei in the next block, nodes will refuse to include your transaction because your max fee cannot cover the mandatory base burn.

The transaction will sit unconfirmed until the base fee falls back below 30 gwei or until you broadcast an update. To replace a stuck transaction, you must send a new transaction with the exact same nonce value and a gas price at least 10% higher than the original request. Setting a lower nonce or an identical gas price causes nodes to reject the replacement.

Evaluating fee estimators and venue overhead

Wallet interfaces estimate gas fees by sampling recent blocks, but default settings undercharge during fast market volatility. Estimators calculate the median priority fee paid across the last 5 to 10 blocks. During sudden price moves, this backward-looking average fails to catch rapid tip inflation.

When moving capital between perpetual trading accounts and external wallets, exchange execution fees also impact net execution costs. Exchange taker fees apply on top of network gas fees when closing or opening positions on off-chain engines.

ExchangeFutures Maker FeeFutures Taker FeeSpot Maker FeeSpot Taker Fee
Bitget0.00020.00030.00100.0010
Bybit0.00020.000550.00100.0010
MEXC0.00000.00020.00000.0005
OKX0.00020.00050.00080.0010

Traders managing perpetual positions across centralized order books also pay funding rate spreads while holding open positions. Live funding rates show consistent differences across venues for identical assets:

AssetLowest Funding Venue (8h)Highest Funding Venue (8h)8h Spread24h Volume
BTCBitget (+0.0041%)Bybit (+0.0100%)0.0059%6,275,465,185
ETHOKX (+0.0066%)MEXC (+0.0100%)0.0034%4,595,759,961
SOLOKX (+0.0070%)Bybit (+0.0100%)0.0030%670,502,306
SOXLBybit (+0.0000%)MEXC (+0.0274%)0.0274%1,047,010,124

What to do instead

Set a custom priority tip based on live block utilization rather than accepting wallet auto-fill defaults during rapid market moves.

What determines the price of a gas fee on Ethereum?

A gas fee is determined by multiplying total computational units consumed by the sum of the network base fee and the miner priority tip. The base fee fluctuates automatically based on target block fullness, while the priority tip varies with user competition for immediate inclusion.

Why do smart contract interactions cost more gas than sending ETH?

Smart contract interactions cost more gas because they execute complex logic, read from state storage, and write new data across multiple accounts. A simple transfer only modifies two balance entries, consuming 21000 units, whereas smart contracts often require 100000 units or more.

What happens to a transaction when the network base fee increases?

If the network base fee increases above the maximum fee specified in your transaction, nodes put the transaction on hold in the mempool. It will remain unconfirmed until the base fee drops back down or you submit a replacement transaction with a higher fee using the same nonce.

Is the base fee refunded if a transaction fails?

The base fee and priority fee are not refunded if a transaction fails during execution. Network nodes still spend computing resources processing the instructions up to the point of failure, so the gas consumed is permanently burned and collected.

Read next

Who created bitcoin satoshi nakamoto and what the record provesSatoshi Nakamoto released the Bitcoin whitepaper on October 31, 2008, but no cryptographic…Why Brickell Miami crypto wealth grew after state tax shiftsA 0% state income tax rate saved California desks up to 13.3% in personal tax upon moving to…Why mark price vs last price liquidation triggers at different levelsYour position liquidates when mark price hits your maintenance threshold, which can deviate…