Swarm Contract: A Multi-Sovereign Agent Consensus Mechanism
Haowei Yang
TL;DR
The paper addresses the limitations of traditional on-chain smart contracts in handling large off-chain data, dynamic workflows, and iterative updates. It proposes Swarm Contract, a multi-agent framework where Sovereign Agents running in Trusted Execution Environments coordinate off-chain logic and finalize on-chain actions via a multi-sig wallet, demonstrated with a minimal NFT auction. Key contributions include formalizing Digital Life Forms and Sovereign Agents, outlining the architecture, detailing implementation across TEEs, multisig, and consensus mechanisms, and analyzing security and trust assumptions. The work suggests significant practical impact for DAO governance, cross-chain interoperability, and privacy-preserving data processing by enabling flexible, trust-minimized decentralized applications beyond monolithic on-chain contracts.
Abstract
Traditional smart contracts on blockchains excel at on-chain, deterministic logic. However, they have inherent limitations when dealing with large-scale off-chain data, dynamic multi-step workflows, and scenarios requiring high flexibility or iterative updates. In this paper, we propose the concept of a "Swarm Contract" (Swarm), a multi-agent mechanism wherein several digital life forms (DLF) or Sovereign Agents (SA) collectively handle complex tasks in Trusted Execution Environments (TEE). These digital entities are defined as autonomous software agents that own their code, state, and possibly on-chain assets, while operating free from centralized control. By leveraging a simple multi-signature wallet on-chain, Swarm moves most of the logic off-chain, achieving trust minimization through multi-agent consensus rather than a single monolithic on-chain contract. We illustrate these ideas with a lightweight off-chain auction example - minting and selling 10,000 identical NFTs - to showcase how off-chain coordination can determine a clearing price and finalize distribution, with each step performed collectively by multiple agents in TEE. This approach broadens the scope of trustless and decentralized solutions, potentially benefiting DAO governance, multi-modal data processing, and cross-chain interoperability.
