Fee Glossary

Relay quotes include the following fees: gas, relayerService, and relayerGas. The two relayer fees (service and gas) are combined to make the full relayer fee.

gas: The gas fee to be paid on the origin chain to execute the transaction. This is usually paid by the user to deposit funds to the relayer to initiate the bridge or swap.

relayer: The sum of the relayerService and the relayerGas.

relayerService: The service fee paid to the relayer to facilitate execution.

relayerGas: The gas fee given to the solver to pay gas fees on the destination chain.

app: Third party fees added on top of the existing fees, this fee is added by app developers and accrues offchain to minimize gas costs.

Gas fees are estimates and may fluctuate over time, if using in a calculation we recommend adding a small buffer to account for these fluctuations.

What are app fees?

App fees are third party fees added on top by app developers. The fees accrue offchain and can be claimed by the wallet at any point. This flow allows for us to be hyper gas efficient instead of sending fees on every transaction. You can accrue fees by including appFees in the execute request, right now this is only supported for the bridge and call execution flows (swapping support coming soon).

How do I know my offchain balance?

Look up accrued offchain fees by using the config api. Make sure that you pass in the originChainId as 0. Here’s an example of how the url should be constructed:

https://api.relay.link/config/v2?originChainId=0&currencyId=eth&user=0x03508bB71268BBA25ECaCC8F620e01866650532c&destinationChainId=1

The user balance property will reflect the offchain balance:

{
  "enabled": true,
  "user": {
    "balance": "111912125413088295",
    "maxBridgeAmount": "110982574378439751"
  },
  "solver": {
    "address": "0xf70da97812cb96acdf810712aa562db8dfa3dbef",
    "balance": "164745206761785203599",
    "capacityPerRequest": "131796165409428162879"
  },
  "supportsExternalLiquidity": false
}

How can I claim my offchain balance?

To claim the funds, all you need to do is create a bridge to any chain from chainId 0, this will transfer the offchain balance to your wallet on the desired chain. Below are some examples of how to do this: