# Fees & Gas

On the Secret Network gas is a special unit used for tracking the the use of resources during code execution (usually paid by the transaction sender). Gas fees are normally paid to execute read / write commands, but can also be used to pay for more resource intensive computational tasks.

Gas primarily serves two purposes:

1. To ensure each block is not over consuming resources, and that each block will be finalized on-chain. The cost of `gas` consumed during [`message`](https://docs.cosmos.network/v0.44/building-modules/messages-and-queries.html#messages) execution results in a `fee` where `fees = gas * gas-prices`.
2. To prevent end-users from spamming and abusing the Secret Network. Most applications implement fee mechanisms to prevent spam, but the `secretcli` does not enforce gas pricing by default.

Each transaction supplies fees or gas prices, but never both.

Validator's have a minimum gas price (multi-denom) configuration used to determine if they should include a transaction in a block during `CheckTx`, where `gasPrices >= minGasPrices`.

***Note**: Transactions must supply fees greater than or equal to **any** fees set by validators. Validators may start to prioritize transactions by `gasPrice` in the mempool, increasing transaction priority based on fees or gas prices.*

e.g.

```bash
# secretcli tx bank send [from_key_or_address] [to_address] [amount] [flags]

secretcli tx bank send ... --fees=50000uscrt
```

or

```bash
secretcli tx bank send ... --gas-prices=0.0125uscrt
```


---

# 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.scrt.network/secret-network-documentation/infrastructure/secret-cli/fees-and-gas.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.
