cycles-management
Cycles & Canister Management
What This Is
Cycles are the computation fuel for canisters on Internet Computer. Every canister operation (execution, storage, messaging) burns cycles. When a canister runs out of cycles, it freezes and eventually gets deleted. 1 trillion cycles (1T) costs approximately 1 USD equivalent in ICP (the exact rate is set by the NNS and fluctuates with ICP price via the CMC).
Note: icp-cli uses the cycles ledger (um5iw-rqaaa-aaaaq-qaaba-cai) by default. The cycles ledger is a single canister that tracks cycle balances for all principals, similar to a token ledger. Commands like icp cycles balance, icp cycles mint, and icp canister top-up go through the cycles ledger. There is no legacy wallet concept in icp-cli. The programmatic patterns below (accepting cycles, creating canisters via management canister) remain the same regardless of which funding mechanism is used.
Prerequisites
- For Motoko:
mopspackage manager,core = "2.0.0"in mops.toml - For Rust:
ic-cdk >= 0.19
Canister IDs
| Service | Canister ID | Purpose |
|---|---|---|
| Cycles Minting Canister (CMC) | rkp4c-7iaaa-aaaaa-aaaca-cai |
Converts ICP to cycles, creates canisters |
| Cycles Ledger | um5iw-rqaaa-aaaaq-qaaba-cai |
Tracks cycle balances for all principals |
| Management Canister | aaaaa-aa |
Canister lifecycle (create, install, stop, delete, status) |