Fees

Overview

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

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.

  • Example: If sending a message from Polygon, your contract on Polygon needs enough USDC to cover the static fee.

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".

  • Example: If sending a message to Ethereum, your deployed contract on Ethereum needs enough WETH to cover the gas fee.

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.

Setting Fee Limits:

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

Last updated