Abstract

Communication underpins every aspect of digital life, yet it remains largely centralized, leaving users dependent on platforms prone to censorship, manipulation, and limited economic participation. The Towns Protocol leverages blockchain technology to redefine digital communication by creating decentralized, secure, and economically integrated community platforms.

Built with a custom appchain (Towns Chain) and Base, Ethereum’s scalable Layer 2 solution, Towns Protocol introduces decentralized communication through “Spaces”, user-owned and programmable digital communities. Each Space employs smart contracts to manage memberships represented by ERC-721 NFTs, enabling tailored governance, dynamic access control, and economic interactions directly integrated with blockchain financial services.

Towns ensures secure messaging via advanced cryptographic methodologies, including Curve25519 key pairs and AES-GSM encrypted shared session keys, safeguarding against censorship, spam, and malicious activities. Nodes within the Towns network validate encrypted messages, achieving consensus through decentralized miniblock production and integrating cryptographic proofs directly onto the blockchain for verifiable immutability and transparency.

An innovative economic model incentivizes robust participation by rewarding node operators, delegators, community referrers, and space owners, aligning ecosystem stakeholders through transparent token economics. Governance of the Towns Protocol is fully on-chain via the Towns Lodge DAO, empowering token holders to propose, discuss, and implement protocol upgrades transparently and democratically.

Introduction

Communication is the most valuable aspect of the internet, underpinning nearly every facet of digital life—from personal interactions and community building to critical business operations. Today, centralized platforms such as Slack, Discord, WhatsApp, Telegram, and WeChat dominate this essential utility, capturing significant economic and social value. Decentralized communication technologies represent an unprecedented opportunity to reclaim a portion of this value, providing more resilient, secure, and user-governed alternatives.

The evolution of internet communication has passed through distinct phases: initially limited to text, it expanded into images, then audio and video, and is now extending to include financial transactions. Blockchain technology uniquely enables the integration of financial primitives directly into communication platforms, significantly enriching interactions and offering new possibilities for digital communities.

With blockchain infrastructure reaching maturity, it is now possible to create decentralized communication applications offering user experiences competitive with centralized services. The Towns Protocol harnesses this technological advancement, providing a robust, scalable platform specifically designed to facilitate decentralized communication.

The benefits of decentralized communication platforms built on blockchain technology are numerous and impactful:

  • Global Decentralization: Operated by a distributed network of node operators worldwide, Towns ensures resilience against censorship and centralized shutdowns, safeguarding the freedom of digital expression and collaboration.
  • Permissionless and Programmable: Open and programmable infrastructure allows developers and users to innovate freely, unlocking infinite potential applications and extensions without centralized approval.
  • Transparent Governance: With rules and protocols transparently encoded into blockchain smart contracts, governance decisions and operational mechanisms are clear, auditable, and resistant to manipulation.
  • Cryptographic Verification of Humanity: Integrating cryptographic identity verification directly into the communication layer ensures genuine user participation, preventing spam, bots, and other malicious activities.
  • User Ownership and Sovereignty: Users truly own their digital spaces via cryptographic on-chain assets (NFTs), granting them control, transferability, and economic sovereignty over their communities.
  • Integration with On-Chain Finance: Seamlessly merging financial services directly into communication channels enables novel interaction models, including tipping, subscriptions, payments, and complex economic interactions, fostering vibrant digital economies within each decentralized community.

The Towns Protocol addresses the limitations of centralized communication and the constraints of early decentralized attempts by delivering a user-friendly, economically integrated, and censorship-resistant platform designed explicitly for the next generation of internet communities.

System Design

Protocol Architecture

The Towns Protocol employs a decentralized architecture consisting of three primary components:

Spaces

Spaces are programmable communication channels that users can deploy and manage onchain. Each Space has a unique contract address, allowing independent operation and governance structures. Key functionalities include customizable membership management, role-based entitlements, and moderation tools, all facilitated through specialized smart contracts deployed on the Base Mainnet, a highly performant Ethereum Layer 2 solution.

Memberships

