Skip to main content

Using a cycles management service

Beginner
Concept

Once a canister is deployed to the Internet Computer, the compute and storage it utilizes must be pre-paid. The process of burning ICP to obtain cycles and transferring them to a canister is referred to as "topping up" a canister.

Cycles management services provide canister monitoring and automated cycles top ups to ensure canister applications remain up and running and do not run out of cycles.

Instead of manually topping up a canister via dfx or scripting a custom solution, cycles management services provide tested top up automation and canister metric insights.

Popular cycles management services include:

  • CycleOps: Onchain, proactive, no-code canister monitoring with historical trend graphs, top up email notifications & downloadable transaction history.
  • TipJar: Donate cycles to your favorite canisters on the Internet Computer and keep them alive and healthy!
  • Canistergeek: Top up your canisters, monitor cycles, memory, and logs, and get your monthly reports in one place.

Cycles management libraries

Motoko

  • cycles-manager: Provides a simplified, permissioned cycles management framework for multi-canister applications (sponsored by CycleOps).
  • canistergeek-ic-motoko: An open-source Motoko tool for Internet Computer to track your project canisters cycles and memory status and collect log messages.

Rust

  • canfund: An open-source library for automated cycles management of canisters on the Internet Computer.
  • canistergeek_ic_rust: An open-source Rust tool for Internet Computer to track your project canisters cycles and memory status and collect log messages.

Creating custom autonomous top-up solutions

To create an autonomous canister that doesn't rely on a third-party service, you can create your own autonomous canister top-up solution. One option is to use a similar architecture implemented by CycleOps, where one canister acts as the cycles manager for the project and provides the API used to request more cycles when a canister within the project has its cycles balance dip below a preset threshold. Below is a sample code for this architecture, where 'CyclesManager' is the management canister and 'Child' is another canister in the project that requests cycles from the 'CyclesManager'.