Transfer AVAX Between the X-Chain and C-Chain

AVAX tokens exist on the X-Chain, where they can be traded, on the P-Chain, where they can be provided as a stake when validating the Primary Network, and on the C-Chain, where they can be used in smart contracts or to pay for gas.

Here are the steps to transfer tokens between the X-Chain and C-Chain.

The easiest way to transfer AVAX between chains is to use the Avalanche Wallet which is a non-custodial, and secure way to access and move AVAX.

The Avalanche Wallet source code can be found here.

1. Open the Avalanche Wallet and select "Access Wallet."

Image for post

2. Log in to the wallet by using the private key, mnemonic key phrase, keystore file or Ledger Nano S. C-Chain transfers via Ledger are not supported yet.

Image for post

3. After successfully logging in, select, "Cross Chain."

Image for post

4. Choose the "Source Chain" and the 'Destination Chain" for the transfer. Then enter the amount to transfer below.

Image for post

5. Confirm the transaction and then click, "Transfer."

Image for post

6. Once completed, a notification will confirm the transaction was successful. A cross-chain transfer is a two step process: first a transaction to export the funds from the X-Chain, and another to import it to the C-Chain. The wallet will do both and show its the progress while doing so.

Image for post

To return the AVAX back to the X-Chain, you need to do the transfer in the opposite direction.

Simply swap the source, and destination chain, by selecting them from the Source and Destination dropdown menu. The rest of the process is the same: enter the amount, confirm and transfer.

Transfer AVAX Between the P-Chain and C-Chain

AVAX tokens exist on the X-Chain, where they can be traded, on the P-Chain, where they can be provided as a stake when validating the Primary Network, and on the C-Chain, where they can be used in smart contracts or to pay for gas. Avalanche supports movement of AVAX between these chains. In this tutorial, we’ll send AVAX tokens between the C-Chain and P-Chain.

Requirements

You've completed Getting Started and are familiar with Avalanche's architecture.

In order to send AVAX, you need to have some AVAX! You can get real AVAX by buying it on an exchange, or you can get testnet AVAX from the AVAX Test Faucet, which is a free and easy way to get to play around with Avalanche.

Transferring AVAX Using the Web Wallet

The easiest way to transfer AVAX between chains is to use the Avalanche Wallet, which is a non-custodial and secure way to access and move AVAX.

The Avalanche Wallet source code can be found here.

Step 1 - Open the Avalanche Wallet

Image for post

Select Access Wallet to enter your wallet. To connect the wallet to a network other than the main Avalanche network, select Mainnet and choose the network to connect to.

Step 2 - Log In to Your Wallet

You can access your wallet using the private key, mnemonic key phrase, keystore file or Ledger Nano S.

Image for post

After a successful login you will see your balance, assets portfolio and various other information.

Step 3 - Go to the Cross Chain Tab

Image for post

Functionality for transferring tokens between chains is on the Cross Chain tab.

Step 4 - Enter Amount to Transfer

You will be presented with a choice for Source Chain and Destination Chain. Select P-Chain and C-Chain, respectively. You will see your source chain's balance, and an input field for entering the amount to transfer from source to destination chain. If you do not have any balance on your P-Chain but on X-Chain, then you can follow this tutorial to transfer it to P-Chain.

Image for post

Enter the amount you wish to transfer from the P-Chain to the C-Chain.

Step 5 - Confirm the Transaction

Image for post

Press Confirm, and then Transfer to initiate the transfer.

Step 6 - Done!

A cross-chain transfer is a two step process: first a transaction to export the funds from the P-Chain (source chain), and another to import it to the P-Chain (destination chain). The wallet will do both and show its the progress while doing so.

Image for post

That's it! You've transferred AVAX from the P-Chain to C-Chain! Now you can use them to deploy smart contracts on C-Chain or pay for transaction fees while interacting with smart contracts.

Transfer from C-Chain to P-Chain

To return the AVAX back to the P-Chain, you need to do the transfer in the opposite direction.

Swap the source and destination chains by selecting them from the Source and Destination drop-down menu. The rest of the process is the same: enter the amount, confirm and transfer.

Transfer AVAX Between the X-Chain and P-Chain

AVAX tokens exist on the X-Chain, where they can be traded, on the P-Chain, where they can be provided as a stake when validating the Primary Network, and on the C-Chain, where they can be used in smart contracts or to pay for gas. Avalanche supports movement of AVAX between these chains, and in the future, Avalanche will support more generic atomic swaps between chains. In this tutorial, we’ll send AVAX tokens between the X-Chain and P-Chain.

Requirements

You've completed Getting Started and are familiar with Avalanche's architecture.

In order to send AVAX, you need to have some AVAX! You can get real AVAX by buying it on an exchange, or you can get testnet AVAX from the AVAX Test Faucet, which is a free and easy way to get to play around with Avalanche.

Transferring AVAX Using the Web Wallet

The easiest way to transfer AVAX between chains is to use the Avalanche Wallet, which is a non-custodial and secure way to access and move AVAX.

The Avalanche Wallet source code can be found here.

Step 1 - Open the Avalanche Wallet

Image for post

Select Access Wallet to enter your wallet. To connect the wallet to a network other than the main Avalanche network, select Mainnet and choose the network to connect to.

Step 2 - Log In to Your Wallet

You can access your wallet using the private key, mnemonic key phrase, keystore file or Ledger Nano S.

Image for post

After a successful login you will see your balance, assets portfolio and various other information.

Step 3 - Go to the Cross Chain Tab

Image for post

Functionality for transferring tokens between chains is on the Cross Chain tab.

Step 4 - Enter Amount to Transfer

You will be presented with a choice for Source Chain and Destination Chain. Select X-Chain and P-Chain, respectively. You will see your X and P balances, and an input field for entering the amount to transfer from source to destination chain.

Image for post

Enter the amount you wish to transfer from the X-Chain to the P-Chain.

Step 5 - Confirm the Transaction

Image for post

Press Confirm, and then Transfer to initiate the transfer.

Step 6 - Done!

A cross-chain transfer is a two step process: first a transaction to export the funds from the X-Chain, and another to import it to the P-Chain. The wallet will do both and show its the progress while doing so.

Image for post

That's it! You've transferred AVAX from the X-Chain to P-Chain! Now you can use them to validate or delegate on the Avalanche network.

Transfer from P-Chain to X-Chain

To return the AVAX back to the X-Chain, you need to do the transfer in the opposite direction.

Swap the source and destination chains by selecting them from the Source and Destination drop-down menu. The rest of the process is the same: enter the amount, confirm and transfer.

Now you can use the tokens on the P-Chain to add a node as a validator on the Primary Network.

For any additional questions, please visit our knowledge base or contact a support team member via the chat button at support.avax.network.

Chat with Ava Labs | Use Apps on Avalanche | Validate on Avalanche

Build on Avalanche

Did this answer your question?