Builders Guide
Application Development
Transactions
Transaction Fees

Transaction Fees on GOAT Network

⚠️

This documentation refers to Testnet3. Fee structures may be adjusted for mainnet launch.

Overview

GOAT Network implements a gas-efficient fee structure that leverages EIP-1559 (opens in a new tab) for optimized token operations while ensuring secure settlement on Bitcoin.

Detailed Fee Structure

Key Differences of the Fee Structure on GOAT Network

  • Gas Price: The base fee per unit of gas, determined by the network, expressed in Wei. Everything on the network is still denoted in Bitcoin, since the gas is BTC.
  • Priority Fee (Tip): The additional amount you pay to incentivize miners to include your transaction. The minimal priority fee on GOAT Network is 100,000 Wei.
  • No blob fee: GOAT Network doesn't support EIP-4844, so the blob fee would be zero.
  • No burned Fees: Since GOAT uses BTC as the gas token and all the BTC is bridged from Bitcoin, the Burned Fees are included in the total transaction fee to incentivize miners for block generation.

Calculating Total Fee

Total Transaction Fee = Gas Used * min(Max Fee, Base Fee + ProrityFee)

  • Gas Used: The actual amount of gas consumed during transaction execution.
  • Priority Fee: The minimal priority fee on GOAT Network is 100,000 Wei.
  • Max Fee: Maximum fee the user is willing to pay (must be ≥ Base Fee + Priority Fee).

Note: For transactions involving batch operations, gas usage is significantly reduced per operation.

Fee Distribution

The total transaction fee is distributed to miners and GOAT Foundation.

  • Miner: The 98% of the total transaction fee is distributed to the miners as a reward. A miner shares the rewards by the ratio of its voting powder to total voting powder of all miners.
  • GOAT Foundation: The 2% of the fee is distributed to GOAT Foundation for network development and maintainance.

Common Pitfalls and How to Avoid Them

  1. Not Understanding EIP-1559 Fee Mechanics:

    • Impact: Transactions may be priced inefficiently or fail due to incorrect fee estimation.
    • Solution: Familiarize yourself with EIP-1559's base fee and priority fee mechanics used by sequencer nodes.
  2. Insufficient Fee Buffer:

    • Impact: Transactions may fail if gas estimates are too tight.
    • Solution: Add a percentage (5-20%) buffer to gas estimates to account for network fluctuations.
  3. Not Monitoring Network Congestion:

    • Impact: Higher fees during periods of network congestion.
    • Solution: Monitor Layer 2 network activity and consider timing non-urgent transactions during lower congestion periods.
  4. Not Utilizing Batch Operations:

    • Impact: Paying higher fees for multiple individual transactions.
    • Solution: Use EIP-1559 batch operations to reduce overall gas costs when performing multiple similar operations.

Fee Optimization Strategies

  1. Use Batch Operations:

    • Benefit: Reduces per-operation gas cost significantly.
    • How: Combine multiple token transfers or actions into a single transaction using EIP-1559's batch functions.
  2. Monitor Bitcoin Network Conditions:

    • Benefit: Optimize for lower L1 fees.
    • How: Schedule transactions during periods of lower Bitcoin network fees. Utilize fee estimation tools.
  3. Optimize Smart Contracts:

    • Benefit: Minimizes gas consumption.
    • How: Use efficient data structures, minimize state changes, and avoid unnecessary computations within contracts.
  4. Implement Dynamic Fee Adjustment:

    • Benefit: Balances cost and transaction speed.
    • How: Adjust gas prices dynamically based on current network conditions within your application's logic.
  5. Cache Fee Estimates:

    • Benefit: Improves performance and user experience.
    • How: For applications with similar transactions, cache gas estimates and update them periodically.

Current Network Stats

  • Average Gas Price: Variable depending on network conditions.
  • Network Utilization: Monitor via the explorer.
  • Average Block Time: Approximately 3.5 seconds on Testnet3.

For real-time network statistics, visit the GOAT Network Explorer (opens in a new tab).