DPSN: Decentralised Pub/Sub Network
  • Introduction
  • Why Decentralized?
  • Understanding Topics
  • Architecture
    • Topics Registry
    • Configurator
    • Clusters
    • Publishers and Subscribers
    • Facilitator Brokers
    • SDK
  • Functionality
    • Message Publishing and Delivery
    • Subscription Management
    • Security Considerations
    • Topic Ownership and Access Control
    • Private Key Authentication
    • Fully Homomorphic Encryption Support
  • Advantages and Use Cases
    • Advantages of DPSN
    • Use Cases
  • Integration
    • SDK Introduction
    • Publisher
    • Subscriber
    • Delegated Addresses
    • Private Messaging
  • Integration Guides
    • Messaging Application
  • Token Use
    • Utility
    • Token Utility Model
  • DIPs
    • DIP1: Stateless Message Routing in DPSN
  • DIP2: Integration of DPSN with Model Context Protocol (MCP)
  • DIP-3: Standardizing DPSN AVS for Enhanced Security and Reliability
Powered by GitBook
On this page
  • Abstract
  • Motivation
  • Specification
  • Technical Details
  • Requirements
  • Rationale
  • Backwards Compatibility
  • Test Cases

DIP-3: Standardizing DPSN AVS for Enhanced Security and Reliability

Author(s): Sanil Status: Draft Type: Standards Track Created: March 14, 2025

Abstract

This proposal introduces a standardized framework for Actively Validated Services (AVS) within the Decentralized Pub/Sub Network (DPSN) to improve security and reliability. By implementing a staking mechanism, DPSN nodes acting as AVS validators are incentivized to validate messages honestly, with penalties (slashing) enforced for malicious behavior such as tampering or censorship. This DIP outlines message validation, fraud detection, and dispute resolution processes to ensure a trustless, decentralized network for real-time data streaming.

Motivation

DPSN’s pub/sub model excels at delivering real-time data but lacks robust mechanisms to ensure node honesty and message integrity. Without economic incentives, the network is susceptible to malicious nodes that could tamper with or censor messages. This proposal addresses the following issues:

  • Security: A staking mechanism deters malicious behavior by imposing financial penalties.

  • Standardization: A formalized validation process ensures consistency across all nodes.

  • Reliability: Enhanced trust in message propagation supports critical Web3 applications.

Specification

System Architecture

Actors

  • Publishers: Entities submitting messages to DPSN nodes.

  • Subscribers: Entities receiving validated messages from DPSN nodes.

  • DPSN Nodes: Nodes that forward and validate messages, running local AVS validator services.

  • Staking Contract: A smart contract managing node stakes, slashing, and fraud proofs.

Flow

  1. Message Submission: A publisher sends a message to a DPSN node.

  2. Validation: The node verifies the message’s integrity and authenticity (e.g., via digital signatures).

  3. Proof Generation: The AVS validator generates a cryptographic verification proof.

  4. Propagation: The node signs and forwards the message with the proof to its peers.

  5. Subscriber Delivery: Subscribers receive the message along with its proof.

  6. Fraud Detection: Nodes monitor for tampering or censorship and submit fraud proofs if detected.

  7. Slashing: Upon validation of a fraud proof, the staking contract slashes the malicious node’s stake.

Technical Details

  • AVS Validator:

    • Runs locally on each DPSN node.

    • Verifies message signatures and ensures proper propagation.

    • Generates cryptographic proofs for validation.

  • Staking Contract:

    • Requires nodes to stake tokens to participate.

    • Supports functions like stakeTokens(amount), submitFraudProof(nodeId, proof), and slashStake(nodeId).

  • Fraud Proofs:

    • Submitted for detected tampering (e.g., signature mismatch) or censorship (e.g., failure to propagate).

    • Includes a dispute period during which accused nodes can respond.

  • Dispute Resolution:

    • Accused nodes may submit counter-evidence within a defined timeframe.

    • Valid fraud proofs result in stake slashing; invalid claims are dismissed.

Requirements

  • DPSN SDK: Version 1.0.0 or higher with AVS extensions.

  • Latency: Validation and propagation must complete in under 100ms.

  • Scalability: Must support over 10,000 concurrent subscribers per topic.

Rationale

The staking mechanism aligns node incentives with network integrity by making malicious actions financially costly. Alternatives considered include:

  • Reputation Systems: Easily manipulated and less secure than staking.

  • Centralized Validation: Undermines decentralization and was rejected.

  • No Incentives: Leaves the network vulnerable to Sybil attacks and was deemed insufficient.

This vendor-agnostic approach ensures DPSN can integrate with various staking providers, maintaining flexibility and decentralization.

Backwards Compatibility

Nodes must run AVS validators to participate in the validated network segment. Legacy nodes without AVS can operate in an unvalidated segment but may experience reduced trust and functionality.

Test Cases

  1. Honest Propagation: A message is validated, propagated, and received with a valid proof.

  2. Tampering Detection: An altered message triggers a fraud proof, leading to stake slashing after dispute resolution.

  3. Censorship Detection: A non-forwarded message results in a fraud proof and subsequent slashing.

  4. False Accusation: An invalid fraud claim is dismissed during the dispute process.

PreviousDIP2: Integration of DPSN with Model Context Protocol (MCP)

Last updated 1 month ago