Valory: Enabling rich dApps through an open and permissionless agent protocol

We are excited to back Valory in their mission to bring rich applications to web3 by building the open and autonomous service layer.

Nikolai Lambsdorff
Signature Ventures Blog
9 min readOct 12, 2022

--

Valory is building one of the missing pieces for the open, secure and privacy-centered next-generation internet (web3). Its autonomous services ecosystem will lay the foundation for truly decentralized apps that can rival web2 applications’ functionality richness, while being more transparent and robust. We have recently participated in their $4M Seed round led by True Ventures, alongside Semantic and other long-standing members of the blockchain community.

During the web2 era, we have become accustomed to the convenience of a new wave of complex interactive applications in our daily lives. Whether it is drag and drop, interactive animations or push notifications, the concept of rich web2 applications has been the foundation for next-gen interactive platforms we are using every day. These so-called “rich applications” enabled entirely new forms of user interfaces and interactions and were crucial in putting user experience at the forefront of app development. In web3, however, this concept could so far only be applied in a very limited and hardly scalable way. Since the focus of most decentralized app (dApp) development was on the blockchain and smart contract level, rich functionality has been dangerously neglected resulting in poor transparency, bad UX and even worse security than the web2 competition.

Rich user interface on Notion

What are rich applications?

A rich web application is rather a concept than a technology. It refers to an app or website that is able to dynamically rewrite the current web page with new data from the web server, without the web browser loading entire new pages. Almost all web applications we are using today are based on this concept. Enabled through development frameworks, such as AngularJS, ReactJS, VueJS, and AJAX, companies like Youtube, Facebook and Notion, were able to tailor their products to new levels of user interactions.

Simplified representation of a rich web2 application

A traditional web application often puts heavy workload on the server side. Whenever users interact with the application, the browser has to send a request to the server, wait for its response, and refresh the page. Thus, regardless of its development platform, the server has to maintain the user session, process the request, and render the results in the user interface. The client side is merely the browser displaying the final page. As a result, the application is limited in capabilities as it is only able to perform synchronous client-server communication. That is, every small action in the application triggers a detour to the server and back, whereas even small connection problems can disrupt the entire process.

On the contrary, rich applications leverage the power of the client machine. They install a runtime (similar to a browser plug-in) on the client side, and execute most of the functions locally. Thereby, the user interface sits directly on the client side, so that the application is able to use an asynchronous communication method. In this case, every action in the application triggers a request to the server that is immediately being answered. While this answer does not yet contain the required information, the client is able to continue with other tasks, expecting to eventually be notified when the required information is available on the server side. For example, once the information has been added to the database. This allows the application to get the data from the server without reloading the page.

What at first may sound like a minor improvement has had a huge impact on the way we use the internet today. Imagine, for example, having an online broker that had to reload the entire page every time the price of an asset changed. These and countless other models would not have been possible without rich applications in web2.

Why are rich applications not possible in web3?

Decentralized apps in web3, by being linked to a blockchain protocol via smart contracts, are static by nature. Put simply, a dApp typically consists of two components: smart contracts deployed on a blockchain (on-chain) and software capable of creating and committing transactions (off-chain). This off-chain software can be further split into a client side application that runs on the user’s local device and usually provides a user interface, and the dApp System that runs on a server and can store additional information, such as files or images.

Simplified representation of a web3 application

In fact, the Client side of a dApp works somewhat similar to the rich web2 application logic, as the browser can update specific information async, i.e. without reloading the entire page. However, storing and extracting on-chain data is again static and thus entirely different from adding information to a typical database in web2. The core of this problem lies in the nature of the blockchain itself, which can only settle transactions when explicitly called upon to do so. A smart contract cannot execute transactions autonomously or asynchronously, it can only store state and logic.

Let’s consider a simple voting smart contract: several candidates stand for election and voters are only allowed to vote once. The smart contract thereby holds the data about the number of votes per candidate and which addresses have already submitted their vote — this is the state. A set of functions ensures that for each unique vote, the number of total votes for the selected candidate is increased by 1 — this is the logic. In order to cast their vote, each voter has to submit a transaction to the smart contract that contains the information of the selected candidate.

Therefore, by definition, smart contracts are limited to their on-chain environment. They lack proactivity and are purely reactive to external requests. This limits dApps strongly in regards to processing on- and off-chain data in real-time.

A clumsy workaround

