Secure Cross-Chain Communication via Axelar GMP Integration

When developing cross-chain solutions, bridge security is the main risk. Hacks of [Cross-chain bridge](https://en.wikipedia.org/wiki/Cross-chain_bridge) and Ronin demonstrated the vulnerability of multisig schemes with 5-of-9 validators: compromising a group leads to loss of funds. We use **Axelar's

Blockchain Development Services

Frequently Asked Questions

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1441
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1301
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    998
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1267
  • image_logo-advance_0.webp
    B2B Advance company logo design
    713
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    1003

When developing cross-chain solutions, bridge security is the main risk. Hacks of Cross-chain bridge and Ronin demonstrated the vulnerability of multisig schemes with 5-of-9 validators: compromising a group leads to loss of funds. We use Axelar's General Message Passing (GMP) — a decentralized network with an attack threshold of 2/3 of stake among ~75 validators. This is 10 times more secure than Multichain (5-of-9 multisig) and 20 times more decentralized than Ronin. Our experience — 5+ years in Web3 and 20+ successful integrations — guarantees reliable implementation.

Why Axelar is safer than other bridges?

Axelar uses proof-of-stake with threshold signatures (BLS). Validators have a stake in the network, and signing a transaction requires cooperation of >2/3 of the stake. This is 10 times harder to exploit than a bridge with 5-of-9 multisig. Additionally, Axelar undergoes regular security audits by leading firms like Trail of Bits. In Axelar documentation it is stated: Gas Service automatically pays gas on the destination chain, relieving the user from manual management.

Problems we solve

Cross-chain interaction faces three main challenges:

  • Security: vulnerable bridges with few validators.
  • Gas costs: double gas payment on both chains, often with overpayment.
  • Integration complexity: need to manage keys, relayers, and statuses.

Axelar solves all three: threshold signatures improve security, Gas Service automates payment, and GMP simplifies calls. A typical mistake is incorrect gas estimation for the destination chain, causing message delivery failure. Using AxelarGMPRecoveryAPI avoids this.

What Axelar can do

Axelar's GMP enables transferring arbitrary messages between chains, enabling cross-chain calls and token transfers. Not just tokens: you can call a smart contract function in another chain with arbitrary data.

Canonical token bridging — standardized token transfers. USDC via Axelar can be Circle's native USDC (via Circle CCTP) or Axelar Wrapped USDC (axlUSDC), depending on configuration.

Squid — DEX aggregator built on top of Axelar, allowing cross-chain swaps in one transaction (swap on source chain + bridge + swap on target).

GMP integration

Source chain contract

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { AxelarExecutable } from "@axelar-network/axelar-gmp-sdk-solidity/contracts/executable/AxelarExecutable.sol"; import { IAxelarGateway } from "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol"; import { IAxelarGasService } from "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGasService.sol"; contract SourceContract { IAxelarGateway public gateway; IAxelarGasService public gasService; constructor(address _gateway, address _gasService) { gateway = IAxelarGateway(_gateway); gasService = IAxelarGasService(_gasService); } function sendCrossChainMessage( string calldata destinationChain, // "Polygon", "avalanche", "binance" string calldata destinationAddress, // address of recipient contract bytes calldata payload ) external payable { // Pay gas for execution on destination chain gasService.payNativeGasForContractCall{value: msg.value}( address(this), destinationChain, destinationAddress, payload, msg.sender ); // Send the message gateway.callContract(destinationChain, destinationAddress, payload); } } 

Destination chain contract

contract DestinationContract is AxelarExecutable { event MessageReceived(string sourceChain, string sourceAddress, bytes payload); constructor(address gateway) AxelarExecutable(gateway) {} // Called by Axelar when the message is delivered function _execute( string calldata sourceChain, string calldata sourceAddress, bytes calldata payload ) internal override { // Decode payload (address recipient, uint256 amount) = abi.decode(payload, (address, uint256)); // Execute business logic _processMessage(sourceChain, sourceAddress, recipient, amount); emit MessageReceived(sourceChain, sourceAddress, payload); } } 

GMP Integration in 2-4 Weeks

The process includes the following steps:

  1. Design: choose chains, contracts, interaction architecture.
  2. Develop smart contracts in Solidity using Foundry/Hardhat.
  3. Deploy on testnet and configure Gas Service.
  4. Test cross-chain scenarios on testnet.
  5. Security audit (optional).
  6. Deploy on mainnet and monitor.
Stage Duration Description
Analysis 1-2 days Determine chains, contracts, routes
Development 5-10 days Write contracts, configure SDK
Testing 3-5 days Testnet, gas estimation
Deployment + audit 2-4 days Mainnet, code audit

Estimating Gas for Cross-Chain Calls

Key detail of Axelar GMP — Gas Service. The user pays gas for both chains in one transaction (on the source chain). Axelar Gas Service converts the native token and pays the relayer on the destination chain. Estimate required gas via AxelarGMPRecoveryAPI:

import { AxelarQueryAPI, Environment, GasToken } from "@axelar-network/axelarjs-sdk"; const api = new AxelarQueryAPI({ environment: Environment.MAINNET }); const gasEstimate = await api.estimateGasFee( "Ethereum", // source chain "Polygon", // destination chain GasToken.ETH, 300_000, // gas limit on destination 1.1 // 10% buffer ); // gasEstimate — amount in wei to pass to payNativeGasForContractCall 

The average gas cost per call is around $10, but for projects processing 1000 calls per day, savings exceed $3,000 per month compared to manual relaying. Contact us for a custom assessment.

Token Transfer with GMP

For token transfer + function call on destination chain — use callContractWithToken:

function sendTokenAndCall( string calldata destinationChain, string calldata destinationAddress, bytes calldata payload, string calldata symbol, // "USDC", "WETH" uint256 amount ) external payable { IERC20(gateway.tokenAddresses(symbol)).transferFrom(msg.sender, address(this), amount); IERC20(gateway.tokenAddresses(symbol)).approve(address(gateway), amount); gasService.payNativeGasForContractCallWithToken{value: msg.value}( address(this), destinationChain, destinationAddress, payload, symbol, amount, msg.sender ); gateway.callContractWithToken(destinationChain, destinationAddress, payload, symbol, amount); } 

Comparison: Axelar vs other bridges

Feature Axelar Multichain Ronin
Validation mechanism PoS + threshold signatures Multisig 5-of-9 Multisig 5-of-9
Number of validators ~75 9 9
Attack threshold >2/3 of stake 5 keys 5 keys
Cross-chain calls GMP (arbitrary data) Tokens only Tokens only
Cosmos support Yes (IBC) No No

Squid integration for cross-chain swaps

import { Squid } from "@0xsquid/sdk"; const squid = new Squid({ baseUrl: "https://apiplus.squidrouter.com" }); await squid.init(); const { route } = await squid.getRoute({ fromAddress: userAddress, fromChain: "1", // Ethereum fromToken: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH fromAmount: "1000000000000000000", // 1 ETH toChain: "137", // Polygon toToken: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", // USDC toAddress: recipientAddress, slippage: 1.0, // 1% enableBoost: true, }); // Execute the swap const tx = await signer.sendTransaction(route.transactionRequest); 

Deliverables

  • Analytical documentation: chain interaction diagram, contract selection.
  • Development and deployment of Smart Contracts in Solidity (using Foundry/Hardhat).
  • Gas Service configuration and gas estimation.
  • Squid integration for cross-chain swaps (optional).
  • Testing on testnet and mainnet.
  • Integration documentation and post-launch support.
  • Access to Axelar dashboard and monitoring tools.
  • Training session for your development team.

We will assess your project end-to-end. With 5+ years of Web3 experience and over 20 successful cross-chain integrations, we help you implement cross-chain functionality safely and on time.