Comprehensive Design Document Reddid v2 - reddcoin-project/reddcoin GitHub Wiki

User ID Auction System for Reddcoin

Comprehensive Design Document (With Namespace Integration)

Version 2.0 | March 2025


Executive Summary

This document presents an updated comprehensive design for implementing a User ID auction system for Reddcoin, now fully integrated with the Namespace Auction system. The system builds upon the existing Reddcoin infrastructure to create a fair, efficient, and economically sustainable mechanism for allocating human-readable identifiers within the Reddcoin ecosystem.

The auction-based approach replaces the initially proposed fixed-fee model with a dynamic market-driven system that:

  1. Achieves optimal price discovery for valuable names
  2. Prevents squatting through economic disincentives
  3. Creates a deflationary pressure on RDD supply
  4. Provides sustainable funding for ongoing development
  5. Rewards network participants and namespace owners through fee distribution

This updated design incorporates a two-tiered approach where top-level namespaces are auctioned first, and those namespace owners then define rules and parameters for user IDs within their namespace. This creates a hierarchical, market-driven system with aligned incentives throughout.


Table of Contents

  1. Core System Architecture
  2. User ID Auction Mechanics
  3. Namespace Integration
  4. Blockchain Integration
  5. P2P Protocol Extensions
  6. Database Schema
  7. Economic Model
  8. User Interface Design
  9. Implementation Plan
  10. Potential Refinements
  11. Appendices

1. Core System Architecture

The User ID Auction system extends the Reddcoin Core protocol to facilitate the registration, transfer, and renewal of human-readable identifiers through competitive bidding, now operating within the rules defined by parent namespaces.

1.1 System Components

The system consists of the following core components:

  1. Auction Manager: Central component handling auction creation, bid processing, and auction finalization

  2. Namespace Integration Layer: Interface with the namespace system to validate and enforce namespace-specific rules

  3. Storage Layer: Database structures for persistent storage of auction and bid data

  4. Blockchain Interface: Mechanisms for writing auction data to the Reddcoin blockchain via OP_RETURN outputs

  5. P2P Relay Network: Extension of the Reddcoin P2P protocol to efficiently propagate auction-related messages

  6. User Interface: Wallet integration providing auction browsing, bidding, and management functionality

1.2 Data Flow

  1. User ID Auction Creation:

    • User requests to create an auction for a specific name within a namespace
    • System validates name availability and checks conformance with namespace rules
    • Auction parameters are set based on namespace configuration
    • Auction is recorded on blockchain and propagated via P2P network
  2. Bidding Process:

    • User views available auctions and places a bid
    • Bid is validated against auction and namespace requirements
    • Valid bid is recorded on blockchain and propagated
    • Previous high bidder is notified about being outbid
  3. Auction Finalization:

    • System detects auction end based on time parameters
    • Highest valid bid is determined as winner
    • Name registration is processed for the winner
    • Auction proceeds are distributed according to namespace revenue model
    • Losing bidders receive deposit refunds

2. User ID Auction Mechanics

2.1 Auction Types

The system supports multiple auction types tailored to different name categories, with parameters now defined by namespace configurations:

  1. Standard Auctions: Default auction type for most names

    • Duration defined by namespace (typically 3-7 days)
    • Deposit requirement defined by namespace (typically 10%)
    • Reserve price determined by namespace length-based pricing tiers
  2. Premium Auctions: For high-value names (short, dictionary words)

    • Longer duration (typically 7-14 days)
    • Higher deposit requirement (typically 15-20%)
    • Higher reserve prices
  3. Renewal Auctions: For names approaching expiration

    • Current owner gets right of first refusal
    • If not renewed, enters public auction
    • Grace period implemented before public auction

2.2 Auction Lifecycle

The auction system follows a defined state flow:

[Namespace Ready] → [Auction Creation] → [Auction Open] → [Auction Ended] → [Settlement] → [Name Ownership]

Detailed state flow is visualized in the system flow diagram referenced in the appendices.

2.3 Bidding Rules

  1. Minimum Increment: New bids must exceed the current highest bid by a percentage defined by the namespace (typically 5%)
  2. Deposit Requirement: Bidders must include a deposit defined by the namespace (typically 10-20% of bid amount)
  3. Anti-Sniping: Auctions extend according to namespace rules if a bid is placed near the end
  4. Validation: Bids must include proof of funds and be cryptographically signed