Pure on-chain-based rich applications are impossible. In order to build rich web3 applications, a lot of the dApp’s logic has therefore to be built off-chain. At their core, these off-chain components are designed to automatically invoke smart contracts and bridge on- and off-chain data. In web2 applications, this automation of functions is naturally built-in to the cloud infrastructure of the applications. This allows users to retrieve weather data in real-time, or robo-advisors to automatically rebalance a portfolio. In web3, comparable frameworks that are able to manage off-chain components are still missing. Thus, rich applications in web3 could only be developed in a very restricted way so far. The only option for developers to create mass-market dApps that could compete with web2 applications, was therefore to revert to the web2 tech stack to handle the entire complexity of rich applications themselves. That is, the dApp is running its own custom-built bots to execute functions in a centralized way, within the off-chain dApp system.

Simplified representation of a web3 application with bots

Due to its complexity this architecture not only presents high barriers to dApp development, but also results in a severely weak off-chain infrastructure of dApps. A significant number of DeFi hacks and exploits (e.g. 1, 2, 3) can actually be linked to their poor off-chain infrastructure.

As a result, various solutions like bot networks are emerging to improve dApp infrastructure. However, they only offer a marginal improvement, as these bot networks can at most handle simple smart contract automations in a barely transparent and hardly scalable environment. As in the Figure above, the specific bot is still required to contain the entire logic of the smart contract automation, restricting it to a unique use case and making it virtually impossible to reuse. Moreover, it is not able to communicate with other bots to, for example, coalesce into a robust swarm of jobs or functions that can jointly perform complex behavior to enable next-level autonomy. Ultimately, existing bot networks only use the underlying Blockchain to coordinate between bot users and server operators. This makes the overall off-chain system slightly more robust, but does not improve the actual bots themselves.

Valory builds the missing piece

Valory initiated Autonolas Network that powers open and permissionless agents to enable truly rich and autonome applications in web3. By providing a framework for off-chain software components that is secured on-chain, Autonolas overcomes the limitations of current dApps regarding functionality, transparency, and robustness.

Simplified representation of a rich web3 application based on Autonolas Network

Autonolas builds on top of the open Autonomous Economic Agents (AEA) framework where the founders have played a leading role in its creation and development. In general, an “agent” is a computer program that does not require continuous input from its owner and autonomously executes actions towards a pre-defined goal (e.g., “if x happens, make sure y gets executed”). autonomous agents (or simply agents) enable the automated execution of smart contracts. Rather than carrying the entire automation logic, agents can contain functions of any complexity and can collaborate to achieve a defined goal collectively. They run off-chain as open-source code on an open network and use multi-party computation and multi-signatures to perform joint actions on-chain. The agents framework enables the agents to interact with various entities. In particular, those are:

  • agent-agent: Agents use the public internet for communicating with each other. A built-in agent communication network allows agents to connect to each other knowing their cryptographic addresses alone.
  • agent-server: Agents could connect as clients to servers and access the offered services. For example, agents could query public APIs, such as crypto token prices.
  • agent-client: Agents can also run servers themselves to handle requests from other clients. For example, an agent can run a server that the owner can connect to via a web client.
  • agent-blockchain node: Agents themselves run off-chain. However, they could interact with any blockchain, like Ethereum, a Cosmos chain, Solana, etc. The agents can query blockchain data, submit transactions, and invoke smart contracts. This allows agents to leverage blockchain characteristics, for example, to transparently execute code.

All the actions performed by the agents are validated on-chain by the agent protocol that can relay those to third-party protocols. Being powered by blockchain, the protocol comprises an agent registry, crypto-economic security elements, and on-chain governance by design.

Autonolas’ autonomous agents network is therefore not a simple bot network. Its agents are far more powerful than bots, as they operate within a standardized framework. Beyond calling various smart contracts, agents can communicate amongst each other through the agent protocol to run aggregations, perform computations, reach consensus, and more. In general, autonomous agents are more transparent as they are open source, more robust as they operate in swarms, blockchain agnostic, and well suited to solve dynamic problems.

In its essence, Autonolas is an open marketplace of autonomous off-chain agents for developers, operators, and end-users alike. This will allow the concept of rich applications to fully enter web3 and automate smart contract interactions in a highly transparent, robust and scalable way. When we see the huge impact rich applications had in web2, we can only imagine the enormous potential this concept will have in web3, beyond the use cases we know today.

David Minarsch, David Galindo, and Oaksprout combine strong backgrounds in Cryptography, Software Development, Economics, and Open Networks. David Minarsch and David Galindo have been jointly active at Fetch.ai over the last years. Additionally, Oaksprout was previously a recognized contributor to THORchain, Balancer and Ceramic and has over a decade of experience in web2 product development roles. The team has already launched major parts of Autonolas Network, including the open-source framework and the Autonolas DAO. Protocols and developers can now build rich dApps on-top of this open and permissionless multi-agent network protocol in a highly scalable way. Valory has furthermore launched the Autonolas Academy so that anyone can learn to build and run their own autonomous services.

We at Signature Ventures are thrilled to back such an exceptional team and are grateful for being part of that journey.

--

--