Documentation/Gas Fees
Getting Started • Understanding Costs

Understanding Gas Fees

Learn how gas fees work on Tetreum Testnet and how to optimize your transaction costs.

What is Gas?

Gas is the unit that measures the computational effort required to execute operations on the Tetreum Test network.

Key Concepts:

  • Gas Limit: Maximum gas you're willing to spend
  • Gas Price: Amount you pay per unit of gas (in TET)
  • Gas Used: Actual gas consumed by the transaction
  • Transaction Fee: Gas Used × Gas Price
Gas Calculation

Transaction fees are calculated using this formula:

Transaction Fee = Gas Used × Gas Price

Example: Simple Transfer

  • Gas Limit: 21,000
  • Gas Price: 20 Gwei
  • Gas Used: 21,000
  • Fee: 0.00042 TET

Example: Contract Call

  • Gas Limit: 150,000
  • Gas Price: 25 Gwei
  • Gas Used: 120,000
  • Fee: 0.003 TET
Optimizing Gas Costs

Follow these best practices to minimize gas fees:

1. Choose Optimal Gas Price

Monitor network congestion and adjust gas price accordingly. Higher gas price = faster confirmation.

2. Batch Transactions

Combine multiple operations into a single transaction when possible to save on base transaction costs.

3. Time Your Transactions

Execute transactions during off-peak hours when network congestion is lower.

4. Optimize Smart Contracts

Write efficient code, use appropriate data types, and minimize storage operations.

Common Gas Limits

Typical gas limits for common operations:

OperationGas LimitTypical Cost (20 Gwei)
TET Transfer21,0000.00042 TET
Token Transfer (ERC-20)65,0000.0013 TET
Token Approval45,0000.0009 TET
Swap (DEX)150,0000.003 TET
Contract Deployment1,000,000+0.02+ TET

Ready to Save on Gas?

Apply these optimization techniques to reduce your transaction costs on Tetreum.