In this article, we present our state-of-the-art implementation of the IOTA Smart Contract Protocol (ISCP), the first scalable, feeless and flexible implementation of smart contracts on the IOTA network. In this release, we share three Proof of Concept (PoC) smart contracts developed by the IOTA Foundation to demo the early capabilities of the platform. We are also making available a set of tools for developers to explore our smart contract functionality.
We are introducing IOTA Smart Contracts as a technological development, so we will concentrate on underlying technical concepts, architecture and properties.
We will expand the discussion in future posts to present specific use cases and the market potential of smart contracts and digital assets. We will continue to work on extended functionality and the stability of the software in the following months, making it fully mature for production and the needs of the market. For a primer on IOTA Smart Contracts, read our blog post introduction to IOTA Smart Contracts.
As of today, the IOTA Smart Contracts pre-alpha is available to try! Using an early set of building blocks, developers can begin to explore the capabilities of the IOTA Smart Contracts Protocol as we continue to build out the functionality for a full release in the months ahead.
For those of you that are just joining us, IOTA Smart Contracts are a flexible and feeless implementation of smart contract functionality on a distributed, DAG-based UTXO ledger. This is done by creating committees that verify smart contracts and guarantee their consistency and immutability on the IOTA distributed ledger.
Due to their feeless and flexible design, our smart contracts will be ideal for enterprise applications and real-world use cases by organizations all over the world — a big step forward for our industry. We also believe IOTA Smart Contracts Protocol lays the foundation for a rich ecosystem to be developed, with a large variety of the extensions and building blocks that we anticipate will be created by the community.
Several components are included in our first major release:
- Wasp node software version 0.0.1 (the early alpha release): please find the repository here. The Wasp node runs ISCP in the network of the Wasp nodes, a layer on top of the network of Goshimmer nodes. We also provide the Goshimmer node plugin WaspConn, which allows a Wasp node to connect with and run on the experimental Pollen network of Goshimmer nodes (see wasp branch of the Goshimmer repository).
- Three demo dApps, PoC smart contracts called TokenRegistry, FairAuction, and DonateWithFeedback. These simple dApps include smart contract programs hard-coded as Go modules in the Wasp node itself. Each PoC includes deployed demo instances of smart contracts on the Pollen network, their web dashboards, and wallets.
- CLI wallet wwallet. Like a usual IOTA wallet, wwallet (the Wasp Wallet) allows you to send and receive tokens in the Pollen network. Additionally, wwallet also allows users to request functions of the PoC smart contracts. For example, with wwallet you can mint digital assets while simultaneously registering them into the Token Registry smart contract in the same transaction. You also can sell minted digital assets by creating an auction in the Fair Auction smart contract and invite others to place bids in that auction from any network participant.
Also, as a part of wwallet we provide a simple admin tool to deploy your own instances of one of the three PoC smart contracts with committees of Wasp nodes and a web server for PoC smart contract dashboards.
In this release, we do not yet provide an important part of the ISCP: the Wasm VM (Virtual Machine) and Rust programming environment for smart contracts.
The Wasp node implements an abstract VM sandbox interface, so anyone interested can get acquainted with it and, if brave enough, even try it by forking the repository and writing your own hard-coded smart contracts right into the Wasp!
Some important features of ISCP are disabled, for example, the reward function (optional node fees, so the current smart contract is completely feeless) and the access node function (an access node is a Wasp node which contains a valid smart contract ledger state but does not participate in the committee of the smart contract).
Wasp APIs have no authorization implemented yet, so in this version, anybody can access the state of any smart contract or use any Wasp node as a committee node for their smart contract.
The missing functions and security holes will be step by step filled-in in subsequent versions of the Wasp node.
We provide articles in the Wasp repository on Github with a step-by-step introduction of the main concepts of IOTA Smart Contracts by using PoC smart contracts as examples.
These articles describe in detail three PoC smart contracts:
- Donate With Feedback implements a simple smart contract that handles donations and associated comments for a website. We introduce most of the concepts using Donate With Feedback as an example because this is the simplest of all 3 PoC smart contracts.
- TokenRegistry allows us to mint IOTA native assets and simultaneously assign them metadata in the same transaction. The TokenRegistry keeps the immutable registry of tokens and their metadata, together with cryptographic proofs of the originator of the supply and the amount of supply.
- Fair Auction implements a simple automated marketplace for IOTA native assets to be for sale via an auction. Anyone can sell their token and anyone can bid on the token for sale with their iotas by sending requests to the smart contract instance. Each auction is handled by the smart contract. Once started, it is guaranteed it will go to the end while being fair and auditable.
The dashboards of demo instances of PoC smart contracts can be found here.
Each page of the dashboard contains minimal instructions about how to install and use wwallet.
We have also developed a few technical tutorials to walk through some of the features in this release, as well as help developers get started testing it out. Watch our Proof of Concept Demonstration video and start exploring our platform!
The next big milestone for the team working with IOTA Smart Contracts is implementing Wasm VM and the corresponding development environment in Rust. We anticipate that it will be available by the end of the year.
Additionally, a high-level plan of future scope includes:
- Maturation of core protocols: perfecting consensus, access node functions, node rewards, state snapshots, Smart Contract administration.
- Adjusting based on ongoing developments of the Goshimmer Value Tangle ledger;
- Core security adjustments: Fully distributed DKG (in this release it is partially distributed), digital identity system for nodes, node owners and smart contract owners.
- Authentication of API access, security, client libraries.
- Expanding built-in Smart Contract logic i.e. automatic return of funds in case of error, advanced exception handling,
- Migration of built-in logic to Wasm VM.
- Toolchain for node and Smart Contract administration (CLI tools, dashboard, backup/recovery).
- Toolchain and environment for development. High-level language metaphors, mapping to multiple languages.
- Framework for client libraries for dApp APIs. Framework for SC unit testing and tools.
The Pre-Alpha work of the IOTA Smart Contract Protocol released today is the culmination of months of hard and dedicated work by the IOTA Foundation. We consider this release to be the first step in the creation of a large, vibrant ecosystem of decentralized applications on the IOTA network.
We invite our members of the community to try out our demo PoCs, review the documentation, and even attempt to build your own!
As always, we welcome everyone to stop by on Discord on the #smartcontracts channel to talk with our team working with IOTA Smart Contracts!
Follow us on Twitter to keep track of all the latest news!
This article has been updated to replace references to "colored tokens" with "native assets"