Overpopulation and the Dinosaurs

Have you ever built a tower of cards? Probably not; you’re probably too young. It’s a super fun waste of time. If you’ve never done it, you should try it; you’ll hate it. Card towers are the most…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How can I access my cycles through Internet Computer apps that I use?

Compare the differences in experience between using a Cycles Wallet and Dank’s Cycles Token (XTC) for holding and accessing cycles on the Internet Computer.

Cycles Wallets and Dank’s Cycles Token (XTC) both address a similar issue: Internet Computer principal identifiers (the Internet Computer equivalent of a wallet address on Ethereum) can’t directly hold cycles, enforced by protocol design.

While both Cycles Wallets & XTC address the same problem (allowing IC users/principal IDs to hold and access cycles), their approaches to doing so, their user experiences, and the use cases they enable are quite different.

Let’s do a quick recap so you can find your best fit for navigating or developing on the Internet Computer.

A Cycles Wallet is a canister deployed to the Internet Computer for the sole purpose of holding cycles on behalf of a user (principal ID). Accessing cycles in a Cycles Wallet requires both a principal ID and a canister on the network where the cycle wallet can be deployed.

Dank provides different canister-based Open Internet Services for cycle-based financial services. The first of them is the Cycles Token (XTC), a cycles ledger canister that provides users with a “wrapped/tokenized” version of cycles (XTC) that also includes all the same developer features and functionality as the Cycles Wallet (but built into the XTC token itself)! Each XTC token represents and is backed 1-to-1 with 1 Trillion Cycles (1 XTC = 1 Trillion Cycles) that they can hold, utilize, pay for computation, and trade with just like with any other token, tied to their Principal ID (and only requiring a Principal ID 😎).

Think of a Cycles Wallet as a smart contract wallet/account on Ethereum, where on the other hand Dank’s Cycle Token (XTC) is like a token contract (with added functionality) facilitating users to seamlessly hold/access/transfer/use cycles.

You can access a Cycles Wallet via the command-line interface (dfx) or via the browser by visiting [canisterID.ic0.app]. In the future, IC apps could integrate Cycles Wallets through a UI to surface them in, for example, a browser wallet app experience that allows you to manage it in-browser.

Both require the specific IC app to support those options (eg. support Cycles Wallets, or support Dank, or both). The main difference is that:

With Cycles Wallets, before signing in (with Internet Identity or Plug or another auth provider), you will first need to enter your Cycles Wallet Canister ID each time you sign in (kinda like entering a password) so that when you do auth/sign in the app will know to authorize your Cycles Wallet canister ID and allow you to access it (and the cycles in it).

With XTC, all that is required is the one sign-in/auth step, and the user would have access to their cycles. The experience would be pretty much identical to the experience using an Ethereum Dapp today and accessing/using tokens.

The reason why XTC is able to avoid the second auth step is that instead of asking the user for their Wallet ID, the IC app would just authorize the XTC Token Canister ID for every user when they sign in (since that canister ID is always the same for all users). Therefore they don’t need to ask the user for their unique cycles wallet ID every time, and users can just have one Principal ID that carries all their assets. This creates a super seamless and familiar sign-in/auth/accessing tokens experience for users.

Since Principal ID’s cannot hold cycles on their own, the only way to send cycles to an IC Principal ID directly is to send the cycles to that Principal ID using Dank’s Cycle Token (XTC).

Otherwise, you would need to send the cycles to a Cycles Wallet that that user/Principal ID controls (the user would need to provide you with their Cycles Wallet Canister ID, and you could send them there).

One small advantage for XTC is that since the transfer of cycles happens entirely internally to the XTC Token Canister, sending cycles to a user via XTC would be cheaper than sending cycles to someone via cycles wallets.

On the other hand, the experience of sending cycles to a canister is somewhat similar for both Cycles Wallets and Dank’s Cycles Token (XTC).

When sending Cycles to a canister from a Cycles Wallet using the DFX CLI in the Canister SDK, using a simple deposit method: dfx canister — network ic deposit-cycles 1 bcf6w-tyaaa-aaaad-qabfq-cai

On XTC’s End, the process is as simple, with the user just having to make an abstracted call to XTC’s ledger canister methods, pointing to the destination canister and specifying the cycles amount to be withdrawn from their balance.

Add a comment

Related posts:

How to take title of an image and it set as a alt tag using Javascript?

You can take the title of an image and set it as the alt tag using JavaScript by first selecting the image and then accessing its title and alt attributes. This code uses the getElementById method to…