Understanding Gas Fees
Learn how gas fees and bridge costs vary by route provider with real-world transaction examples
Overview
When bridging assets across chains using Multi-Bridge Routes, the total cost of your transaction depends on multiple factors beyond just network gas fees. Different bridge providers have distinct fee structures that can significantly impact the final amount your users receive.
Understanding these cost variations helps you make informed routing decisions and set proper user expectations in your application.
Fee Components
Every cross-chain bridge transaction involves three main cost components:
Network Gas Fees
The cost to execute the transaction on the blockchain, paid in the native currency (ETH, POL, etc.). This varies based on:
- Current network congestion
- Transaction complexity
- Gas price at execution time
Bridge Protocol Fees
Service fees charged by the bridge provider for facilitating the cross-chain transfer. Each protocol has its own fee model:
- Fixed percentage of transfer amount
- Flat fee per transaction
- Dynamic fees based on liquidity
Slippage
The difference between expected and actual output due to:
- Market price movements during execution
- Liquidity pool conditions
- Route efficiency
Real-World Examples
Let's compare the actual costs of bridging 50 USDC from Base to Ethereum using different routes:
Example 1: Stargate Route (via Agglayer UI)
Source Transaction: View on BaseScan
- Stargate Protocol Fees: $0.52 in ETH
- Network Gas Fees: $0.06 in ETH
- Total Source Cost: $0.58
Destination Transaction: View on Etherscan
- Amount Received: 49.92 USDC
- Bridge Fees + Slippage: $0.08
Total Transaction Cost: ~$0.66
Example 2: Stargate Route (via Jumper UI)
Source Transaction: View on BaseScan
- Stargate Protocol Fees: $0.52 in ETH
- Network Gas Fees: $0.09 in ETH
- Total Source Cost: $0.61
Destination Transaction: View on Etherscan
- Amount Received: 49.92 USDC
- Bridge Fees + Slippage: $0.08
Total Transaction Cost: ~$0.69
Example 3: Across Route (via Agglayer UI)
Source Transaction: View on BaseScan
- Network Gas Fees: $0.008 in ETH
- Total Source Cost: $0.008
Destination Transaction: View on Etherscan
- Amount Received: 49.86 USDC
- Bridge Fees + Slippage: $0.14
Total Transaction Cost: ~$0.148
Key Takeaways
Here's a comparison of the total costs for bridging 50 USDC from Base to Ethereum:
| Route | Source Costs | Output Amount | Total Fees | Total Cost |
|---|---|---|---|---|
| Stargate (Agglayer UI) | $0.58 | 49.92 USDC | $0.08 | ~$0.66 |
| Stargate (Jumper UI) | $0.61 | 49.92 USDC | $0.08 | ~$0.69 |
| Across (Agglayer UI) | $0.008 | 49.86 USDC | $0.14 | ~$0.148 |
Important Insights
- Lowest gas ≠ Lowest total cost: Across has 75x lower source gas fees but still results in the cheapest overall transaction
- Protocol fees vary significantly: Stargate charges $0.52+ upfront vs Across's minimal gas
- Same route, different UIs: Even the same bridge (Stargate) can have slightly different gas costs depending on the interface
- Output matters most: Focus on total cost and final output, not just gas fees
Using SDK Route Data
When building your application, use the route response data to compare costs programmatically:
const routes = await core.getRoutes({
fromChainId: 8453, // Base
toChainId: 1, // Ethereum
fromTokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
toTokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '50000000', // 50 USDC
fromAddress: '0xYourAddress',
slippage: 0.5,
});
// Compare routes by total cost and output
routes.forEach(route => {
console.log(`Provider: ${route.provider.join(' + ')}`);
console.log(`Total Cost: $${route.totalCostUSD}`);
console.log(`Output: ${route.toAmount}`);
console.log(`Duration: ${route.executionDuration}s`);
console.log('---');
});Each route includes:
totalCostUSD: Estimated total cost in USD (includes gas + bridge fees)toAmount: Expected output amount after all feesexecutionDuration: Estimated time to complete the bridgeprovider: Array of bridge providers used in the route
Best Practices
- Display total costs to users - Show both upfront gas and expected output, not just one
- Compare routes holistically - Consider cost, speed, and output together
- Set realistic expectations - Explain that final amounts may vary due to slippage
- Update estimates regularly - Gas prices and liquidity conditions change constantly
- Test with small amounts first - Verify route behavior before committing large transfers
By understanding these cost dynamics, you can help users make informed decisions and build a better cross-chain bridging experience.
Last updated on