
On Internet computers, developers can create decentralized applications using smart contracts in the form of containers, which are smart contracts compiled into Wasm modules and then deployed on Internet computers.
When a container is deployed on the main Internet computer network, the container utilizes resources such as memory, storage, and computing power provided by the subnet to which the container is deployed.
On other chains like Ethereum, the gas cost of transactions is paid by the end user when they interact with and use the dApp. For dApps like social media or web platforms, this means that simple things like following other users or liking their posts require paying gas fees, which can become expensive for end users and lead to barriers to user adoption.
On the Internet Computer, developers pay gas fees to cover the resources used by the containers running their dApps. This gas-inverse model not only eliminates expensive barriers to entry, but also gives developers the flexibility to implement their own token economic models to achieve mass adoption. Cycles are required to pay for the use of these resources.
What are Cycles?
Cycles are a form of currency used only to pay for the container’s resources. They can be obtained by burning ICP tokens or through ICP developer grants and bounty rewards. One ICP token can be destroyed in exchange for 2.45 trillion Cycles. ICP tokens can be destroyed in exchange for Cycles through IC NNS or through platforms such as ICPSwap and Sonic.
Cycles are priced in XDR, a complementary foreign exchange asset defined and maintained by the International Monetary Fund. One trillion Cycles always equals 1 XDR, regardless of the current price of ICP. This makes the cost of compute and storage predictable and stable, allowing developers to budget appropriately.
For example, deploying a container on the IC mainnet on a 13-node subnet will cost 100,000,000 Cycles (or $0.130886) and 261,538,461 Cycles or $0.342317 for 13-node and 34-node subnets respectively.
For transactions, the cost is even cheaper, with update calls costing 590,000 Cycles or $0.0000007722274 and 1,543,076 Cycles or $0.0000020196705 for 13-node and 34-node subnets, respectively. For local development, divide the 13-node subnet cost by 13. For example, creating a container locally will cost 7,692,307 Cycles.
Overall, the total cost per instruction on the Internet Computer is $0.000000000000536, which is 44,760,000 times cheaper than Ethereum (which costs $0.00024 per instruction).
For developers new to the Internet Computer, there is a voucher for 20 trillion free Cycles available, and later in this blog post we will walk through how to get this voucher.
These free 20T Cycles can be used (on a 13-node subnet):
Create 20 containers deployed on mainnet, or
Send 3,389,830 update calls, or
Storing 1 GiB of data for 182.26 days
To learn more about Gas and Cycles costs, see the documentation here:
internetcomputer.org/docs/current/developer-docs/gas-cost
Cycles Wallet
Developers can manage their Cycles through a special container called a Cycles wallet. Since the user's delegate cannot directly save Cycles, only the container can, the Cycles wallet container is used to save Cycles.
Then, when the container needs to use Cycles stored in the wallet, the principal of the Cycles wallet will be used, not your user principal. Recall that the principal is an entity that can be authenticated by the IC.
When you call a container method, you may need to attach Cycles to the call in order for it to execute. If the container itself does not have enough Cycles, or a new container is being created, then you will need to proxy the call through the Cycles wallet to attach the required Cycles.
To ensure that the container has enough Cycles, you need to deposit Cycles into the Cycles balance of the container, a process called "topping up" the container.
When creating a project using the command dfx new , the IC SDK will automatically create a default Cycles wallet as part of the new project template, with native operations performed using Cycles done in the background.
In a production environment involving containers deployed on mainnet, containers need to explicitly register and transfer cycles to them, and production containers also need to configure principals to act as custodians, who have the rights to send and receive cycles to the container.
To get Cycles from the Free Cycles Coupon, first you need a Cycles wallet and developer status.
Create a developer identity
First, make sure you have downloaded and installed the IC SDK, which includes dfx, a command-line tool for deploying and interacting with IC containers from the command line.
Let’s create a new identity principal using dfx which we will use to obtain Cycles and deploy the Cycles wallet.
First, make sure 'dfx' is running, if not, start it with the following command:

Next we will create a new developer identity with the following command:

This command will return a seed phrase that you will need to recover your identity if you ever need it. This seed phrase should be backed up so that any Cycles associated with your identity are not lost.
You can then set this identity to be used in the current terminal session dfx with the following command:

You can get the principal ID for this identity using the following command:

The body will resemble the following format:

Get your free Cycles coupon
If you are a new developer in IC, you can apply for a Free Cycles Coupon which can be redeemed for 20T Free Cycles to help you get started, let’s see how to get it.
First, navigate to the website:
faucet.dfinity.org
To obtain a coupon code for use with the Cycle faucet, you will need to submit a written coupon request via the official DFINITY Developer Discord server:
discord.com/invite/jnjVVQaE2C
Click the REQUEST CYCLES button on the faucet webpage to join the Discord server:

Once in the Discord server, navigate to the #cycles-faucet channel:

In this channel, execute the following slash command:

This command will invoke the IC Cycles Faucet Bot.
Please make sure your Discord settings are set to allow other users to send direct messages, if you do not have this setting enabled you will not receive direct messages from faucet bots.
Once the survey is completed, our team will review your submission and if accepted, the Faucet Bot will send you a private message with your coupon code.
Then, return to the faucet.dfinity.org webpage and click Next to continue.
Now that you have your coupon code, enter your coupon code in the tap UI.

Click Next to continue, then back in the Terminal window, if you closed the window during this process, run the following command to start dfx and use the identity you created earlier:

Then, redeem the coupon using the following command:

This should return an output showing that you have 20T Cycles in your wallet. To get the container identifier for your new Cycles wallet, run the following command:

The output of this command should be similar to the following:

Now you have 20T free Cycles available for dApp deployment!
Remember, Cycles are valuable and required to deploy containers on mainnet!
Please make sure to back up your identity file in case of computer data loss, you can find your identity file in the path "~/.config/dfx/identity/<identity_name>/identity.pem".
Summary
In this blog post, we looked at how Cycles can be used to pay for resources used by containers on the Internet Computer Mainnet network, and that Cycles are stored in containers called Cycles Wallets, and then we explored how to use the DFINITY Cycles Faucet to get free Cycles coupons that can be redeemed for 20T Cycles.
Start building:

Follow the technical development of the Internet Computer: @DFINITYDev, and join the developer community: forum.dfinity.org.

IC content you care about
Technology Progress | Project Information | Global Activities

Collect and follow IC Binance Channel
Get the latest news

