Getting Started with Chain Integration

đź’ˇ

The Axelar Virtual Machine (AVM) and Amplifier are currently under active development, so these instructions are likely to change. Please check back frequently for updates.

The Interchain Amplifier enables dynamic application-level connections of new blockchains and services to the Axelar network. dApp developers gain access to more new blockchains faster. Integrators can use Amplifier to connect their own chains to the Axelar Network. This enables generalized connections between blockchains using different technology stacks (Solidity, Rust, etc), consensus mechanisms (Proof of Stake, L2s), and blockchains from many different communities.

The Interchain Amplifier is a set of on-chain contracts and related services that enable integrators to easily connect chains and off-chain capabilities to the Axelar network. It is part of Axelar’s Mobius Development Stack (MDS). Developers can then seamlessly build applications that take advantage of these chains and capabilities.

Integrators gain access to Axelar’s interconnected network of chains and can “amplify” their resources by paying the cost equivalent to developing only one connection. They can establish connections between new ecosystems or existing chains to add new network properties, such as improved security or better delivery and availability.

The Amplifier consists of the following, all on the Axelar network:

  • An on-chain message router
  • Gateways
  • CosmWasm methods for receiving and sending messages

To connect your chain to the Axelar network via the Interchain Amplifier, you’ll need to build or instantiate 4 smart contracts and 1 relayer service:

  • Source Chain Gateway Contract
    • Built using the tech stack of your chain, you’ll need to deploy a smart contract implementing the Cross-Chain Gateway Protocol.
    • For EVM chains, you can re-use the existing EVM Gateway.
    • This contract serves as the primary API for developers sending messages from your chain.
  • Verifier Contract
    • A smart contract on the Axelar network that verifies the validity of transactions on your chain.
    • Most integrators will begin by using or customizing a Voting Verifier or can be customized to your needs for cases such as verification via ZK Proof.
    • If you deploy a Voting Verifier, verifiers will need to support your chain and vote on the truth of source chain transactions.
  • Gateway Contract
    • A gateway contract that exists on the Axelar network that will know how to use your verifier contract to check the validity of a transaction and then knows how to forward transactions onto the Amplifier router.
    • Most integrators will begin by using or customizing this Gateway Contract.
  • Prover Contract
    • A smart contract on the Axelar network that knows how to prove the validity of a transaction on your chain.
    • Most integrators will begin by using or customizing the multisig prover
  • Message Relayer
    • A service built with any tech stack that listens for events on your chain and relays them to the Axelar network.
    • Get started with our Message Relayer Example
    • Setup your relayer to send data to the Axelarscan API (TBD) related to transactions with your network
  • Governance Contract
    • A source chain contract that can receive messages from the Axelar Network representing governance decisions, such as updating your gateway.
  • Gas Table Updater
    • A service that updates the gas table, so that gas price estimations involving your chain are accurate.

The chain integration guide will walk you through this process within the current Amplifier DevNet. Contract deployment on Testnet or Mainnet will require governance proposal.

The following diagram shows how the Amplifier handles General Message Passing:

Your browser does not support SVG

See the GMP with Amplifier example for additional details.

Developers who are looking to send messages between chains connected via Amplifier don’t need to worry about working directly with the Amplifier themselves. They can use standard General Message Passing (GMP) to send messages between chains via a gateway available on the source chain. Amplifier will handle the verification, routing, and proving of messages between chains.

Most integrators will follow the following process:

  1. Learn & Understand Amplifier
    • Follow the chain integration guide to deploy standardize contracts to the DevNet to understand the tools and basics of the process.
  2. Customize and Deploy to DevNet
    • Build (or instantiate or customize) each of the required contracts and the relayer.
    • You may choose to change the logic of your verifier contract (for ZK use cases for example) or prover contract.
  3. Whitelist contracts
  4. Become a verifier for your chain.
    • To test your chain, you will need active verifiers to vote on messages from your chain
  5. Test your integration
    • Make sure you can send and receive messages on your chain.
  6. Begin audit process
    • You should audit your on-chain contracts.
  7. Propose to Testnet
    • Make on-chain proposals on the testnet to create your CosmWasm smart contracts.
      1. Proposal to store your CosmWasm code.
      2. Proposal to instantiate your contracts.
    • Make an on-chain proposal to add your chain to the Amplifier router.
  8. Test in Testnet
    • Ensure your contracts are working as expected.
    • Verify with developers that they can send messages to and from your chain.
  9. Productionize your relayer
    • Ensure your relayer is robust, fault-tolerant, and can handle the load of your chain.
  10. Propose to Mainnet
    • Make on-chain proposals on Mainnet to create your CosmWasm smart contracts.
      1. Proposal to store your CosmWasm code.
      2. Proposal to instantiate your contracts.
    • Make an on-chain proposal to add your chain to the Amplifier router.
  11. Fund rewards pools

Once you understand the architecture and integration process, you’re ready to start implementing. Head to the Integrate a Chain guide for step-by-step technical instructions.

Edit on GitHub