# Gas Fees

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 <a href="#prerequisites" id="prerequisites"></a>

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

### What is gas? <a href="#what-is-gas" id="what-is-gas"></a>

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? <a href="#how-are-gas-fees-calculated" id="how-are-gas-fees-calculated"></a>

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&#x20;*****(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&#x20;*****(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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blockdagnetwork.io/get-started/introductory-concepts/gas-fees.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
