BlockDAG Docs
  • 🎯Introduction to BlockDAG
  • ⭐GETTING STARTED
    • What is BDAG?
    • Introductory Concepts
      • Decentralized Application (dApps)
      • Accounts
        • EVM Account
        • UTXO Account
      • Transactions
      • Blocks
      • EVM
        • Opcodes
      • Gas Fees
    • Nodes and Mining
      • Testnet Node Setup
    • BlockDAG Architecture
      • Architecture Overview
      • Core Modules and Components
      • Development and Implementation
      • Blockchain Features
      • Consensus Algorithm
  • TEST/MAIN NETWORKS
    • Testnet Alpha
    • Testnet Beta 1: Primordial
      • Network Details
  • BlockDAG Tools
    • Block Explorer
    • Faucet
    • Smart Contract IDE
      • IDE Layout
      • How to create and deploy
    • Contracts Wizard
  • BlockDAG Client APIs
    • EVM RPC
    • WebSocket
  • BlockDAG dApps
    • Create dApps
    • dApps Overview
    • Reflection User Guide
      • Home
      • Reflection Dashboard
      • Reflection
    • Lottery User Guide
      • Lottery Dashboard
      • Lottery
      • Participants
  • Block Explorer
    • EVM
      • Home
      • Block List
        • Block Detail
      • Transaction List
        • Transaction Detail
      • Address Details
      • Contract Listing
        • Contract Details
          • Transfer Tab
          • Holders Tab
          • Events Tab
          • Info Tab
          • Contract Tab
            • Code Tab
            • Read Tab
            • Write Tab
        • Contract Owner
        • Contract Verification
        • Contract Transaction Details
      • Tokens List
        • Token Detail
          • Transfer Tab
            • Transfer Detail Tab (Overview)
            • Transfer Detail (Logs)
          • Holders Tab
            • Holders Detail
          • Events Tab
          • Info Tab
          • Contracts Tab
        • Token Transfer
      • Node Visualizer
      • Faucet
    • UTXO
      • UTXO Home
      • Block List (UTXO)
        • Block Details (UTXO)
      • Transaction List (UTXO)
        • Transaction Details (UTXO)
      • Address Details (UTXO)
Powered by GitBook

Copyright © BlockDAG

On this page
  • Prerequisites
  • What is gas?
  • How are gas fees calculated?

Was this helpful?

Edit on GitHub
  1. GETTING STARTED
  2. Introductory Concepts

Gas Fees

PreviousOpcodesNextNodes and Mining

Last updated 1 month ago

Was this helpful?

Gas is essential to the BlockDAG network. It is the fuel that allows it to operate, in the same way that a car needs gasoline to run.

Prerequisites

To better understand this page, we recommend you first read up on and the .

What is gas?

In BlockDAG, gas is the unit that measures the computational effort required to execute transactions and smart contract operations. Every transaction processed on the network consumes a specific amount of gas, which reflects the computational work needed to validate and execute it. This system ensures that network resources are efficiently allocated, preventing spam attacks and protecting the blockchain from unnecessary computational strain.

To execute any transaction, users must pay a gas fee, which is calculated based on the amount of gas required for the operation multiplied by the cost per unit of gas. This fee is paid regardless of whether a transaction succeeds or fails, ensuring that miners are compensated for their computational effort. By implementing a structured gas mechanism, BlockDAG maintains a secure, scalable, and economically sustainable network, balancing transaction efficiency with decentralized processing power.

How are gas fees calculated?

In BlockDAG, users set the amount of gas they are willing to pay when submitting a transaction, effectively bidding for inclusion in the next block. Higher gas fees increase the likelihood of faster confirmation, while lower fees may result in delays or non-execution. The total gas fee is composed of two main parts: the base fee, which is set by the protocol and is required for transaction validity, and the priority fee (tip), which incentivizes miners to prioritize a transaction over others. If network demand is high, users may need to increase their priority fee to get their transactions confirmed quickly, while during periods of low congestion, lower fees may still result in timely execution.

For instance, if a transaction requires 21,000 gas units and the base fee is 10 gwei, adding a 2 gwei tip results in a total cost of 252,000 gwei (0.000252 BDAG). When the transaction is processed, the sender pays the total amount, the recipient receives the intended transfer, the miner collects the tip, and the base fee is burned to regulate the network’s economy. This system ensures fair pricing, prevents spam transactions, and maintains network efficiency, making BlockDAG a robust and cost-effective blockchain solution.

⭐
transactions
EVM