Learn more about Axelar

Cross-Chain Gateway Protocol (CGP)

Axelar’s CGP can be likened to the Internet’s Border Gateway Protocol. It is used to connect autonomous blockchain ecosystems with each other and enables cross-chain routing.

Home » Ecosystem » Cross-Chain Gateway Protocol (CGP)

Axelar’s Core Protocols

Central Part of Axelar’s Protocol Suite is the Cross-Chain Gateway Protocol (CGP)

The protocol suite of Axelar consists of two core protocols that provide the function of connecting blockchain ecosystems and enabling the cross-chain requests of dApps. Let’s have a look at the first protocol of the suite: the Cross-Chain Gateway Protocol (CGP).

CGP

Cross-Chain Gateway Protocol

Axelar’s CGP can be likened to the Internet’s Border Gateway Protocol. It is used to connect autonomous blockchain ecosystems with each other and enables cross-chain routing. With the aid of the Cross-Chain Gateway Protocol, blockchains are no longer required to speak the same programming language. Instead of having to make custom changes on their blockchains, developers can easily plug their chains into the global network that Axelar provides.

With this in mind, we can see how the Cross-Chain Gateway Protocol (CGP) connects an unlimited number of autonomous blockchain ecosystems which each other:

Blockchain 1

CGP

Blockchain 2

CGP and Routing Mechanisms

The Functionality of Axelar’s CGP

Axelar’s Cross-Chain Gateway Protocol and routing mechanisms are used for the following needs:

Threshold Accounts

Axelar’s Threshold Accounts on Other Chains

In order to bridge different blockchains, Axelar creates threshold accounts on each chain. These accounts are responsible for controlling the flow of value and information across chains.

Bitcoin and non-smart contract chains

In case of blockchains without smart contract functionality, such as Bitcoin, Axelar validators create a threshold ECDSA key. This is the destination address where users send deposits and controls the ECDSA account on Bitcoin.

Smart contract chains

For chains supporting smart contracts, a threshold bridge account is created. In this case, Axelar’s validators create a threshold ECDSA or ED25519 key, which controls a smart contract account.

State Synchronization

The Process of Accomplishing State Synchronization

Let’s have a look at the process of accomplishing state synchronization:

  • To accomplish state synchronization, the request of an end-user or application is posted on one of Axelar’s bridge accounts or directly on the Axelar blockchain.
  • Axelar validators then query the API of their blockchain node software and report the answer to the Axelar chain.
  • Once the threshold number of validators reporting the same answer is reached, validators sign the answer using threshold cryptography.
  • The signed value can then be posted to the destination blockchain by anyone as the request has been serviced.

Cross-Chain Asset Transfer

Cross-Chain Transfers of Digital Assets

The Axelar network enables cross-chain transfers of digital assets. This is accomplished by extending the state synchronization workflow discussed above. Upon initialization of a bridge account, a sufficient supply of the chain’s native tokens is printed and controlled.

The following describes the process of cross-chain transfers.

Token Deposits

Let’s start with the process of a token deposit should a user wish to exchange a given amount of tokens on chain 1 for the corresponding amount of tokens on chain 2:

  • To initiate the transaction, the user would post a transfer request to the threshold bridge account. The request is then routed to the Axelar network.
  • A fresh deposit address is created by Axelar validators using threshold cryptography.
  • Validators post the deposit address to the Axelar blockchain.
  • The end-user sends the tokens from chain 1 to the address.
  • The transaction is posted on the Axelar blockchain.
  • Validators then query the API of their blockchain node software for the transaction. If the response is “true,” the transaction is reported to the Axelar chain.
  • Once the threshold number of validators reporting the same answer is reached, validators sign a transaction that sends the specified number of pegged tokens from the bridge account to the destination address on chain 2
  • Validators use threshold cryptography to sign the transaction.
  • The signed value can then be posted to the destination blockchain by anyone as the request has been serviced.

Token Withdrawals

Here is the process of withdrawing tokens, for example when a user wishes to redeem wrapped tokens from chain 2 to their address on chain 1:

  • Similarly to a token deposit, the user initiates the transaction by posting a transfer request by depositing the wrapped tokens to the threshold bridge account
  • The transaction is posted on Axelar and the validators subsequently query chain 2 for the transaction.
  • If the response is “true,” validators report the answer to the Axelar blockchain
  • Once the threshold number of validators is reached, the transaction will be signed using threshold cryptography.
  • Anyone can take the signed value and post it to chain 1 as the request has been serviced

Achieving Atomic Cross-Chain Transaction Flow

In the Axelar network, transactions are executed on multiple chains or none. For this reason, there are four states in which a request can find itself in:

  • Initialized
  • Pending
  • Completed
  • Timed out

Should a time out be triggered during the pending stage, an error code is returned. Some timeouts trigger refund events. This is the case when the receiving chain did not process the transaction. In this situation, the asset is refunded back to the user that initiated the transaction.

Go back

Ecosystem

Up next

Cross-Chain Transfer Protocol (CTP)