Canisters- the Super-powered SmartContracts on ICP

Shruti Sutwala
Coinmonks
5 min readJun 16, 2022

--

As a non technical user of technology, sometimes it feels like a lot of technological terminology is coined to make it difficult to comprehend, especially when it comes to common use terms — like “cookies”, “cloud”, “firewalls”.Overtime they become common, however managing to understand “cookies” that stay in a browser is something that takes time. In the blockchain world, a whole new list of terminologies like “Smart Contracts” & “DeFi” are being coined which could be a challenge to comprehend.

Here we talk about a new term “Canisters” coined by the Internet Computer (IC). IC is the world’s first web-speed, internet-scale public blockchain which is poised to change the way internet works by making all kinds of applications as we know decentralised & user controlled. This is made possible by something known as canister smart contracts.

A quick look at what are “Smart Contracts” :

Smart Contracts are like real world contracts between buyers and sellers, however, instead of an intermediary authorising the contract, they are self executing contracts written in code, distributed and decentralized on a blockchain network

What are Canisters?

A Canister is a super powered Smart Contract that does many more things, they are computational units that consist of both code and data. A canister can be deployed on the Internet Computer and accessed over the internet. In the technical language, it’s the state, the storage, the memory for IC applications. For easier visualization, it’s like a real canister that holds all the elements required to run a scalable web3 application.

How is it different than a traditional smart contract?

In contrast to smart contracts, canisters have performance characteristics that makes it possible to use them to build software services that scale. A key difference between smart contracts deployed on the Internet Computer and on a traditional blockchain is how data from smart contracts can be verified. The Internet Computer is powered by Chain Key Cryptography which allows the smart contract to be verified on ‘subnets’ which gives it clear scalability advantages over smart contracts running on traditional blockchains, where the entire blockchain from Genesis is needed to verify the current state of affairs.

Canisters — beyond just Smart Contracts

As explained by By Johan Granström, Director of Engineering, DFINITYthere several analogies to canisters depending on how you look at them, and thereby their applications beyond Smart Contracts.

Canisters as storage units

Canisters are the base building block on ICP. Data is directly stored and read from the canisters. It’s very similar to the way data sits in memory on a local machine while a program runs and can be thought of in exactly the same way. It is possible to build out any storage setup using one or many canisters that can easily talk to each other.

Some on-chain infrastructure dApps using canisters as storage units are Fleek & IC Drive

Canisters as on-chain processes

A process on an operating system like Linux, MacOS, or Windows essentially performs functions like making payments, manage permissions etc. A canister is much like a process in an operating system on a blockchain to allow processes like making payments, creating and managing canisters, managing permissions etc to execute directly on the blockchain, which makes them distributed making them crash resistant unlike traditional processes.

Defi & Utility dApps likeInfinity Swap & Content Fly are utilising this feature to allow on-chain bridge-less transactions

Canisters as “actors” to send & receive messages

Amongst other things canisters have the ability to communicate with other canisters & to create new canisters. Canisters have the ability to send & receive bidirectional messages i.e. both requests and responses. Combined with the fact that Internet Computer executes a massive number of canisters in parallel in milliseconds, this helps overcome the performance limitations of smart contracts.

Social media dApps like dscvr & Openchat use it to scale up their social media platforms which are able to run at webspeed

Canisters can be coded in any WebAssembly Language

Canisters can be written in any language that can compile to WebAssembly (e.g. Motoko, Rust), and canisters written in different languages are fully interoperable. This makes it easy for developers comfortable in different environments to build on the IC.

Using this capability, Demergent Labs is building tools for building TypeScript, GraphQL, and Python for the Internet Computer

Canisters as Identities and authentication

Canisters have an explicitly registered identity on the Internet Computer. The Internet Computer authenticates the user and passes the principal id to the canister — the canister may choose to implement whatever authorization policies it wants based on principals.

This enables password-less identity authentication on the IC using the Internet Identity (II) The same II is then used to authorise wallets like Plug & Stoic.

The Internet Computer drastically simplifies the experience of writing and deploying code on one hand, and offers the possibility of real decentralization that can be scaled up because of Canisters. Get started & build on the Internet Computer using canisters by clicking here.

To see the live activity of the number of Canisters deployed on the Internet Computer have a look at the IC Dashboard . The activity is increasing every day and has doubled during the last three month as of May 2022.

https://dashboard.internetcomputer.org/

So, why live in the world of restricted possibilities of traditional smart contracts when one can unleash the power of super-powered Canister smart contracts! That too 100% on chain.

Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing

Also, Read

--

--

Shruti Sutwala
Coinmonks

Marketer turner entrepreneur & crypto investor. Un-layering The Internet Computer (ICP)