For all the negatives we see in the crypto space, one thing we have to admit is that the pace of innovation over here is unlike anything else.
For the most part, this innovation has been on the infrastructure front. Everyone has been trying to figure out how to make blockchains more scalable for mass adoption while maintaining decentralization and security standards.
Now we can say we are close to reaching the point of truly scalable chains.
With all this innovation on the protocol level, one area in which we haven’t seen much innovation is smart contracts.
Since Ethereum introduced smart contracts, everyone has marveled at the possibility of creating programmable applications that reside on the blockchain.
This gave birth to the next adoption wave of blockchains, in which a bunch of different on-chain applications were attempted.
Granted, a lot of them were experimental and ultimately failed, but products like Uniswap, Yearn, and AAVE (amongst others) that succeeded taught us a lot about the limits of traditional smart contracts.
Since then, no real strides have been made in improving smart contracts as a technology. Given their importance in our ecosystem, it seems a little shocking that nothing has changed.
Well, things are changing now, and today’s discourse is about kickstarting the next adoption wave of crypto by making smart contracts significantly smarter.
So, without further ado, allow me to walk you through the Intelligent Blockchain GenLayer.
What is GenLayer?
GenLayer is a Layer 1 blockchain (sort of). Of course, it has other differentiators with its architecture, consensus mechanism, and other technical details, but by far, the most important differentiator is that it replaces traditional smart contracts with AI-powered smart contracts called Intelligent Contracts.
The intersection between crypto and AI has been one of the hottest topics in the industry this year. With the rapid growth of AI as a sector, people often allude to the dystopian future that an AI-centric society could have.
However, it is only dystopian if a few centralized entities control the majority of AI technology. If you decentralize its research, distribution, and execution, AI has the power to be truly transformative without being as dystopian as people seem to believe it will be.
With the initial AI-hype scam tokens now fading away, we are starting to see real projects, like GenLayer, using AI to improve and enhance crypto technology. The first improvement is intelligent contracts.
What are Intelligent Contracts?
Intelligent contracts are like smart contracts, but they are truly smart. Powered by AI, they can process both code and natural language, make subjective decisions, and access the Internet without oracles or humans in the loop.
To really break down what that means, let’s understand traditional smart contracts and their shortcomings.
Smart contracts can only access blockchain data and execute predefined actions on the blockchain. To access external data for more complex actions, oracles are required, which introduces another element of complexity and security risk.
Additionally, traditional smart contracts require a developer to be well-versed in a specific coding language, like Solidity. Then, they code the contract in that language, and the contract will only execute the commands defined in that piece of code.
All of this means that traditional smart contracts are limited in capability, lack flexibility, aren’t very developer-friendly, and have no access to real-world data.
Intelligent contracts, on the other hand, improve upon smart contracts as a whole to make them significantly more powerful.
Think of it like this.
A smart contract is like a vending machine. You insert a coin (input), select a product (action), and the machine gives you the item (output) based on predefined rules.
There is nothing wrong with this, but it also means that the vending machine can only follow the programmed instructions.
It cannot adapt to new requests, provide different outputs, or access external information to make changes. It can only change by adding another component (e.g., a person restocking).
An intelligent contract is more like a personal assistant.
It can understand and execute tasks based on your spoken instructions (natural language processing) and access the internet for real-time data gathering. This way, unlike a vending machine, it can adapt to new instructions and give different outputs beyond the initial predefined instructions.
Sticking with this vending machine analogy, let’s try to understand the dynamism of intelligent contracts.
A regular vending machine (smart contract) is static. If you give it input A, it will always give you output B. However, if we use the personal assistant vending machine (intelligent contracts), it can process external data (from the internet, for example) and adapt to it.
So, in this instance, input A doesn’t always have to give you output B. It can give you output C because maybe a change in the price caused the intelligent contract to adapt.
It can handle complex transactions, learn from interactions, and make decisions based on data and context. Compared to older boring chains, it is a more dynamic solution that can adapt to future happenings.
Intelligent contracts are coded in Python, one of the most popular coding languages, but it is easy to create a Python wrapper that allows people to use different languages if necessary.
So now you understand how GenLayer is revolutionizing smart contracts, but what about the underlying blockchain?
How does it reach consensus? And is it scalable?
Optimistic Democracy
The consensus mechanism used by GenLayer is called Optimistic Democracy.
Bit of a switch from the classic ‘proof of xyz’, and honestly, I’m a fan of this change. The ‘proof of’ stuff is just a bit daunting, innit.
But I digress.
The main goal of this Optimistic Democracy consensus is to ensure that all network outcomes are reliable and secure.
You see, blockchains are deterministic by nature. This means they will always produce the same output for a given input and involve no randomness. So, responding to the complexities of the real world is impossible for traditional blockchains.
Blockchains must be non-deterministic, and intelligent contracts enable them to become non-deterministic. Creating sophisticated applications will require interactions with the real, non-deterministic world, leading to varied inputs and outputs.
Using LLMs in the infrastructure will naturally lead to non-determinism because they are probabilistic and will give different outputs even on the exact same inputs.
Therefore, for GenLayer to function smoothly, it needs an execution environment built to handle non-determinism. This is where the GenVM and the Optimistic Democracy come in to optimize for security and reliability of outcomes.
At the heart of the consensus mechanism is something called the equivalence principle.
Put simply, the equivalence principle allows outcomes from different sources, such as LLMs or web data, to vary yet still be considered equal as long as they meet certain predefined standards of the intelligent contract.
This principle helps minimize manipulations or errors, but more importantly, it plays an important role in how validators assess and agree on the outcomes proposed by the leader of a validator set.
It’s designed to ensure that validators can agree on what is equal in terms of output to non-deterministic inputs.
Speaking of which, let’s jump into how the actual flow of Optimistic Democracy works.
The setup is similar to the PoS or DPoS chains that some of you may be familiar with, but nonetheless, let’s walk through the process.
There are three main components:
- Validators - Stake GEN tokens to become a validator
- Delegators - Delegate delegate to validators
- Leader selection - The process of randomly selecting a leader from a group of validators assigned to a transaction
A user submits a transaction on the GenLayer network.
Once this is done, a small group of validators are randomly selected to validate the transaction.
One person is selected as the leader of this group. The leader executes the transaction while the others assess the leader's proposal using the equivalence principle.
The validator group is always an odd number, so a majority to approve transactions is always reached. If a majority of the validators agree on the leader's proposal, the transaction is approved provisionally.
It is only provisional because of something called the finality window. In this finality window, appeals can be made on the approved transaction.
Suppose a participant believes that the approved transaction is faulty or fraudulent. They can post a bond and initiate an appeal.
When this happens, a new group of validators is assigned to the transaction by being added to the initial validator set. Basically, in each round, a new leader is selected, and the number of non-leader validators is doubled.
Since this new process includes the new group plus the original group, there are more validators and more validators mean a higher chance of an accurate decision.
This also means that each round has sufficient validators to overturn the decision and reach full finality.
If, after this, the appealing party is still not satisfied, the process continues over multiple rounds until a decision is reached.
Once a decision is made, the final transaction is recorded and added to the blockchain. The winning appealing party receives a reward for their extra work, but if the appellant is wrong, they lose the bond they posted.
You now understand the backbone of the GenLayer infrastructurally, but what about the stuff that can be built on it?
What are the use cases for GenLayer?
What type of applications can an intelligent blockchain enable that may be difficult to execute on monolithic blockchains?
Well, there are plenty.
AI-powered DAOs
As we all know, DAOs are very important, but the current iteration of DAOs is inefficient and uninspiring.
With GenLayer, a new era of AI-powered DAOs can be ushered in.
DAOs can have a set constitution allowing only proposals that align with this mission. Furthermore, things like bounties, evaluating grant proposals, and resource allocation can be automated and always designed in line with the Constitution.
All in all, there are a lot of possibilities for improving DAOs.
Information gathering and verification
Intelligent contracts can be designed to reward proposers that gather and verify any kind of information on any topic allowing GenLayer to host a world database of sorts.
Furthermore, things like on-chain identity verification can also become much easier. Suppose you want to check if an on-chain account has posted the correct message on their off-chain social media for a quest or something similar.
GenLayer makes this much easier and quicker.
Prediction markets
Prediction markets are very hot in crypto right now. The issue is that any on-chain implementation relies heavily on oracles like UMA, which need a lot of human stakers to resolve a bet since the number of real-world events is infinite.
With GenLayer, the network replaces the oracle, making creating a prediction market much easier, safer, and more efficient.
Adaptable DeFi
DeFi protocols need to react to new data and external factors constantly. Intelligent contracts can be made that track relevant external data.
This way, the contract can be configured to automatically change protocol parameters based on this external data. For example, a protocol's fees or liquidation thresholds can adapt to external factors like liquidity changes.
A similar sort of intelligent contract can be configured for automated reactions to potential hacks/exploits.
Undercollateralized lending
Another major issue in crypto has been lending. Over-collateralized lending is the norm, but it is inefficient and not attractive to most people.
Most people are looking for undercollateralized lending like in the real world. Unfortunately, figuring out fully on-chain undercollateralized lending is proving to be very difficult.
With intelligent contracts being able to access data from the web, it becomes much easier to link someone's off-chain identity to their on-chain account, which makes under-collateralized lending much easier and safer to do on-chain.
Others
These are just a few potential use cases off the top of my head.
But as you already know, intelligent contracts can be configured purely text-based. This means even non-coders can configure contracts and create protocols. This means the possibilities of what gets made on GenLayer are potentially endless.
I expect many unexpected, unique products to come out of GenLayer.
Concluding thoughts
The cross-section between AI and crypto is just getting started. GenLayer is a frontrunner in showing us how to effectively wield a technology like AI and use it to actually improve current crypto technology.
Improving smart contracts is a bold and necessary move. Smart contracts are, in many ways, the backbone of this industry, and if we aren’t improving upon them, we are not moving forward.
With GenLayer recently raising $7.5M from the likes of North Island Ventures, Arrington Capital, and Node Capital, to name a few, we have no doubt that these guys will go a very long way.
Time to say bye to smart contract blockchains and hello to intelligent contract blockchains.