UserID Management - reddcoin-project/reddcoin GitHub Wiki

Reddcoin User ID Management System

Comprehensive Technical Overview

1. Introduction

The Reddcoin User ID Management System is a sophisticated identity framework built on the Reddcoin blockchain that enables users to register, manage, and transfer human-readable identifiers. This system implements a hierarchical structure with three key components:

  1. Namespaces: Top-level domains that define rules and governance for user IDs
  2. User IDs: Second-level identifiers within namespaces that represent individual accounts
  3. ReddIDs: Cross-namespace identities that unify multiple user IDs into a single profile

The system is designed to create a sustainable, market-driven approach to identity management while implementing anti-squatting measures, reputation tracking, and social connectivity features.

2. System Architecture

2.1 Core Components

The system architecture consists of several integrated components:

  • ReddIDManager: Central controller for the entire system
  • NamespaceManager: Handles namespace registration, rules, and governance
  • AuctionManager: Manages auction processes for both namespaces and user IDs
  • ProfileManager: Maintains ReddID profiles, social connections, and reputation
  • ReddIDDB: Database backend for persistent storage
  • ReddIDP2PManager: Handles peer-to-peer communication for the system

2.2 Database Schema

The system uses a comprehensive database schema with tables for:

  • Namespaces and their configurations
  • User IDs and metadata
  • Auctions and bids
  • ReddID profiles and social connections
  • Reputation data and history
  • Namespace-to-UserID resolutions

2.3 Blockchain Integration

The system integrates with the Reddcoin blockchain using:

  • OP_RETURN Transactions: For recording registration, transfer, and auction data
  • Custom Operation Codes: Specific operation codes for different user ID operations
  • P2P Message Extensions: New message types for system-specific communication

3. Namespace System

3.1 Namespace Properties

Namespaces serve as top-level domains and contain the following properties:

  • Identifier: 1-15 character string (a-z, 0-9, hyphen)
  • Owner: Cryptographic address of the namespace owner
  • Character Rules: Whether numbers, hyphens, and underscores are allowed
  • Length Requirements: Minimum and maximum length for user IDs
  • Economic Parameters: Revenue distribution percentages
  • Auction Parameters: Duration, bid increments, etc.
  • Renewal Settings: Period, grace period, and fees

3.2 Namespace Acquisition

Namespaces are acquired through competitive auctions:

  1. Auction Creation:

    • Minimum 14-day auction period
    • 20% deposit requirement
    • Length-based reserve pricing (higher for shorter names)
  2. Bidding Process:

    • 5% minimum bid increment
    • Anti-sniping extension if bids are placed near closing
    • Limited to 5 extensions maximum
  3. Finalization:

    • Winner receives namespace ownership
    • Auction proceeds distributed according to system rules
    • Default configuration established

3.3 Namespace Management

Namespace owners can:

  • Update configuration parameters within platform limits
  • Set custom pricing tiers for different user ID lengths
  • Define custom rules for user IDs within their namespace
  • Receive a percentage of all user ID auction proceeds
  • Transfer ownership to other addresses
  • Renew their namespace before expiration

4. User ID System

4.1 User ID Properties

User IDs represent individual identifiers within namespaces:

  • Name: Variable-length string adhering to namespace rules
  • Namespace: Parent namespace identifier
  • Owner: Cryptographic address of the user ID owner
  • Registration Time: When the user ID was registered
  • Expiration Time: When the user ID expires
  • Usage Statistics: Transaction count and last transaction timestamp

4.2 User ID Acquisition

User IDs are acquired through auctions similar to namespaces:

  1. Auction Creation:

    • Duration based on namespace settings (typically 3-7 days)
    • Deposit requirement defined by namespace (typically 10%)
    • Reserve price determined by namespace pricing tiers
  2. Bidding Process:

    • Minimum increment defined by namespace
    • Anti-sniping extensions based on namespace rules
    • ReddID association for bidders (optional)
  3. Finalization:

    • Winner receives user ID ownership
    • Auction proceeds distributed according to namespace rules
    • Initial registration with expiration based on namespace renewal period

