paint-brush
The Interaction State Machine (ISM): Powering the World’s First Context-Aware Blockchainby@lumoslabshq
264 reads

The Interaction State Machine (ISM): Powering the World’s First Context-Aware Blockchain

by Lumos LabsAugust 30th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This blog post describes the underlying Interaction State Machine (ISM) technology that powers the MOI blockchain
featured image - The Interaction State Machine (ISM): Powering the World’s First Context-Aware Blockchain
Lumos Labs HackerNoon profile picture


If there are challenges that have slowed Web3 adoption in recent times, the need for greater scalability and interoperability tops that list.



Source: Dealroom



Literally, every blockchain attempts to address this in different ways, be it through adopting a variety of technologies such as roll-ups, sidechains, ‘efficient’ consensus mechanisms, and bridges that will aid in the effort of speeding up transaction processing and building a blockchain of blockchains.


But how does this benefit users? Very little, thanks to the programmatic approach taken to manage the state, which has led to the aforementioned limitations.


Personalizing User Engagement with the Blockchain: A New Approach

After all, one cannot ignore the growing importance of building a compelling and unique presence in the digital world as well as the heightened level of interactivity that occurs among users.


Source: History Computer



As you might already know, we don’t just use the internet to locate or send information anymore. With Web 2.0, the internet caters to literally every need of ours. Yet today's blockchains ignore this aspect and remain focused on handling values and states for nodes and apps.


It’s time for a new approach, taking into consideration the distinct ‘values’ that people bring to a blockchain network of their choice. Simply put, this approach intends to mirror this changing trend where digital interactions resemble human ones.



Source: Bot Penguin



A paradigm shift where context matters just as much as content, if you will. Where just a person’s identity isn’t important but their user behavior and preferences as well. Yes, a shift promoted by Interaction State Machine (ISM) technology.


But before we explore this technology, let’s differentiate between traditional blockchains and ISM-based blockchains so as to understand why ISM can make a real difference in the world of blockchain technology.


Traditional vs. ISM-based Blockchains

So, how do traditional blockchains measure up to ISM-based blockchains?


Quite simply, traditional blockchains take a programmatic, cryptocurrency transaction-focused, and app-centric approach. Apart from not being ideal for users, this has only brought to light further limitations that restrict mainstream adoption as discussed earlier. However, ISM technology can bring about the aforementioned paradigm shift, thanks to the following differences.


Here’s a comparison table that provides a high-level summary that differentiates between the two approaches:

TRADITIONAL

ISM-BASED

System Centric and App focus

Participant-centric and P2P focus

The nodes in the blockchain network manage trust

Trust is handled by the context of the participants in the network

Objects are local, without any associated deterministic network state information

Objects, being part of the network, have associated network state information

Network optimization is not a priority, so  throughput and scalability is limited

Network optimization is a reality, with linear scalability and unlimited throughput as benefits


Until now, there’s only one blockchain that has implemented ISM technology successfully: the MOI blockchain.


A Short Note on MOI

MOI moves from an app-centric approach to a participant-centric one. Not only that, it’s the only blockchain that takes the context just as seriously as the content, and which is based on one’s engagement with the platform.


Some of the components that comprise the MOI blockchain are shown below:


Source: MOI


Even if these components aren’t very different from traditional blockchains, a number of these technologies all take context into account while others are clear improvements on existing technologies used to build a blockchain.


For example, the MDAG data structure not only supports state management at the participant level but also at the network level, with light-speed finality. As for its consensus mechanism, taking a proof-of-context approach, built based on its revolutionary participant-centric ordering mechanism (KRAMA), ensures the removal of central bottlenecks while offering light-speed global finality and hyper consensus.


Source: Analytics Vidhya


Clearly, these benefits are best described as what is most needed to revolutionize the proverbial bottleneck that most blockchains find themselves grappling with while decentralized applications on these networks bear the brunt of this limitation.


This brings us to ISM: the technology that is at the core of this new approach of being participant-centric and completely p2p. A technology where all components of a value transfer namely data management, execution, and consensus all work at a true p2p level.


Your First Look at the Interaction State Machine

Defined as state management technology for p2p computing, the Interaction State Machine (ISM) serves as an implementation of the “contextual compute” model. Simply put, this technology drives the participant-centric and context-based approach that the MOI blockchain is recognized for.


As evident from the diagram below, the IFP/CP networking protocol implements ISM across the MOI blockchain so as to handle p2p value management.


Source: MOI



As represented by the diagram below, this technology manages the content - the value - as well as the context in a ContextObject while also maintaining a Context Super State that keeps track of the most recent changes in the context state of a participant.


Simply put, all types of context objects owned by the participant are handled by this composite state vector. As with other blockchains, KRAMA serves as the consensus mechanism so as to gain agreement across the network.



Source: MOI



Now that we’ve understood how ISM works from the ground up in managing the content of interactions and participant context, let’s quickly examine an MOI smart contract as written in the smart contract language called Coco.


Your First Look at MOI Logic

People who know what smart contracts are, as in the context of Ethereum, will know that these units of code hold state and perform operations. For example, user transactions are made by invoking functions whose visibility is made public by the smart contract developer. If you’ve seen a Solidity smart contract, you’d also know that user accounts and the cryptocurrency amounts processed are examples of states that are held in the smart contract.


Source: Shrimpy Academy



MOI, with its variant of a smart contract called Logic, does things a bit differently. By giving participants greater control over their Assets, all it takes is Logic to interact and transfer value between two participants. This type of logic is implemented in such a way that the code and state are split into separate layers, protecting participants from hacks that have become commonplace in Web3. This is because it is impossible for hackers to gain access to the Assets stored in every participant’s account that has interacted using said Logic. One must also keep in mind that when initiating these interactions, fees will have to be paid using the MOI token or MUSD stablecoin. In addition to asset-based Logic, MOI implements two other types of logic: stateful and stateless.



Source: Cocolang



Now while users can initiate many Interactions without any programming knowledge, developers can write out implementations using Cocolang: the world’s first context-oriented language specifically built for native asset management using a p2p computation model.


Here’s an example of how an MOI logic in Cocolang holds persistent ‘state’, by declaring variable names with specific data types and structures:



Also, here’s the syntax of a ‘function’ in an MOI logic, where a voter can be registered by providing all fields in the voter class:





As one can tell, unless specified by the developer, functions cannot be invoked by users. This goes for variables that are immutable by default. As one can tell, this language gives importance to safety and readability with specific safeguards that eliminate common coding errors made by developers.



Interested in MOI? Here’s how you can get started…


Now, for interested blockchain developers who are looking to build on MOI, you can also check out the MOI JavaScript SDK or the Voyage Blockchain Explorer. If you must know, harnessing the functionality of VARNA - MOI’s native toolchain for application devs - will be integral to your success.


Find out more about how MOI works by following this link.