2.4 Settlement Process

  1. Once auction time elapses, the auction enters the finalization phase
  2. The highest valid bid is identified as the winner
  3. The winner's full bid amount is processed
  4. Auction proceeds are distributed according to the namespace's revenue model:
    • Namespace owner receives their configured percentage (5-10%)
    • Burn pool receives the largest portion (50-80%)
    • Node operators receive their share (5-25%)
    • Development fund receives its allocation (5-15%)
  5. Deposits from losing bidders are refunded (minus processing fees)
  6. The name is registered to the winner's address within the namespace
  7. All participants are notified of the auction outcome

3. Namespace Integration

3.1 Hierarchical Structure

The User ID system now functions within a hierarchical namespace structure:

  1. Format: User IDs are expressed as name.namespace (e.g., alice.redd, bob.crypto)
  2. Validation Chain: All user ID operations must be validated against parent namespace rules
  3. Rule Inheritance: User IDs inherit character rules, economic parameters, and auction settings from their namespace

3.2 Validation Rules

When processing user ID operations, the system performs namespace-specific validation:

  1. Character Set Validation:

    • Checks that the name only contains characters allowed by the namespace
    • Letters (a-z) are always allowed
    • Numbers, hyphens, and underscores are conditionally allowed based on namespace configuration
  2. Length Validation:

    • Verifies name length against namespace minimum and maximum requirements
    • Different namespaces can have different length requirements
  3. Auction Parameter Validation:

    • Ensures auction parameters (duration, reserve price, etc.) meet namespace minimums
    • Applies namespace-specific pricing tiers based on name length

3.3 Configuration Inheritance

User ID auctions inherit several key configurations from their parent namespace:

  1. Pricing Tiers: Minimum reserve prices based on name length
  2. Auction Duration: Minimum and maximum auction periods
  3. Bidding Rules: Minimum increment percentages and deposit requirements
  4. Revenue Model: How auction proceeds are distributed
  5. Renewal Parameters: When and how names must be renewed

3.4 Namespace Owner Rights

Namespace owners have certain rights regarding user IDs in their namespace:

  1. Revenue Share: Receive a percentage of all user ID auction proceeds
  2. Rule Setting: Define rules for all IDs within their namespace
  3. Priority Registration: Option for reserved names within their namespace
  4. Dispute Resolution: First-level resolution for name disputes

4. Blockchain Integration

4.1 OP_RETURN Data Structures

The system uses Reddcoin's OP_RETURN capability to record user ID auction data on-chain, with specialized formats for different auction operations:

4.1.1 Auction Creation

0     2  3                             39  
|----|--|-----------------------------|  
magic op   name.namespace_id (37 bytes)

4.1.2 Bid Placement

0     2  3          7    8       16    17    25
|-----|--|----------|----|---------|----|-----|
magic op  auctionId hash bidAmount time

4.1.3 Auction Finalization

0     2  3                             39  
|----|--|-----------------------------|  
magic op   name.namespace_id (37 bytes)

4.1.4 Auction Cancellation

0     2  3                             39  
|----|--|-----------------------------|  
magic op   name.namespace_id (37 bytes)

4.2 Operation Codes

The system defines the following operation codes:

