# Bridge fee & reward

Any user or application on the target chain can query the bridge to verify the inclusion of specific data on the source chain. To obtain the result for their query, they need to pay the bridge fee. This fee compensates the Relayers who provide the Relay contract with the source chain data. As the number of queries increases, the fee for each query decreases. Therefore, the bridge fee decreases in the long term as more users and applications leverage the bridge.

## How the bridge fee is calculated?

Relayers maintain the bridge by continuously submitting source chain data to the Relay contract. They pay a transaction fee on the target chain to submit this data. Therefore, we need to compensate Relayers for their services and costs, including the transaction fees they pay.

TeleportDAO compensates Relayers by charging a fee to users and applications that query the bridge. We estimate the bridge fee in epochs, using the number of users from the previous epoch to determine the fee in the new epoch. Therefore, if there were many users in the previous epoch, the fee for querying the bridge decreases in the current epoch. Conversely, if there were few queries in the previous epoch, the query fee increases in the current epoch.

The bridge fee in the current epoch is calculated as follows:

$BridgeFee = K*SubmissionGas*GasPrice\*EpochBlocks/PrevEpochQueries$

$$
BridgeFee = K*SubmissionGas*GasPrice\*EpochBlocks/PrevEpochQueries
$$

Where:

* *SubmissionGas*: Gas usage for submitting a source block header on the target chain
* *GasPrice*: Gas price at the moment of submitting the block header
* *EpochBlocks*: Number of blocks per epoch
* *PrevEpochQueries*: Number of queries to the bridge in the previous epoch

## What is the reward of Relayers?

Relayers play a crucial role in providing necessary input for the Relay contract by fetching data from the source chain and submitting it to the target chain. Their primary expense is the transaction fee they incur on the target chain. The reward for Relayers compensates them for this expense and provides them with additional earnings.

For each block header, the first Relayer who successfully submits it to the target chain will receive a reward. This creates incentives for Relayers to promptly submit valid source chain data. Additionally, the reward is disbursed to them once their block header is finalized on the Relay. Therefore, not all valid headers submitted by Relayers will be rewarded; only those that eventually become finalized will receive the reward.

The Relayer reward is calculated as follows:

$$
BridgeReward = K*SubmissionGas*GasPrice
$$

Where:

* *SubmissionGas*: Gas usage for submitting a source block header on the target chain
* *GasPrice*: Gas price at the moment of submitting the block header


---

# 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.teleportdao.xyz/light-client-protocol/bridge-fee-and-reward.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.
