> For the complete documentation index, see [llms.txt](https://docs.sigrex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sigrex.io/dex-signal-bot/gas-tank.md).

# Gas Tank

The GasTank is a secure Ethereum smart contract that allows users to deposit ETH (or the native token of the chain, such as POL, AVAX, etc.) to cover gas fees for their DEX Signal Bot operations.

When a DEX bot is triggered by a signal, a backend executor contract submits a transaction on-chain. This transaction requires gas (native tokens) to execute. If the user hasn't deposited enough funds into their GasTank, the transaction will revert and the bot will be **automatically suspended** to prevent further failures.

## 🔐 Key Features

* **Secure Deposits:**\
  The GasTank is a non-custodial smart contract. Users can deposit and withdraw their funds at any time.
* **No Lock-In:**\
  Funds are **not locked**. Users maintain full control and can withdraw unused gas funds freely.
* **Autonomous Execution:**\
  The bot uses the deposited gas to cover the costs of on-chain execution automatically.
* **Slight Overburn (15% buffer):**\
  Due to the unpredictable nature of gas usage (especially from internal operations like token burns or events), the system burns **15% more** gas than the exact execution cost to ensure reliability.

Here’s a simplified view of how this is calculated:

```solidity
uint256 totalCost = ((startGas - gasleft()) * tx.gasprice * 115) / 100; // 15% buffer
gasTank.burn(owner, totalCost);
```

***

## 💡 Manual Wallet Execution

If you decide to **manually connect your wallet** (e.g. via MetaMask) and run the DEX trade yourself, the GasTank **is not used**.

* The swap will be sent **from your wallet**.
* **You cover the gas fees** directly.
* **No extra buffer or gas burn** occurs in this case.

This method is ideal if you prefer full transparency, self-signing, or are running bots in a **semi-automated** or **hybrid** mode.

## ⚠️ Why It Matters

* If your GasTank balance is **too low**, your DEX bot **will fail** and be suspended.
* Always keep a **healthy balance** in your GasTank to ensure smooth execution.
* Monitor your GasTank balance in the dashboard.


---

# 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.sigrex.io/dex-signal-bot/gas-tank.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.