4.3 User ID Management

User ID owners can:

  • Transfer ownership to other addresses
  • Renew their user ID before expiration
  • Associate with ReddID profiles for cross-namespace identity
  • Use the ID for transactions and social interactions
  • Benefit from usage-based renewal discounts

5. ReddID System

5.1 ReddID Profiles

ReddIDs provide cross-namespace identity with:

  • Identifier: 3-32 character string (a-z, 0-9, underscore)
  • Display Name: User-friendly display name
  • Profile Information: Bio, avatar, social links
  • Verification Status: From self-attested to officially verified
  • Messaging Key: Public key for encrypted communications
  • Namespace Resolutions: Links to user IDs across namespaces

5.2 Social Connectivity

ReddIDs support social relationships:

  • Connection Types: Follow, Friend, Endorse, Block
  • Visibility Settings: Public, Friends-only, or Private
  • Metadata: Additional relationship context
  • Discovery: Directory search and suggestions
  • Cross-Namespace: Connections that span multiple namespaces

5.3 Reputation System

The system includes a comprehensive reputation framework:

  • Overall Score: Aggregate reputation (0-100)
  • Score Components:
    • Longevity: Account age and history
    • Transaction: Payment history and behavior
    • Engagement: Community interaction levels
    • Verification: Identity verification depth
    • Auction: Bidding behavior and reliability
  • Calculation Nodes: Distributed calculation for objectivity
  • History Tracking: Historical reputation data for trend analysis

6. Auction System

6.1 Auction Types

The system supports multiple auction types:

  • Standard Auctions: Default auction type for most identifiers
  • Premium Auctions: For high-value identifiers with longer durations
  • Verified Entity Auctions: For legally registered entities with verification requirements
  • Renewal Auctions: For identifiers approaching expiration

6.2 Auction Workflow

The auction process follows a defined workflow:

  1. Creation: Specifying the identifier, reserve price, and duration
  2. Active Period: Open for bidding with anti-sniping protections
  3. Finalization: Winner determination and settlement
  4. Distribution: Revenue sharing based on configured percentages

6.3 Anti-Sniping Mechanisms

To prevent last-minute auction sniping:

  • Auctions automatically extend if bids are placed near the end
  • Extension duration is configurable per namespace
  • Maximum number of extensions prevents indefinite auctions

7. Economic Model

7.1 Revenue Distribution

Auction proceeds are distributed according to a configurable model:

  • Burn Pool: 50-80% of proceeds are permanently removed from circulation
  • Namespace Owner: 5-10% goes to the namespace owner
  • Node Operators: 5-25% rewards those maintaining the network
  • Development Fund: 5-15% supports ongoing development

7.2 Pricing Strategies

Pricing is determined by multiple factors:

  • Length-Based: Shorter identifiers command higher prices
  • Character Composition: Pure alphabetic may be priced differently than alphanumeric
  • Namespace-Specific: Each namespace can define custom pricing tiers
  • Market Dynamics: Auctions ensure optimal price discovery

7.3 Renewal Economics

Renewal is designed to discourage squatting:

  • Standard Renewal: Typically 50% of equivalent auction price
  • Usage Discounts: Active users receive discounts (up to 25%)
  • Grace Period: Higher fees during the grace period
  • Reclamation: Expired identifiers enter public auction if not renewed

8. Implementation Details

8.1 Data Structures

Key data structures include:

  • NamespaceInfo: Contains all namespace configuration data
  • UserIDInfo: Stores user ID registration and ownership data
  • AuctionInfo: Manages auction state and parameters
  • BidInfo: Records individual bids in auctions
  • ReddIDProfile: Stores cross-namespace identity information
  • ReddIDConnection: Maintains social relationship data
  • ReddIDReputation: Tracks reputation scores and components

8.2 OP_RETURN Formats

Blockchain operations use specialized OP_RETURN formats:

