> For the complete documentation index, see [llms.txt](https://docs.botanixlabs.com/botanix/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.botanixlabs.com/botanix/get-to-know-botanix/intermediate/transaction-fees.md).

# Transaction fees

{% hint style="info" %}
**TL;DR**

Transaction fees on the Botanix EVM are a little different from Bitcoin and resemble more the Ethereum network.&#x20;

There are 3 primary actions when interacting with the Botanix EVM that can result in transaction fees.

* Layer 2 transactions (i.e. transactions on the Botanix EVM itself)
* Layer 1 to Layer 2 transactions (i.e. transactions from the Bitcoin main chain to Botanix EVM = bridge-in)
* Layer 2 to Layer 1 transactions (i.e. transactions from Botanix EVM to the main chain = bridge-out)
  {% endhint %}

### Fee Structure Overview

Botanix uses a dual-layer fee structure that reflects its position as a Bitcoin Layer 2. Understanding these fees helps you use the network efficiently and budget for your transactions.

**Layer 1 (Bitcoin) Fees**: Traditional Bitcoin network fees for transactions on the Bitcoin mainnet&#x20;

**Layer 2 (Botanix) Fees**: EVM-style gas fees for transactions and smart contract interactions on Botanix

### Layer 2 Fees on Botanix

#### **Fee Denomination**

Fees on Botanix are denominated in Bitcoin, not ETH or other tokens. This means:

* You pay gas fees using your Bitcoin balance on Botanix
* Staking rewards for Orchestrators are paid in Bitcoin
* All economic activity remains Bitcoin-native

#### **Gas Fee Calculation**

Botanix uses the same gas fee formula as Ethereum:

**Fee = Gas Price × Gas Used**

Where:

* **Gas Price**: How much you're willing to pay per unit of computational work (set by you)
* **Gas Used**: The actual computational work required for your transaction (determined by the network)

#### **Setting Gas Parameters**

* **Use `eth_gasPrice`** to determine the appropriate gas price for current network conditions
* **Use `eth_estimateGas`** to find the appropriate gas limit for your transaction
* **Important**: If your gas price is too low, your transaction will be rejected
* **Important**: If your gas limit is below the estimated requirement, your transaction will fail

### Bridging Fees Explained

<figure><img src="/files/A3ouMA1m880s1mdJgxOt" alt=""><figcaption></figcaption></figure>

#### **L1 → L2: Deposit (Peg-in) Costs**

When you deposit Bitcoin to Botanix, you pay two separate fees:

1. **Standard Bitcoin Transaction Fee**
   * This is the regular Bitcoin network fee shown in your BTC wallet
   * Varies based on Bitcoin network congestion
   * Paid to Bitcoin miners
2. **Minting Contract Gas Fee**
   * Cost to execute the smart contract that mints your Bitcoin on Botanix
   * Displayed on the bridge interface
   * Paid in Bitcoin on Botanix

#### **L2 → L1: Withdraw (Peg-out) Costs**

When you withdraw Bitcoin back to Layer 1, the process involves two transactions:

1. **Initialization Transaction (L2)**
   * Burns your Bitcoin on Botanix
   * Gas fee calculated like any other L2 transaction
   * Paid in Bitcoin on Botanix
2. **Finalization Transaction (L1)**
   * Releases your Bitcoin from the Spiderchain multisig
   * Cost depends on Bitcoin mempool congestion
   * Automatically handled by Orchestrators
   * Withdrawals are batched to reduce costs

### Fee Management Best Practices

* **Monitor Bitcoin fees**: Bridge during lower congestion periods when possibl
* **Plan ahead**: Bridge larger amounts less frequently to optimize fee-to-value ratios
* **Time your transactions**: Both Bitcoin and Botanix fees vary with network activity
* **Monitor gas prices**: Use tools to track optimal fee levels

### Key Takeaways

* **Dual-layer fees**: Pay Bitcoin L1 fees for bridging, L2 gas fees for operations
* **Bitcoin-denominated**: All fees paid in Bitcoin, maintaining network alignment
* **Significant savings**: L2 operations cost (less than) cents instead of dollars
* **Transparent pricing**: Tools available to estimate costs before transacting
* **Batching benefits**: Some operations can be optimized through batching

Understanding Botanix's fee structure helps you use the network efficiently while budgeting appropriately for your DeFi activities. The combination of Bitcoin's security with Layer 2 efficiency creates a cost-effective environment for sophisticated financial applications.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.botanixlabs.com/botanix/get-to-know-botanix/intermediate/transaction-fees.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
