Decentralize All the Things
Expanding decentralized confidential computation into AI and beyond.
Web3 is built on a central ethos: “Don’t trust, verify.” This principle is made possible by blockchain technology, which enables decentralized, verifiable computation, significantly reducing the need to rely on third parties. It’s this trustless or trust-minimized computation that lies at the heart of Web3’s value proposition.
As blockchain matures, there’s a growing focus on extending trustless computation to things like provisioning physical infrastructure, creating onchain representations of real-world physical assets, and facilitating privacy-preserving AI training and inference. By broadening its scope, Web3 can enhance transparency and reliably across various emerging use cases.
This post explores how Oasis is enabling a future where more things can interoperate and scale by leveraging decentralized confidential computing technologies.
Decentralized Confidential Computation
Verifiability is a prerequisite for decentralization. If it is impossible to succinctly verify that a computation has been performed correctly, the result cannot be easily trusted by potentially distrusting parties. There are a few ways to solve this with interconnected distributed systems.
Replicate the entire computation
Each party re-executes all programs to verify that the result is the same. This approach has multiple drawbacks. First, replicating complex programs requires all inputs to be available and is computationally expensive. Indeed, it may not be possible at all in the case of AI applications.
Second, this doesn't work for applications that have non-deterministic behavior. For example, imagine a program that makes a request to a remote news feed. Two nodes making the exact same request at roughly the same time may get slightly different results. Results of non-deterministic computation are not directly comparable, making it difficult to simply replicate execution and subsequently verify results across a decentralized network.
Generate a succinct proof of computation
One party runs the program and then generates a succinct proof like a Zero-Knowledge (ZK) Proof or a Trusted Execution Environment (TEE) remote attestation (RA), which proves that a particular program executed correctly and in the right environment.
Combination of both
Another solution is to lower the amount of replication needed by requiring multiple succinct proofs of computation from a set of non-colluding parties (e.g., a randomly elected committee based on stake and/or other constraints).
This is the best of both worlds, and it is also the basis of the Oasis decentralized confidential compute platform.
Oasis implements decentralized confidential computation through a combination of TEEs, cryptography, and a distributed consensus protocol, providing a secure, decentralized, confidential computing platform. And this forms the core of Oasis' Defense in Depth approach to security.
Onboarding All the Things
In order to bring more things like AI, real-world assets, oracles, intent solvers, etc., into the onchain realm, we need both verifiability and confidentiality. This is because confidentiality is a prerequisite for useful decentralization.
If it's not possible to keep secrets, many use cases that could benefit from decentralization are not possible or require awkward workarounds. Sealed-bid auctions, private voting, AI training over private data sets, AI inference over private models, and private intents, to name just a few.
This is one reason why Oasis Network was designed as a decentralized, modular, confidential computing platform from the beginning. Oasis established a decentralized validator set and a battle-hardened consensus layer that is the root of trust.
We brought the first confidential EVM, which runs as part of Sapphire and enables anyone to write Solidity smart contracts and own secrets using familiar tooling. Oasis has also been built for scalability, where multiple confidential EVMs can be deployed in parallel runtimes, leveraging the same consensus layer for easier interoperability.
Enter ROFL
Having this foundation in place makes it possible to extend confidential runtimes like Oasis Sapphire to include more things. This is accomplished via Runtime Off-chain Logic (ROFL), a framework that allows off-chain infrastructure and compute to function in a decentralized, verifiable, and confidentiality-preserving way.
In contrast to onchain runtimes, programs inside ROFL can do more complex computations and behave non-deterministically. These components are secured by the same Oasis TEEs and the consensus layer, which can transparently run ROFL without needing to install anything besides the Oasis Core nodes and runtime bundles.
ROFL allows these components to communicate with the onchain realm, bringing about greater composability across different blockchain platforms and offchain computation stacks. And because it uses the same underlying remote attestation technology, all computation is verifiable and can hold secret state. This opens up a world of possibilities.
Agents
Decentralized agents powered by AI can run in ROFL, making it possible for them to have private “thoughts” (state) and interact with the world (including other agents) via transactions, queries, and oracles.
Decentralized AI training
It’s also possible to conduct decentralized AI training inside ROFL. Although the current TEE implementation (SGX) is limited in performance, upcoming upgrades (Intel TDX, NVIDIA TEEs) will enable training larger AI models in a decentralized and verifiable fashion.
Oracles, bridges, and light clients
ROFL can also be used to run a committee of Bitcoin light clients and submit verified blocks onchain or relay transactions. Similarly, it can talk to remote services over HTTPS and, as such, provide arbitrary oracles to onchain smart contracts natively.
Intents and chain abstraction
Intents allow users to express their goals and let the system find the optimal solution. ROFL can enable encrypted intents and securely communicate them with multiple chains, minimizing the chances of, for example, front running or other types of MEV extraction.
Defense in depth for ZK-provers
To improve the robustness of ZK protocols, one can perform the same computation that is covered by a ZK proof in ROFL. This provides the protocol with additional remote attestation proofs, which are cheaper and faster to compute.
Boosting Confidential Computing Transparency
Somewhat ironically, confidentiality is only possible through transparency. An important component of onboarding more things is, therefore, to also boost transparency of how confidential computing operates. In the case of the Oasis Network, all RA proofs are posted onchain to be verified by anyone.
However, remote attestation proof verification requires some collateral from CPU vendor services like Intel PCS. Fortunately, those have seen increased transparency, and the latest version of ECDSA-based remote attestations are independently verifiable.
To boost transparency further, Oasis is also planning to build a decentralized onchain verification collateral registry, which will play a similar role to certificate transparency logs used for TLS. This will guard against potential vendor compromises and also enable a form of caching where the system will be able to function more independently even when vendor services fail.
Closing Thoughts
New technological developments call for extending trustless computation into physical infrastructure, traditional data assets, and, critically, AI. The race is on. However, in the context of Web3, none of it matters if the values are not upheld through sufficient decentralization.
Oasis can ensure verifiability and confidentiality of arbitrary computation in a decentralized environment, making it possible to bring more things onchain. Autonomous AI agents, NFT collections that have a mind of their own, decentralized AI training, oracles, chain abstraction, defense in depth, and all the other possibilities mentioned above, the potential here is considerable.
Foundational ROFL support has already landed in the development branch of Oasis Core and will be part of the upcoming release. ROFL will also be supported in the Oasis SDK with documentation and examples showcasing how to leverage its capabilities.