Memberships are implemented as NFTs adhering to the ERC-721 standard, providing proof of membership and granting users specific access rights within Spaces. The supply and pricing of Membership NFTs are configurable by Space owners, allowing for dynamic or fixed pricing models and cross-chain token gating mechanisms. Membership tokens can integrate custom entitlement logic, leveraging on-chain assets or off-chain data via oracles, ensuring flexible and inclusive access control.

Streams

Stream is a core abstraction in Towns Protocol. Each stream is identified by a unique 32-byte id. Each channel, group message session, space, user, media file are stored in the specific stream. I.e. a single channel is stored in a single stream with this channel’s id. Each stream is replicated to multiple (but not all) nodes. Encrypted messages are stored into the stream’s minipool. Every two seconds, if the minipool is not empty, a new miniblock is produced by one of the participating nodes through a voting process. The hash and number of the new miniblock is written in Stream Registry Smart Contract on Towns Chain. Only one miniblock can be registered in the smart contract for the given height. Once a hash on the miniblock is stored on the blockchain, it becomes “canonical”. By tracking these hashes, participating nodes and users know which state each stream is supposed to be in, i.e. what is the “canonical” view of each stream.

Nodes

Nodes form the decentralized infrastructure underpinning the Towns network. Managed by a Node Registry deployed on Base, nodes are responsible for validating, propagating and storing encrypted messages across the network. Nodes undergo a rigorous registration and monitoring process to maintain high operational standards, and their performance is continuously evaluated to ensure network reliability and security.

Consensus and Incentive Mechanisms

The Towns Protocol utilizes a decentralized consensus mechanism built upon the Layer 2 blockchain (Towns Chain), designed specifically for scalability and efficiency. Consensus is achieved through synchronized validation and mini-block production managed by Stream Nodes. These nodes validate message events, coordinate on their inclusion into miniblocks, and achieve consensus through a voting mechanism, ensuring accurate and secure message sequencing.

Incentive mechanisms in the Towns Protocol revolve around clearly defined token economics. Node operators set commission rates deducted from periodic inflationary rewards distributed bi-weekly. Rewards are allocated equally among active operators, adjusted for their set commissions. Remaining rewards are then proportionally distributed to delegators, incentivizing active participation and staking.

Economic incentives extend further to encourage robust node operation and active community participation. Nodes are continually evaluated based on their operational performance and receive rewards based on delegated tokens, ensuring alignment of interests across the network’s stakeholders and maintaining overall protocol health and reliability.

Protocol Specification

Operational Mechanics

The operational mechanics of the Towns Protocol delineate a sophisticated interplay between Ethereum-based smart contracts, decentralized node operations, and rigorous data stream validation.

Smart Contract Interactions

The Towns Protocol employs Ethereum smart contracts to facilitate decentralized governance and membership management within distinct digital communities, referred to as “Spaces”. Each Space can be uniquely configured to enforce customized governance rules and community standards. Membership within these Spaces is represented and managed through minting ERC-721 compliant NFTs, embedding programmable pricing and entitlement logic directly within token metadata.

To enhance secure fund management, the Towns Protocol integrates ERC-6551 token-bound accounts. These accounts securely associate funds and digital assets directly with individual ownership tokens, streamlining secure and transparent resource management.

Node Operations

Nodes within the Towns Protocol are responsible for validating, propagating, and securely managing encrypted communications. Each node performs critical entitlement checks alongside rigorous cryptographic verification, thus safeguarding the integrity and authenticity of all messages within the network.

A deterministic approach governs stream allocation, administered by the Stream Registry, leveraging the immutable state provided by the blockchain. Nodes collaboratively coordinate to reach consensus, performing event validation and systematically constructing miniblocks, which ensures precise and sequential event logging across the network.

Data Streaming and Validation

Event-driven communication within the Towns Protocol relies upon encrypted payload transmission. Each event is a part of some stream, and copies of the event are stored in each stream’s replicas hosted by different nodes.

Upon receiving events, nodes execute comprehensive validation checks, verifying digital signature authenticity, entitlement permissions, and ensuring coherence with previously validated mini-block hashes. Validated events are subsequently committed locally to stream-specific minipools. Nodes put events from minipools into consensus-driven miniblocks, thus maintaining synchronized state across the decentralized network and guaranteeing resilient data integrity and consistency.

