Understanding Gas and Fees in Ethereum and OKTC Networks

·

Introduction to Gas and Fees

Blockchain transactions require computational resources to process. Both Ethereum and OKTC networks use systems called Gas and Fees to manage these resources efficiently. While these concepts share similarities, their implementations differ between networks.

Denominations and Units of Value

Blockchain networks use specific denominations to measure transaction values. OKTC employs a metric system for its native token, okt, with Wei being the smallest unit (base unit). Here's how these denominations break down:

UnitWei ValueEquivalent in Wei
wei1 wei1
Kwei (babbage)1e3 wei1,000
Mwei (lovelace)1e6 wei1,000,000
Gwei (shannon)1e9 wei1,000,000,000
microether (szabo)1e12 wei1,000,000,000,000
milliether (finney)1e15 wei1,000,000,000,000,000
okt1e18 wei1,000,000,000,000,000,000

👉 Explore blockchain transaction costs in detail

Core Concepts: Gas in Ethereum and Cosmos

Ethereum's Gas System

Cosmos SDK's Gas System

Technical Implementation in OKTC

Matching EVM Gas Consumption

OKTC bridges Ethereum compatibility with Cosmos infrastructure by:

  1. Resetting GasMeters: For EVM module operations to align with Ethereum's standards.
  2. Custom AnteHandler: Tailored for EVM transactions to verify fees accurately.

Special Cases

👉 Learn how to optimize gas usage

FAQs

Why does Ethereum use gas?

Gas ensures operations have a computational cost, preventing abuse and infinite execution loops.

Can I get a gas refund on OKTC?

Yes, but only for EVM-type transactions. Cosmos-type transactions don't support refunds.

How does OKTC handle 0-fee transactions?

Non-EVM transactions can be 0-fee if validators allow it. EVM transactions always require gas fees.

What’s the smallest unit of okt?

The base unit is Wei (1 okt = 1e18 Wei).

How is gas price determined in Cosmos?

Validators set minimum prices locally, leading to variable fee requirements across the network.