Tokens & cycles
For ICP developers, there are two important tokens:
The ICP token is the protocol’s native utility token, which can be purchased and traded on various exchanges. It plays a key role in the governance and economics of the network.
Cycles are used to pay for resource and service consumption, comparable to gas on Ethereum. The price of cycles is pegged to XDR, a group of fiat currencies, where 1 trillion (T) cycles equals 1 XDR (1 XDR is around 1.3 USD as of early 2025).
ICP tokens can be converted to cycles, which are then used to cover the cost of running an application.
Note, ICP supports creating and deploying custom fungible or non-fungible tokens through the ICRC standards.
Canister resource consumption
Canisters require resources like storage, compute, and network bandwidth. When a canister is deployed to the mainnet, it utilizes the resources provided by the network's nodes. Canisters are charged for the resources they use, calls they send, and any operations they perform using specialized features such as HTTPS outcalls, threshold signatures, and the Bitcoin integration API. Each type of canister operation and resource has a different cost associated with it, and costs linearly scale with the number of nodes in the subnet.
A canister pays for consumed resources by burning cycles. It's the developer's responsibility to load each of their canisters with adequate amounts of cycles, though anyone can send cycles to any canister. This cost model is known as ICP's reverse gas model.
Local and playground deployments
Canisters deployed locally are limited to the resources provided by your local machine. Local deployments use fabricated cycles generated by dfx
.
Canisters deployed with the playground option (see quickstart), are deployed to a pool of DFINITY-managed canisters that are recycled every 20 minutes. Similar to a testnet, this allows developers to quickly deploy their first canister smart contract without needing to acquire ICP tokens and convert them to cycles. Since deploying to the playground is free, there are limitations on the resources that can be used and the features that are available to canisters.
What is a ledger?
A ledger is a system canister that stores token balances and transactions for a set of accounts. Each token has its own ledger, such as the ICP token ledger and the cycles ledger.
Obtaining cycles
You need to obtain ICP tokens, then convert them into cycles using dfx
. However, when participating at DFINITY events like hackathons, you can receive a coupon that you can redeem to claim free cycles from the cycles faucet.
Before obtaining cycles, you need a developer identity. Each developer identity has a principal and a ledger account identifier.
A principal has the format itk7v-ihlxk-ktdrh-fcnst-vkoou-orj77-52ogl-jqwj5-zpfdv-az3lr-xqe
and is used for canister ownership, management, and holding cycles.
A ledger account identifier has the format e213184a548871a47fb526f3cba24e2ee2fbbc8129c4ab497ef2ce535130a0a4
and is used to send and receive tokens like ICP.
Step 1: Get your account's ledger account ID.
dfx ledger account-id
Output
b0d7beee54be8679a42e999218a16a0d396f223d7e44d259ac089848c1b820bf
Step 2: Send ICP tokens to this ledger account ID.
You can obtain ICP tokens from an exchange. If you are using an exchange, initiate a withdrawal transaction, then enter the ledger account ID as the "destination" address to send ICP tokens to.
Step 3: Check the ICP balance.
dfx ledger balance --network=ic
Output
2.00000000 ICP
Step 4: Convert ICP into cycles.
Because resource consumption is accounted for at a fine-grained level, a single cycle corresponds to a very small amount of money. As a result, developers deal with large amounts of cycles when topping up their canisters, usually operating with trillions (T) of cycles. Since cycles are pegged to XDR, 1 T cycles will remain stable at about 1.3 USD.
Replace AMOUNT
with the number of ICP tokens you want to convert into cycles:
dfx cycles convert --amount AMOUNT --network=ic
Output
Transfer sent at block height 16146446
Using transfer at block height 16146446
Account was topped up with 6_229_700_000_000 cycles! New balance is 6_229_600_000_000 cycles.
This command must be run with the --network=ic
flag because cycles are fabricated during local development.
Calculating how many cycles you need
Cycles are charged for storage, compute, update messages, special features, and more. To get an approximation, you can view the detailed cycles cost table or use the cycles pricing calculator.
Step 5: Confirm the cycles balance.
dfx cycles balance --network=ic
Output
6.230 TC (trillion cycles).