Messaging Protocol and Miniblock Production

The message lifecycle in the Towns Protocol involves several distinct stages, each designed to ensure decentralization, security, reliability, and efficiency. The following describes the detailed technical steps:

1. Message Creation (Client-Side)

Client Initialization: Users interact with Towns Protocol via secure client applications. Each client generates and securely stores a pair of Curve25519 cryptographic keys for secure identification and end-to-end encryption of messages.

Cryptographic Encryption:

  • Peer-to-peer messages used for sharing sessions are encrypted using asymmetric key pairs cryptographically associated with the user’s wallet.
  • Group and channel messages are encrypted using shared session AEG-GSM encryption.

Signing: After encryption messages are signed with the user’s wallet.

2. Message Submission

Message Format: Messages conform to a standardized Protocol Buffers payload format containing encrypted content, metadata, sender signatures, hash of the recent miniblock in the stream message sent to, and other required fields.

Client-to-Node Submission: Clients transmit messages via gRPC-based API calls to Towns Protocol nodes, ensuring efficient, reliable, and structured data exchange.

3. Node Processing and Validation

Upon receiving a message, nodes perform critical validation tasks:

Membership Verification: Nodes query the corresponding Space smart contract on the Towns Chain to verify if the sender possesses the requisite Membership NFT, validating their right to post messages within that space.

Cryptographic Verification: Nodes verify digital signatures using the sender’s Curve25519 public key to ensure authenticity and message integrity.

Timestamp and Replay Protection: Nodes enforce timestamp synchronization thresholds and validate uniqueness of message signatures to prevent replay attacks.

4. Decentralized Miniblock Production

Towns Protocol employs decentralized miniblocks to batch and immutably store validated messages. The process involves:

Message Aggregation: Validated messages are grouped by nodes into miniblocks, each representing short timeframes (2 seconds), ensuring near-real-time messaging.

Consensus and Agreement (OP-Stack): Nodes use OP-Stack Towns Protocol L2 blockchain to store stream hashes and maintain consensus and agree on what is “canonical” version for any given stream.

Miniblock Structure: Each miniblock comprises:

  • Header: Contains metadata such as miniblock height, previous miniblock hash, timestamp, Hashes of included events, hash of snapshot. The header is signed by producing a node, hash of the header is used as a hash identifying the miniblock.
  • Body: Contains a sequence of included unmodified client message that match hashes listed in the header

5. Miniblock Submission to Towns Chain (L2)

After miniblock creation and consensus, nodes submit miniblock hash to the Towns Chain (Layer 2) StreamRegistry Smart Contract, inheriting Ethereum’s strong security guarantees and ensuring that only one miniblock is “canonical” for any given stream height.

Optimistic Rollup Integration: Miniblocks are periodically batched and submitted to Ethereum’s Layer 1 via optimistic rollups, inheriting robust Ethereum consensus and security.

Miniblock production involves randomized node election, consensus through voting, leader-driven event ordering, and mini-block formation and signing.

Cryptographic Methodologies

Ensuring secure and verifiable communication within the Towns protocol necessitates robust cryptographic methodologies. Towns implements advanced encryption techniques alongside innovative cryptographic proofs, enabling secure messaging, verifiable membership, and assured data integrity across its decentralized infrastructure.

Secure Messaging and Membership Verification

All interactions within the Towns protocol leverage end-to-end encryption to protect user communications, enforcing a strict confidentiality model. Nodes within the network handle only ciphertext, while plaintext encryption keys remain securely managed by client-side devices.

A public asymmetric device encryption key is signed by the user’s wallet. This establishes a cryptographic link between device encrypting or decrypting the message and identity of the user.

Innovations in Cryptographic Proofs for Data Integrity

