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 the 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.
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
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.
After a successful login, you will see your balance, assets portfolio, and various other information.
Step 3 - Go to the Cross Chain Tab
The functionality for transferring tokens between chains is on the Cross Chain tab.
Step 4 - Enter the 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 the source to the destination chain.
Enter the amount you wish to transfer from the X-Chain to the P-Chain.
Step 5 - Confirm the Transaction
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.
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.
For any additional questions, please view our other knowledge base articles or contact a support team member via the chat button.