Enabling users to interact with any asset, any dApp, on any chain with 1-click is in Axelar's DNA. It's our mission. The Axelar network was designed explicitly so that users only pay gas once, and never need to post additional transactions on destination chains or perform relays, as those services will be covered from their initial transaction. It enables very simple UX, but users and developers need to account for all these steps when deducing the cross-chain gas used for processing.
Estimating cross-chain gas costs is more complex than the gas calculations most users are accustomed to, within a single blockchain ecosystem. The true total cross-chain gas cost is a combination of:
The gas fee a user pays on a source chain (say, Ethereum) for sending a transaction using the deposit address on Axelar.
The gas fee it takes to “process the deposit” address and route the funds to the Axelar Gateway contract.
In this example, 3 transactions, at $50 together.
In this example, 9 transactions, at ~$168 for all.
The relay fee to the Axelar network + the relay fee to the Osmosis network.
Step #3 is often subsidized by projects who incentivize operators to do relaying (such as validators, from treasuries, etc). Let’s ignore it for now.
What’s important to realize is that processing a cross-chain transaction costs much more in source-chain gas fees than the gas fee described in Step 1. In cross-chain gas costs, Step 2 is the expensive one.
How Axelar calculates cross-chain gas: short-term update
The fees collected by the network are adjusted if/when possible, and largely influenced by the Ethereum gas prices. The relay fee is set to cover gas fees on average across all interconnected chains.
How Axelar calculates cross-chain gas: mid-term features
A number of projects are in the works that will optimize and reduce the relay fees when possible:
A new deposit service. It will have a more cost efficient way to process step #2. It's live on the testnet now and will transition to mainnet soon.
Exposing the the ability to send tokens directly to the gateway (without using the deposit address, and hence eliminating step/fee 2). You can do it today, but front-ends need to integrate this flow. It will work if you’re sending from a “smart” wallet, like MetaMask and will cost very little.
As more traffic is generated via the network, the amortized cost in the batches decreases.
With the combination of the above methods, cross-chain gas costs on Axelar can be reduced to the minimal possible overhead.
This blog is an edited version of a message originally published to the Osmosis community forum.