Skip to main content

Converting ICP tokens into cycles

Beginner
Tutorial

Overview

To convert ICP tokens into cycles, you first need to obtain some ICP and transfer to the right account. You can get ICP tokens on exchanges, or ask someone you know to send you some. To figure out which account to transfer the ICP tokens to, run the following:

dfx ledger account-id

This will display your account number on the ICP ledger. It looks similar to this:

e213184a548871a47fb526f3cba24e2ee2fbbc8129c4ab497ef2ce535130a0a4

Obtaining tokens

There are a few different ways you might acquire ICP tokens. For example, you might:

  • Purchase ICP tokens directly through an exchange that lists ICP tokens available for trade. To see all available places to purchase ICP tokens, check out this page.

  • Receive tokens as rewards for participating in the governance of the Internet Computer.

  • Receive a grant of tokens through the Internet Computer Association (ICA) or the DFINITY Foundation.

  • Receive tokens as remuneration for providing computing capacity as a node provider.

$5-$10 USD worth of tokens should be enough to get started. Depending on your workflows and use-case, you may need more.

Checking the balance

Once you have obtained some ICP tokens into your ICP ledger account, you can see the balance using this command:

dfx ledger --network ic balance

This will output something like this:

12.49840000 ICP

Convert ICP to cycles

With those ICP tokens ready, you can now convert them into cycles using the following command:

dfx cycles convert AMOUNT --network ic

This workflow utilizes the cycles ledger feature. If you'd like to use the cycles wallet instead, view the cycles wallet documentation.

Please note that the cycles wallet will be removed from dfx in a future release.

Then, check the cycles balance with the command:

dfx cycles balance --network ic

This should print something looking like this:

6.951 TC (trillion cycles).