// Namespace Auction Creation
0     2  3          7    8         16   17   25    26     34       35    39
|-----|--|----------|----|---------|----|-----|-----|------|---------|----|
magic op  auctionId type nameHash  ns   start  end  reserve config
// User ID Auction Creation
0     2  3                             39  
|----|--|-----------------------------|  
magic op   name.namespace_id (37 bytes)
// ReddID Profile Update
0     2  3                             35   36    100
|----|--|-----------------------------|-----|-----|
magic op   reddid_id (32 bytes)       time  ipfs

8.3 P2P Messages

The P2P network implements specialized messages:

  • Auction Announcements: For new auctions and bids
  • Configuration Requests: For namespace rules synchronization
  • Profile Updates: For identity changes
  • Connection Operations: For social relationship changes
  • Reputation Updates: For reputation score propagation

9. Security Considerations

9.1 Identity Verification

The system implements multiple verification levels:

  • Self-Attested: Basic profile creation
  • Community Verified: Peer-based attestation
  • Official Verification: For legally registered entities
  • Progressive Verification: Users can upgrade their verification level

9.2 Dispute Resolution

A comprehensive framework handles disputes:

  • Trademark Claims: Process for brand and trademark holders
  • Impersonation Claims: Protections against identity fraud
  • Governance: Multi-level decision-making structure
  • Appeals Process: Method to challenge decisions

9.3 Privacy Controls

Privacy protections include:

  • Granular Settings: User-controlled visibility for profile data
  • Encrypted Messaging: Public key infrastructure for communications
  • Selective Display: Control over information shared with connections
  • Data Minimization: Only essential data stored on-chain

10. API and Integration

10.1 RPC Commands

The system provides comprehensive RPC commands:

  • Namespace Operations: getnamespacelist, getnamespaceinfo, etc.
  • User ID Operations: getuseridlist, getuseridinfo, etc.
  • Auction Operations: createuseridauction, bidonuseridauction, etc.
  • Profile Operations: getuserconnections, createuserconnection, etc.
  • Reputation Operations: getuserreputation, calculateuserreputation, etc.

10.2 Programmatic Interface

A C++ interface enables programmatic access:

// Interface methods
bool createNamespaceAuction(const std::string& namespaceId, const CKeyID& creator,
                          CAmount reservePrice, int durationDays, AuctionType type,
                          uint256& auctionId);

bool bidOnUserIDAuction(const uint256& auctionId, const CKeyID& bidder, CAmount bidAmount);

bool updateProfile(const std::string& reddId, const ReddIDProfile& profile, const CKeyID& owner);

10.3 External System Integration

The system supports integration with:

  • Cross-Chain Resolution: Interoperability with other blockchain naming systems
  • Web Standards: Compatibility with W3C DID and Verifiable Credentials
  • Legacy Systems: OAuth bridging to traditional authentication
  • API Gateway: For traditional system integration

11. Future Directions

11.1 Technical Enhancements

Planned technical improvements include:

  • State Channel Implementation: Layer-2 solution for rapid bidding
  • Merkle Tree Auction Proofs: Efficient on-chain storage
  • Zero-Knowledge Mechanisms: Enhanced privacy and security

11.2 Economic Refinements

Economic model refinements under consideration:

  • Dynamic Reserve Pricing: Machine learning-based price adjustment
  • Community Staking for Governance: Stake-weighted voting
  • Inter-Namespace Markets: Mechanisms for cross-namespace transfers

11.3 User Experience Improvements

User experience improvements in development:

  • Namespace-Specific Analytics: Historical data and predictive guidance
  • Unified Management Interface: Single dashboard for all identity assets
  • Mobile and Browser Extensions: Expanded platform support

12. Conclusion

The Reddcoin User ID Management System represents a comprehensive approach to blockchain-based identity. By combining namespaces, user IDs, and ReddIDs in a hierarchical structure, it provides both the technical infrastructure and economic incentives needed for sustainable digital identity. The auction-based allocation mechanism ensures fair distribution of valuable identifiers while creating deflationary pressure on the RDD supply.

With features spanning from basic naming to social connectivity and reputation tracking, the system aims to become a foundational layer for identity in the Reddcoin ecosystem and potentially beyond, addressing the growing need for user-controlled, verifiable, and portable digital identities.

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