Intelligent Protocols
Ethereum introduced smart contracts—and with them, unlocked an entire new ecosystem for decentralized finance. Peer-to-peer lending, decentralized token exchanges, and even property transfers all became possible.
But smart contracts are limited to on-chain transaction flows. And not all compute can happen on-chain. Some applications need to access remote state. Some applications need to do things that would be a pain to architect on-chain, like getting inferences from a large AI model. And some applications need to orchestrate across many functions—oracles, AI models, and beyond. As decentralized finance edges closer to truly commercial applications, blockchain infrastructure must become more robust. To name an example: if we want to enable truly community-governed alternatives to gig platforms like Uber, or other algorithm-reliant social networks, we might look to community-governed AI. But to achieve that, the protocols to manage off-chain computation must evolve.
Enter intelligent protocols
Web3 tools are good at architecting protocols: systems of rules, incentives, and mechanisms that coordinate behavior across distributed networks. To advance web3, we need intelligent protocols: systems that integrate deterministic on-chain logic and off-chain computation while maintaining decentralized governance and cryptographic verifiability. Rather than treating off-chain computation as a necessary evil, intelligent protocols embrace it. They provide a unified framework where smart contracts, AI models, oracle networks, money, and human governance can interact seamlessly and verifiably.
This post makes a case for intelligent protocols, describes our (composable) approach to building them, and sketches the outlines of what we call a borg—an emergent ecosystem of self-sovereign governance and composable compute.
An example
Consider a decentralized payment network that needs to handle complex compliance requirements and fraud detection. Traditional approaches force a choice between centralization and capability. Consider the following features:
- KYC/AML Verification: AI models process user documentation, with their decision-making parameters governed by the community
- Real-time Fraud Detection: Machine learning systems analyze transaction patterns
- Risk Scoring: Orchestrated computation across multiple data sources and models
- Regulatory Reporting: Automated generation of compliance documentation
How do we achieve these ends in a reasonably privacy-preserving way without resorting to centralized infrastructure? With intelligent protocols. Web3 governs the off-chain compute. Every component—from the AI models' parameters— to the risk scoring algorithms—remains inspectable (how does it work?), as are the rules by which those components can change over time (who decides how it works? who decides who decides?).
Building intelligent protocols with composable tools: The Layer vision
Our fundamental challenge lies in orchestrating diverse computational resources—from deterministic smart contracts to probabilistic AI models—while maintaining cryptographic guarantees end-to-end. This orchestration requires composability.
Composability refers to the capacity for a system’s components to be recombined in novel ways.
Lego blocks are composable: any lego block can join with any other.
So are UNIX pipes. The humble `|` allows programs to be chained together, creating complex workflows from simple components. Each program accepts standardized input and produces standardized output, enabling arbitrary combinations. Intelligent protocols demand similar compositional elegance, but with additional requirements for verifiability and governance.
Our WASM-based solution, WAVS (WebAssembly Verifiable Services), achieves composability through four mechanisms:
- A universal runtime. WebAssembly provides a consistent computational environment across different contexts—browser, server, or blockchain. Write once, target everywhere.
- Typing. WAVS leverages Rust's sophisticated type system to enforce compositional correctness at compile time. Services must explicitly declare their interfaces and dependencies, creating a formal grammar for service composition. This prevents many classes of integration errors before deployment.
- Verifiable state transitions. Each WAVS component maintains a verifiable state machine. This enables complex compositions to maintain verifiable behavior over time.
- Economic commitments. Users can stake assets to secure various protocol components, creating an interwoven mesh of economic security that strengthens as the network grows.
Composability offers several benefits. Components can discover and integrate with other services at runtime, enabling organic growth of protocol capabilities. Developers can upgrade services while maintaining existing integrations, provided they adhere to the same interface specifications. Running code can move flexibly between on-chain and off-chain environments based on efficiency requirements, without breaking compositional guarantees.
Toward the Borg
More importantly—and this is the web3 bit—building intelligent protocols out of composable parts transcends technical integration. It encompasses governance and economic security, too. Communities can compose not just services, but governance mechanisms and security models, creating emergent systems that are greater than the sum of their parts.
The network that results—self-governing units, interacting across economically secured compute—is a borg.
This term deserves a definition. It represents a novel(-ish) organizational paradigm, in which:
- Autonomous governance units maintain sovereign decision-making capacity
- Economic security mechanisms create interdependence between these units, without sacrificing their autonomy
- Resources flow freely between units while maintaining verifiability system-wide
- The interaction of these components creates emergent properties, particularly of the “greater-than-sum-of-parts” variety.
The borg differs from both hierarchical systems and conventional decentralized networks. Unlike DAOs, which typically maintain a single governance boundary, borg units preserve their individual agency while participating in larger collective computation. Unlike federation protocols, which focus primarily on information exchange, borgs enable the flow of both governance and computation across organizational boundaries.
The future implications of intelligent protocols transcend individual applications. Layer is building what might be called a "collective intelligence layer" for web3—a decentralized substrate where human governance, AI capabilities, and economic incentives merge into something greater than the sum of their parts.
Future posts will undergird this general theory of change. Various literatures speak to it: Ostrom's theories of the commons, adaptive systems theory, network economics, even Stafford Beer-style organizational cybernetics. We look forward to having you along.