# Fee Components

UTS provides a cost-efficient and transparent fee system for cross-chain transactions, ensuring users pay only for the resources required. Its optimized structure minimizes costs while maintaining reliable and secure token transfers.

## **Gas Fees**

Cross-chain transactions require gas fees on both source and destination networks, covering computational tasks like minting, burning, locking, and unlocking. Gas limits dynamically adjust to real-time network conditions to prevent overpayment.

* **Destination Gas Limit (dstGasLimit):** User-defined maximum gas for the destination network.
* **Destination Gas Price (dstGasPriceInWei):** Real-time gas price updated by UTS backend.
* **Native Token Prices:** Prices of source and destination native tokens (e.g., ETH, BNB) in USD are tracked for accurate fee estimation.

```plaintext
codebaseFeeAtCurrentNative = dstGasLimit * dstGasPriceInWei * (dstNativePriceInUSDe18 / curNativePriceInUSDe18)
```

## **Payload Fees**

Fees for transferring additional data, calculated based on the data size (in bytes) and destination gas price.

```plaintext
codepayloadPriceAtCurrentNative = payloadLength * dstPricePerByteInWei * (dstNativePriceInUSDe18 / curNativePriceInUSDe18)
```

## **Bridge Transaction Fees**

Protocol fees for managing token transfers, covering operational costs of the Entangle Bridge.

* **Source Network Execution:** Gas fees for burning or locking tokens.
* **Destination Network Execution:** Gas fees for minting or unlocking tokens.
* **Protocol Fee:** A flat fee deducted during the transaction.

## Fee Optimization

UTS minimizes on-chain workload by performing calculations off-chain. Backend services compute values like `dstGasPriceAtCurrentNative` and `dstPayloadPriceAtCurrentNative` before passing them to the contract, reducing unnecessary costs for users.


---

# 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.entangle.fi/universal-token-standard/architecture/fee-components.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.
