evm_estimate_bridge_fee
Estimate total fees for bridging tokens between EVM chains, including source/target gas, relayer, and protocol costs, so users can compare routes and budget cross-chain transfers.
Instructions
Estimate total fees for bridging tokens between EVM chains with detailed cost breakdown.
Calculates comprehensive bridge costs including source chain gas, target chain gas, relayer fees, protocol fees, and finalization costs. Compares canonical bridges vs third-party bridges to help users choose the most cost-effective route for their cross-chain transfer needs.
CRITICAL RULES:
Read-only operation (no gas cost)
Estimates may vary from actual costs (gas prices fluctuate)
Different bridge protocols have different fee structures
L2→L1 bridges have additional finalization costs
Canonical bridges slower but cheaper than third-party
Urgency affects relayer fee calculations
PARAMETERS:
sourceChain: Chain to bridge from (required)
Must have bridge contract deployed
Different chains have different canonical bridges
Format: ethereum, polygon, arbitrum, etc.
targetChain: Chain to bridge to (required)
Must be connected to sourceChain via bridge
Cannot bridge to same chain
Some routes require hub chains
token: Token address to bridge (required)
Format: 0x followed by 40 hex characters
Must be supported by bridge protocol
Native tokens use wrapped versions
Example: USDC has different addresses per chain
amount: Amount to bridge (required)
Human-readable format: "100" = 100 tokens
Used to calculate percentage-based fees
Affects liquidity availability checks
Large amounts may have higher slippage
bridgeProtocol: Specific bridge to use (optional)
Options: canonical, hop, stargate, across, synapse, celer
Default: canonical (official bridge)
Third-party bridges faster but require trust
Each has different fee structure
urgency: Speed preference (optional, default: standard)
Options: economy, standard, fast
Affects relayer fee calculation
Economy: 10% discount, slower confirmation
Standard: Normal fees, normal speed
Fast: 50% premium, priority processing
SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559
CRITICAL GAS CONSIDERATIONS:
Ethereum: High gas costs, use gas oracle for timing
Polygon/BSC: Very low gas, safe for frequent transactions
Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum
Avalanche: Dynamic fees, can spike during congestion
Always check gas price before executing transactions
TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.
OUTPUT STRUCTURE: • totalCost: Complete fee breakdown in USD and native tokens • sourceGas: Source chain gas fees • bridgeFee: Bridge protocol fees • relayerFee: Transaction relayer costs • targetGas: Destination chain finalization fees • estimatedTime: Total time to completion • route: Bridge path used (direct or multi-hop) • executionTime: Time taken in milliseconds
COMMON MISTAKES:
Not accounting for both source and destination gas
Assuming all bridges have same fee structure
Forgetting finalization costs on L2→L1 transfers
Using wrong token addresses for different chains
Not considering urgency vs cost tradeoffs
USE CASES:
Compare bridge costs before transferring
Budget for cross-chain operations
Choose between canonical vs third-party bridges
Calculate total cost including gas and fees
Plan large token transfers across chains
BRIDGE TYPES:
Canonical: Native chain bridges (most secure, slower)
Third-party: External protocols (faster, additional trust)
Layer 2: Optimistic rollup bridges (7-day challenge period)
Sidechain: Faster but less secure than L2s
FEE COMPONENTS:
Source gas: Transaction costs on origin chain
Bridge fee: Protocol-specific transfer fees
Relayer fee: Speed-based priority fees
Target gas: Finalization costs on destination
Liquidity fees: Pool-based bridging costs
COST OPTIMIZATION:
Use canonical bridges for large amounts
Batch multiple transfers when possible
Choose economy for non-urgent transfers
Compare multiple bridge protocols
Time transfers for low gas periods
Running on Linux.
LINUX-SPECIFIC NOTES:
Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)
Python 3 is typically 'python3' command
GNU tools are standard
Use 'xdg-open' command to open files/applications
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sourceChain": "<sourceChain>",
"targetChain": "<targetChain>",
"token": "<token>",
"amount": "<amount>"
},
"name": "evm_estimate_bridge_fee"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Token address to bridge (0x...) | |
| amount | Yes | Amount to bridge | |
| urgency | No | Speed preference (default: standard) | |
| sourceChain | Yes | Source chain to bridge from | |
| targetChain | Yes | Target chain to bridge to | |
| bridgeProtocol | No | Bridge protocol to use (default: canonical) |