# Gas Fee Abstraction

### Overview

Tychi Wallet introduces a powerful **Fee Abstraction Layer** that simplifies how users pay transaction fees. Instead of needing native tokens (like ETH or BNB) for gas, users can pay gas fees using **TYI** or **BNB**—with the system handling conversions and execution automatically behind the scenes.

***

### 🔧 Technical Engineering

A **dedicated backend-powered abstraction layer** handles real-time gas fee estimation, token conversion, and transaction broadcasting. The entire process is **off-chain**, ensuring speed and efficiency without compromising user control.

***

#### System Flow

1. **🔍 Detect Origin Chain**\
   Tychi identifies the blockchain where the transaction was initiated.
2. **📊 Estimate Gas Requirement**\
   The system evaluates network congestion and calculates required native gas for execution.
3. **💹 Fetch Live Conversion Rates**\
   Token prices are fetched and cross-verified using:

   * Chainlink oracles
   * CoinMarketCap API
   * CoinGecko API

   *Slippage tolerance is applied to avoid price mismatches.*
4. **💱 Execute Off-Chain Conversion**\
   TYI or BNB is converted into the required native token using:
   * Internal liquidity reserves
   * Third-party APIs
   * DEX or CEX routes (as needed)
5. **📡 Broadcast Transaction**\
   Final transaction is signed and submitted using the correct native token for gas.

***

### 🧠 AI-Powered Gas Optimization

Tychi integrates an **AI layer** that:

* Monitors historical network data
* Predicts low-congestion windows
* Suggests optimal times to transact
* Avoids tracking user behavior to maintain privacy

This **non-intrusive recommendation engine** helps reduce gas costs while keeping the user in control.

***

### 🔬 Slippage Protection

Before executing a conversion:

* Price feeds are **averaged across sources**
* **Maximum slippage tolerance** is checked
* If exceeded, transaction is **paused or rejected** to prevent loss

### Flow Diagram

### Overview

Tychi Wallet introduces a powerful **Fee Abstraction Layer** that simplifies how users pay transaction fees. Instead of needing native tokens (like ETH or BNB) for gas, users can pay gas fees using **TYI** or **BNB**—with the system handling conversions and execution automatically behind the scenes.

***

### 🔧 Technical Engineering

A **dedicated backend-powered abstraction layer** handles real-time gas fee estimation, token conversion, and transaction broadcasting. The entire process is **off-chain**, ensuring speed and efficiency without compromising user control.

***

#### System Flow

1. **🔍 Detect Origin Chain**\
   Tychi identifies the blockchain where the transaction was initiated.
2. **📊 Estimate Gas Requirement**\
   The system evaluates network congestion and calculates required native gas for execution.
3. **💹 Fetch Live Conversion Rates**\
   Token prices are fetched and cross-verified using:

   * Chainlink oracles
   * CoinMarketCap API
   * CoinGecko API

   *Slippage tolerance is applied to avoid price mismatches.*
4. **💱 Execute Off-Chain Conversion**\
   TYI or BNB is converted into the required native token using:
   * Internal liquidity reserves
   * Third-party APIs
   * DEX or CEX routes (as needed)
5. **📡 Broadcast Transaction**\
   Final transaction is signed and submitted using the correct native token for gas.

***

### 🧠 AI-Powered Gas Optimization

Tychi integrates an **AI layer** that:

* Monitors historical network data
* Predicts low-congestion windows
* Suggests optimal times to transact
* Avoids tracking user behavior to maintain privacy

This **non-intrusive recommendation engine** helps reduce gas costs while keeping the user in control.

***

### 🔬 Slippage Protection

Before executing a conversion:

* Price feeds are **averaged across sources**
* **Maximum slippage tolerance** is checked
* If exceeded, transaction is **paused or rejected** to prevent loss

### 🧩 Flow Diagram

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


---

# 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://tychi.gitbook.io/tychi-whitepaper/features/markdown.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.
