GenLayer: The Intelligence Layer of the Internet

Limitations of Smart Contracts

Smart Contracts have hit a wall. Platforms like Ethereum were an incredible innovation ushering in an era of decentralized applications running on unstoppable, uncensorable global ledgers. These systems provide an alternative to traditional legal and financial systems by enabling the creation of self-enforcing and self-executing contracts.

Since the idea’s inception, teams around the world have made giant strides to make decentralized ledgers faster, cheaper, easier to build, and more secure. Developers today have a vast array of smart contract platforms and languages to choose from.

And yet, under the hood, all smart contract platforms face the same fundamental limitations — namely, they are only able to execute simple low-level machine instructions, and they are entirely isolated from the outside world. They can only refer to things happening on the ledger, requiring trusted parties called Oracles to bring information on-chain. This has limited the types of applications that are possible to build on-chain to mostly financial use cases, i.e., DeFi.

Introducing GenLayer

Today, we’re introducing GenLayer, a platform that addresses both of these limitations. GenLayer can execute programs called Intelligent Contracts that can evaluate code, natural language instructions, and read any data from the World Wide Web.

It does so by connecting its validators to Large Language Models in a new execution environment called GenVM. In GenVM, developers can write Python-based smart contracts that retain all the capabilities of traditional smart contract platforms while also being able to execute instructions such as

“Describe the outcome of the User’s action in the game with 3 possible next steps.

“Given the list of possible next actions A, B and C, decide which action to take next.

“Visit wikipedia.com and find out who is the current president of the United States of America.”

To power GenLayer, we have designed a new kind of consensus algorithm called Optimistic Democracy. It is built from the ground up to allow multiple validators to agree about non-deterministic instructions, for which there exists more than one correct response, such as answering a text-based question or reading data from a web page that changes over time.

It works by first randomly selecting a leader to propose an execution of a transaction, followed by aggregating the votes of a diverse set of validators connected to different Large Language Models. Because generating a response from an LLM is expensive and time-consuming, instead of every validator voting on every transaction, a small subset of is randomly selected to do the first round of validation.

Follow us on Twitter to find out more about GenLayer!

What keeps these initial validators honest is an incentive mechanism of staking and escalating appeals. After a transaction has been executed, there is a window of time during which it can be appealed — a process where the validator set is doubled and the transaction is re-executed. Validators found to have voted incorrectly are punished by slashing their staked tokens. This incentivized validators to run models that can produce good quality answers.

Use cases

GenLayer enables a broad new set of use cases, and in the following paragraphs, we will outline some of them to give you a taste of what’s possible.

Intelligent Oracles

Oracles are systems that connect blockchains to external data sources, enabling smart contracts to execute based on real-world inputs. A very common example is collating and bringing token price data from centralized exchanges on-chain. However, existing oracles only work for the most commonly used and pre-defined datasets.

Using the web browsing and decision-making capabilities of GenLayer, it is possible to build an Oracle that can answer any question for which there is an answer publicly available on the web. A few examples:

  • Find out if there is a drought in a given geographical area to determine if an insurance contract needs to be paid out
  • Monitor crypto news sites to detect when a protocol is experiencing an attack and trigger an emergency shutdown
  • Look at the website of the Federal Reserve to read the latest interest rate of US Treasuries and use that to set a policy in a DeFi protocol
  • Detect the result of an election or a sports event by monitoring top news sites and resolve a prediction market
  • Validate that a user has posted the required verification information on their social media page to link their online identity to their on-chain protocol

This information can be used inside GenLayer, requested from, and propagated to any other smart contract platform through inter-blockchain communication services such as LayerZero, meaning that GenLayer oracles can be integrated with any blockchain.

World Database

GenLayer can also act as an information-gathering service. It would be possible to set up an Intelligent Contract that rewards proposers for finding and summarizing new information about a certain topic and submitting it to the contract.

The contract then checks whether the submitted information is new, whether it is relevant to the contract requirements, and whether the summary is of good quality. It then adds it to its database and rewards the proposer accordingly.

AI DAOs

A DAO, or Decentralized Autonomous Organization, is an organization with its rules encoded into a smart contract. DAOs aim to revolutionize how organizations are run, making them more democratic, transparent, and efficient. However, in practice, the on-ledger component of current DAOs is limited to aggregating token-holders’ votes.

Using GenLayer, it will be possible to take the Autonomy of a DAO to the next level by encoding the constitution of a DAO directly into its Intelligent Contract. Such a DAO would be able to make independent decisions, manage its treasury, issue bounties, accept grant proposals, or even ensure any proposal that is passed is aligned with its constitution.

Further applications

The aforementioned three applications only scratch the surface; there are many more, such as decentralized gaming, performance-based contracts, dynamic insurance policies, credit scoring, network states, automated notary and arbitration services, and slashing evaluators for other decentralized protocols. We’re excited to see what other use cases our community can develop — let us know in our Telegram channel!

Our Vision

We live in a world of rapidly advancing Artificial Intelligence technologies. Human-level Artificial General Intelligence (AGI) is on the horizon. GenLayer is positioned to benefit from these advances.

First of all, as LLMs get smarter and smarter, the GenLayer platform will be able to reliably execute more complex Intelligent Contracts. Integrating multimodality so that the validators can work with images, audio, and video alongside text is straightforward.

Beyond this, we expect long-running AI agents to gain more independence and conduct increasingly complex tasks in the world to achieve their goals. They will need a neutral middle ground where they can engage in commerce — transact and enter into contracts with humans and eventually other AI agents. It is improbable that they will be able to use the traditional legal system, which is slow, expensive, and built for humans. We believe it’s equally unlikely that they will use code only, and trust third parties to access real world data.

GenLayer is built from the ground up to be the perfect place for AI Agents to conduct business. A platform run by AIs, for AIs. A new jurisdiction for the machine age.

Conclusion

We invite you to read our whitepaper to learn more about the platform’s details and to have a deeper discussion of how we mitigate security concerns such as prompt injection and other adversarial inputs.

Join us on our mission!

Website | Blog | Discord | X (prev. Twitter) | Telegram | Simulator | Docs | Whitepaper