> For the complete documentation index, see [llms.txt](https://docs.vialabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vialabs.io/via-omnichain-network/fees.md).

# Fees

## **Overview**

Managing fees in cross-chain messaging involves handling two main types of fees: message fees and gas fees.&#x20;

## **Types of Fees**

### **Message Fee**

* **Where:** Paid on source blockchain
* **What**: A static fee in the *most stable* stablecoin on the origin blockchain. Listed as FEE\_TOKEN in the developer documentation. Often this is Circle's USDC. If USDC is unavailable, the fee token is typically USDT or an equivalent.
* **Responsibility**: The contract sending the message must have enough stablecoins; otherwise, the message cannot be sent.&#x20;
* **Example**: If sending a message from Polygon, your contract on Polygon needs enough USDC to cover the static fee.

<figure><img src="/files/WXYvXXkMO6s7zJlXUSOy" alt="" width="375"><figcaption></figcaption></figure>

### **Gas Fees**

* **Where:** Paid on destination blockchain
* **What**: A dynamic fee charged by the blockchain's themselves. Paid in the wrapped native gas coin (e.g., WETH on Ethereum, WAVAX on Avalanche, etc.).
* **Responsibility**: The receiving contract must have enough of the gas token to cover transaction costs. The gas is automatically pulled / sent to the relayer contract as a "gas reimbursement".&#x20;
* **Example**: If sending a message to Ethereum, your deployed contract on Ethereum needs enough WETH to cover the gas fee.

<figure><img src="/files/HAnog1ub9xrN4Fq7O9Xq" alt="" width="375"><figcaption></figcaption></figure>

## **Automatic Fee Handling**

The system automatically checks and deducts these fees during transactions. Fees are pulled directly from the your deployed smart contracts. The integrating party can choose to pay this themselves or pass the cost to the user.&#x20;

## **Setting Fee Limits**:

Developers can set limits on fees to prevent unexpected high costs using `setMaxgas` and `setMaxfee` functions.


---

# 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.vialabs.io/via-omnichain-network/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.