Code Symbol Description
OP_AUCTION_BID ` Submit bid for a name
OP_AUCTION_CREATE % Create a new auction
OP_AUCTION_FINALIZE " Finalize auction to winner
OP_AUCTION_CANCEL ' Cancel an auction (by creator only)

4.3 Consensus Rules

New consensus rules are implemented to enforce:

  • Validity of auction operations
  • Namespace rule compliance
  • Correct sequence of state transitions
  • Appropriate fee payments
  • Authorization of operations

5. P2P Protocol Extensions

5.1 New Message Types

The P2P protocol is extended with new message types to support the auction system:

Message Type Command Description
auction auction Generic prefix for all auction-related messages
aucfilter aucfilter Filter subscription for auction events
getaucdata getaucdata Request for auction data
aucdata aucdata Response with auction data

5.2 Namespace-Specific Messages

Additional message fields have been added to include namespace information:

  1. Namespace Identifier: All auction messages include the parent namespace
  2. Rule Validation: Auction messages include a validation hash to verify compliance with namespace rules
  3. Owner Notification: Special notification messages for namespace owners about activity in their namespace

5.3 Message Relay

The protocol implements intelligent message relay to:

  • Filter messages by namespace
  • Prioritize time-sensitive messages
  • Allow subscription to specific namespaces
  • Validate messages against namespace rules before relaying

6. Database Schema

6.1 Core Tables

The system uses a comprehensive database structure with these primary tables:

6.1.1 auctions

Stores information about all auctions in the system.

Column Type Description
auction_id BLOB(32) Unique identifier for the auction (uint256)
name VARCHAR(64) Name portion of the ID being auctioned
namespace_id VARCHAR(15) Namespace portion of the ID
creator_address BLOB Creator's address in binary format
start_time INT64 Start time (unix timestamp)
end_time INT64 End time (unix timestamp)
reserve_price INT64 Minimum acceptable bid
current_bid INT64 Highest current bid amount
current_bidder BLOB Address of highest bidder in binary format
deposit_amount INT64 Required deposit amount
state INT Current auction state
type INT Auction type (0=standard, 1=premium, 2=renewal)
metadata_hash BLOB(32) Hash of additional metadata (optional)
block_height INT Block height when auction was created
txid BLOB(32) Transaction ID of the auction creation transaction

6.1.2 bids

Stores information about all bids placed.

Column Type Description
bid_id BLOB(32) Unique identifier for the bid
auction_id BLOB(32) Reference to the auction
bidder_address BLOB Bidder's address in binary format
bid_amount INT64 Bid amount
deposit_amount INT64 Deposit amount paid
bid_time INT64 Time when bid was placed (unix timestamp)
txid BLOB(32) Transaction ID of the bid transaction
is_winner BOOLEAN Whether this bid won the auction
refunded BOOLEAN Whether the deposit was refunded (for non-winners)

6.2 Namespace Integration Tables

Additional tables support namespace integration:

6.2.1 namespace_user_ids

Maps registered user IDs to their namespace and ownership information.

Column Type Description
name VARCHAR(64) Name portion of the ID
namespace_id VARCHAR(15) Namespace portion of the ID
owner_address BLOB Owner's address in binary format
registration_time INT64 When the ID was registered
expiration_time INT64 When the ID expires
last_transaction INT64 Timestamp of last transaction using this ID
transaction_count INT Number of transactions using this ID

6.2.2 user_id_metadata

Stores additional metadata for user IDs.

Column Type Description
name VARCHAR(64) Name portion of the ID
namespace_id VARCHAR(15) Namespace portion of the ID
key VARCHAR(32) Metadata key
value TEXT Metadata value

7. Economic Model

7.1 Revenue Distribution

For each successful user ID auction, the proceeds are distributed according to the parent namespace configuration:

Component Percentage Description
Burn 50-80% Permanently remove RDD from circulation (namespace configurable)
Namespace Owner 5-10% Revenue share to namespace owner (namespace configurable)
Node Incentives 5-25% Reward node operators maintaining the network (namespace configurable)
Development Fund 5-15% Support ongoing development and improvements (namespace configurable)

7.2 Auction Pricing Models

Names are categorized by desirability, with pricing tiers defined by the namespace:

  1. Length-Based Pricing: Shorter names typically have higher minimum prices
  2. Character-Based Pricing: Names with only letters may have different pricing than those with numbers/symbols
  3. Custom Tiers: Namespace owners can define custom pricing tiers for their namespace

7.3 Renewal Economics

The renewal model is designed to discourage squatting while providing stability for legitimate users:

  1. Renewal Period: Defined by namespace (typically 365 days)
  2. Grace Period: Defined by namespace (typically 30 days after expiration)
  3. Renewal Pricing: Based on namespace configuration:
    • Standard renewal: Percentage of equivalent auction price (typically 50%)
    • Grace period renewal: Higher percentage (typically 75-100%)
    • Usage discounts: Reduced fees for actively used IDs

7.4 Anti-Squatting Measures

Several mechanisms discourage name squatting, configurable by namespace:

  1. Usage Requirements: Activity-based renewal discounts
  2. Progressive Penalties: Increasing costs for bulk ownership
  3. Reclamation Auctions: Expired names enter public auction
  4. Activity Metrics: Transaction counts affect renewal costs

8. User Interface Design

8.1 Namespace Auction Browser Interface

The Namespace auction browser provides a clear view of available namespaces:

Key features include:

  • Primary organization by namespace
  • Filtering by auction type and status
  • Search functionality for specific names
  • Clear display of namespace rules and requirements
  • One-click access to bidding interface

8.1 Auction Browser Interface

The auction browser provides a clear view of available names, now organized by namespace:

Auction Browser Interface

Key features include:

  • Primary organization by namespace
  • Filtering by auction type and status within namespace
  • Search functionality for specific names across namespaces
  • Clear display of namespace rules and requirements
  • One-click access to bidding interface

8.2 Bid Placement Interface

The bid interface guides users through the bidding process:

Bid Placement Interface

Key elements include:

  • Namespace rule information
  • Current highest bid information
  • Minimum bid requirement calculation based on namespace rules
  • Deposit amount calculation
  • Confirmation controls

8.3 User Dashboard

The dashboard provides users with personalized information:

User Dashboard

Key features include:

  • Organization of owned IDs by namespace
  • Active bids tracking across namespaces
  • Auction watchlist with namespace filtering
  • Notification center with namespace-specific alerts
  • Renewal reminders grouped by namespace

8.4 Mobile Interface

The mobile experience maintains the namespace organization:

Mobile Interface Concepts

Key aspects include:

  • Namespace-based navigation
  • Streamlined bidding process
  • Clear rule presentation by namespace
  • Push notifications for auction events within watched namespaces

9. Implementation Plan

9.1 Project Phases

With the addition of namespace integration, the implementation plan has been updated:

Phase Timeline Focus
Design & Planning Weeks 1-6 Namespace and user ID specification, documentation
Namespace Development Weeks 7-16 Core namespace functionality, auction system
User ID Development Weeks 14-22 User ID auction system with namespace integration
UI/UX Development Weeks 18-26 Unified interface for both systems
Testing & QA Weeks 22-30 Testing, security audits, beta program
Deployment & Launch Weeks 31-34 Phased mainnet deployment, monitoring

9.2 Integration Strategy

The implementation now follows a dependency-based approach:

  1. Namespace First: Namespace system must be implemented before user ID auctions
  2. Phased Testing: Namespace auctions tested first, then user ID auctions within test namespaces
  3. Parallel Development: Some components can be developed in parallel with clear interfaces
  4. Migration Path: Strategy for existing names if any need to be incorporated

9.3 Risk Assessment

With namespace integration, additional risks have been identified:

Risk Impact Likelihood Mitigation
Namespace rule complexity Medium High Parameter validation, simplicity guidelines, testing tools
Integration bugs High Medium Comprehensive test suite, clear interfaces, phased rollout
User confusion Medium High Improved documentation, gradual introduction, intuitive UI
Performance bottlenecks Medium Medium Optimized validation chain, caching strategies
Governance disputes High Low Clear governance framework, dispute resolution process

10. Potential Refinements

Several advanced features could further enhance the integrated system:

10.1 Technical Refinements

  • State Channel Implementation: Layer-2 solution for rapid bidding within namespaces
  • Merkle Tree Auction Proofs: Efficient on-chain storage with namespace-specific trees
  • Zero-Knowledge Auction Mechanisms: Enhanced privacy and security for bids

10.2 Economic Refinements

  • Dynamic Reserve Pricing Algorithm: Machine learning-based price adjustment per namespace
  • Community Staking For Governance: Stake-weighted voting on namespace and system parameters
  • Inter-Namespace Markets: Mechanisms for transferring IDs between namespaces

10.3 User Experience Refinements

  • Namespace-Specific Analytics Dashboard: Historical data and predictive guidance by namespace
  • Reputation and Trust System: Bidder reputation tracking across namespaces
  • Multi-Platform Integration: Mobile and browser extensions with namespace organization

10.4 Ecosystem Expansion

  • Namespace-Centric Services: Specialized services built around specific namespaces
  • Cross-Chain Namespace Resolution: Interoperability with other blockchain naming systems
  • Value-Added Services: Integration of messaging, profiles, and directories by namespace

11. Appendices

11.1 Technical Diagrams

11.2 UI/UX Mockups

11.3 Economic Models

11.4 Implementation Resources

⚠️ **GitHub.com Fallback** ⚠️