To maintain the integrity of data streams within its Layer 2 architecture, the Towns Protocol employs a cryptographically secure checkpointing system through miniblock headers. Each mini-block header includes:

  • Hash of Previous Miniblock: Establishes a continuous chain of custody for events, allowing verifiable historical integrity.
  • Hashes of Events: Compact representations ensuring efficient verification and synchronization among nodes.
  • Vote Proofs: Consensus-derived cryptographic evidence from node participants, validating block authenticity and consensus.
  • Node Signatures: Digital signatures from elected leader nodes, enhancing security and providing non-repudiable proof of block authenticity.

These mini-block headers are locally stored by participating nodes and broadcasted to clients, empowering independent verification of data integrity and transaction finality. A client or node observing a matching transaction hash with the mini-block header hash can cryptographically affirm transaction immutability and finality.

Economic Model

The Towns Protocol establishes an economic framework designed to foster sustainable growth and robust community engagement through clearly defined incentive structures and diversified monetization pathways. By aligning economic incentives with protocol participation, Towns ensures the longevity and vibrancy of its decentralized social ecosystem.

Incentive Structures

A pivotal aspect of the Towns economic model is its sophisticated incentive structure, aimed at rewarding all key ecosystem participants, ensuring active engagement, and promoting the consistent growth of Spaces.

Transaction Fee Distribution

Transaction fees generated through user interactions within a Space are methodically distributed among several critical stakeholders:

  • Space Owners: A substantial portion of the fees directly compensates Space Owners, incentivizing them to actively manage and cultivate their communities.
  • Towns DAO: Fees allocated to the Towns DAO support ongoing ecosystem-wide developments, infrastructure upgrades, and governance enhancements through the Towns Lodge.
  • Referrers: Recognizing the importance of community expansion, referrers—both for Space members and protocol clients—receive fee shares as a direct incentive for driving growth and adoption.

Stake and Reward System

Node Operators and delegators within the Towns Protocol receive periodic rewards based on a transparent, DAO-managed inflationary token model. Rewards are systematically distributed bi-weekly, with Node Operators receiving commissions defined at the time of registration, and delegators sharing the remainder proportionally based on their stake.

Sustainability and Monetization

Towns Protocol ensures long-term sustainability by embedding multiple monetization strategies directly within its architecture, empowering community spaces to tailor financial models precisely to their needs and visions.

Governance

The governance of the Towns Protocol is fully on-chain, leveraging decentralized autonomous organization (DAO) principles to ensure transparent, secure, and community-driven decision-making.

Governance Structure

Towns governance is facilitated through the Towns Lodge, which operates via a series of smart contracts deployed on Base. These contracts handle proposal submissions, community voting, and decision implementation, ensuring that all governance activities are transparent and immutable.

Key Components

Token-Based Governance The Towns Token (TOWNS) serves as the core governance token. Voting power is proportional to a participant’s token holdings, incentivizing active community participation and aligning stakeholders’ interests with the protocol’s long-term success.

Proposal Lifecycle

Submission Eligible stakeholders (Space Owners and Node Operators meeting specific activity thresholds) can submit proposals. Proposals must clearly articulate their purpose, demonstrate feasibility, and align with the long-term vision of Towns.

Discussion Submitted proposals undergo an open discussion phase, allowing stakeholders to deliberate potential impacts, suggest improvements, and refine proposals for clarity and effectiveness.

Voting After the discussion phase, proposals proceed to a voting stage where token holders cast their votes. The outcome is determined by a majority weighted by token holdings.

Implementation Approved proposals automatically trigger smart contracts for efficient, transparent implementation of changes or upgrades within the protocol.

Special Provisions

  • Subgroup Delegation: The DAO may delegate specific decisions to subgroups with defined permissions and budget allocations from the primary treasury.
  • On-chain Upgrades: The DAO retains authority to implement upgrades on any on-chain component, including adjustments to Node Registry requirements, membership fees, and functionalities of core contracts like the Space Factory.

Transparency and Auditability

All governance proposals, discussions, voting outcomes, and implementation details are permanently recorded on-chain. This ensures complete transparency and allows continuous auditability, reinforcing trust among stakeholders and preserving the integrity of the governance process.

In summary, the Towns Protocol employs a robust, token-based governance model that emphasizes decentralization, transparency, and community participation, ensuring its continuous evolution and adaptability.