Dap enhances the Handshake protocol to create a more accessible and utility‑focused decentralized naming system. While Handshake laid the groundwork for blockchain‑based DNS resolution, real‑world adoption has been limited by complex registration mechanisms and misaligned incentives favoring speculation over utility. Dap addresses these limitations through streamlined name registration, enhanced security, and improved economic incentives that prioritize network stability and development over token speculation.
The Domain Name System (DNS) remains one of the most centralized components of the modern internet. While Handshake introduced a compelling vision for decentralizing the DNS root zone through blockchain technology, its initial implementation revealed several limitations that have hindered widespread adoption.
Dap maintains Handshake's core mission of decentralizing internet naming while addressing key technical and practical limitations. By refining Handshake's proven foundations rather than reinventing them, Dap aims to make decentralized naming more accessible, secure, and useful for everyday internet users.
Handshake was conceived as a decentralized protocol to serve as an alternative to ICANN's root zone management. Its key innovations included:
Several issues have emerged that limit Handshake's potential:
Dap adopts RandomX as its proof‑of‑work algorithm to promote decentralized participation in network security. RandomX is specifically designed for CPUs, making mining accessible to a broader range of participants while maintaining strong security properties.
Key characteristics:
The registration system implements a phased release schedule with built‑in protections against speculation and squatting:
releaseSchedule: {
phases: [
{
claimWindow: "7 days",
deposit: 1000,
names: "Single characters, numbers",
type: "Premium"
},
{
claimWindow: "7 days",
deposit: 500,
names: "Two characters, dictionary words",
type: "Standard Plus"
},
{
claimWindow: "7 days",
deposit: 100,
names: "All remaining names",
type: "Standard"
}
]
}
The economic model prioritizes sustainable development and network stability over token speculation:
distribution: {
community: "20%", // Grants, education, tools
operators: "30%", // DNS infrastructure providers
protocol: "40%", // Core protocol development
treasury: "10%" // Emergency/future funding
}
The network supports three types of nodes to accommodate different use cases and resource capabilities:
Dap maintains compatibility with existing DNS infrastructure while improving record management:
interface DNSSystem {
// DNSSEC configuration
dnssec: {
algorithms: ["ECDSA", "Ed25519"],
autoRenewal: boolean,
keyRotation: Duration
},
// Standard record types
records: {
custom: Map<string, RecordTemplate>,
extended: ["TLSA", "CAA", "SRV"],
standard: ["A", "AAAA", "MX", "TXT", "CNAME"]
},
// Performance optimization
serving: {
caching: boolean,
ttl: Duration,
geographic: boolean
}
}
The security model addresses several key threats:
Economic mechanisms protect against abuse while ensuring sustainable development:
interface SecurityMechanisms {
registration: {
// Auction mechanics
auctions: {
extensionTime: "1 day",
minBidIncrease: "10%",
minDuration: "3 days"
},
// Claim window deposits
deposits: {
lockPeriod: "30 days",
minimums: Map<NameType, Amount>,
returnPeriod: "7 days"
}
},
operations: {
// Infrastructure incentives
rewards: {
distribution: "20%",
performance: "30%",
records: "20%",
uptime: "30%"
}
}
}
class ModernRegistrar {
async registerName(name: string) {
// Check phase eligibility
const phase = await network.getCurrentPhase();
if (!phase.isEligible(name))
throw new Error("Name not available in current phase");
// Place deposit
const deposit = await this.calculateDeposit(name);
await this.submitDeposit(name, deposit);
// Monitor claim window
return await this.monitorRegistration(name);
}
}
class DNSProvider {
// High‑availability DNS serving
async serveRecords(name: string) {
// Fetch and verify records
const records = await this.getVerifiedRecords(name);
// Distribute to edge locations
await this.distributeRecords(records);
// Monitor and earn rewards
this.startMetricsCollection();
}
}
class HostingPlatform {
async deployWebsite(name: string, content: Site) {
// Configure DNS
await this.configureDNS(name);
// Deploy content
await this.deployContent(content);
// Setup monitoring
await this.setupMonitoring(name);
}
}
class IdentityProvider {
async verifyDomainOwnership(name: string) {
// Verify on‑chain ownership
const owner = await network.verifyOwner(name);
// Check DNS control
await this.verifyDNSControl(name, owner);
// Issue credentials
return this.issueCredentials(name, owner);
}
}
Dap builds upon Handshake's foundation to create a more accessible and practical decentralized naming system. By focusing on real‑world usability while maintaining strong security principles, Dap aims to accelerate the adoption of decentralized internet naming.
The key improvements include:
Through these improvements, Dap provides a foundation for a more open, secure, and user‑controlled internet naming system.
const PROTOCOL_CONSTANTS = {
// Block parameters
BLOCK_TIME: 600, // 10 minutes
DIFFICULTY_ADJUSTMENT: 2016, // ~2 weeks
MAX_BLOCK_SIZE: 4_000_000, // 4MB
// RandomX parameters
MEMORY_SIZE: 2 * 1024 * 1024 * 1024, // 2GB
PROGRAM_ITERATIONS: 1024,
PROGRAM_SIZE: 256,
SCRATCHPAD_SIZE: 2 * 1024 * 1024, // 2MB
// Network parameters
DEFAULT_PORT: 12035,
MAX_PEERS: 128,
PROTOCOL_VERSION: 1,
// Name system parameters
CLAIM_WINDOW: 604800, // 7 days in seconds
EXTENSION_TIME: 86400, // 1 day in seconds
MAX_NAME_LENGTH: 63, // DNS standard
MIN_NAME_LENGTH: 1,
WAIT_PERIOD: 1209600 // 14 days in seconds
};
interface Block {
header: {
bits: number,
merkleRoot: Hash,
nonce: number,
prevBlock: Hash,
time: number,
version: number
},
nameOperations: NameOp[],
transactions: Transaction[]
}
interface NameRecord {
expires: number,
name: string,
owner: PublicKey,
records: {
dns: DNSRecord[],
dnssec: DNSSECConfig,
metadata: Map<string, string>
},
registered: number,
status: "Active" | "InAuction" | "InClaimWindow" | "InWaitPeriod"
}
enum MessageType {
ALERT = 11, // Network alerts
BLOCKS = 4, // Block data
GETBLOCKS = 3, // Request block headers
GETDATA = 8, // Request specific data
GETNAMES = 5, // Request name data
INV = 7, // Inventory announcement
MEMPOOL = 9, // Request mempool contents
NAMES = 6, // Name data
TX = 10, // Transaction data
VERACK = 2, // Version acknowledgment
VERSION = 1 // Protocol version exchange
}
interface ConsensusRules {
// Block validation
block: {
// Must build on heaviest chain
chainWeight: "cumulative-work",
// Difficulty adjusts every 2016 blocks
difficultyAdjustment: 2016,
// Maximum size including all data
maxSize: 4_000_000,
// Must maintain 10‑minute average spacing
spacing: 600
},
// Name operations
names: {
// Cannot front‑run auctions
auctionRules: true,
// Only one active claim window per name
uniqueClaims: true,
// Must complete wait period
waitPeriod: true
}
}
class NameAPI {
// Query operations
async lookup(name: string): Promise<NameRecord> {
// Verify name format
this.validateName(name);
// Check local state first
const local = await this.state.lookup(name);
if (local)
return local;
// Query network if not found locally
return await this.network.lookup(name);
}
async checkAvailability(name: string): Promise<{
available: boolean,
earliestAvailable: number,
phase: Phase
}> {
// Check current registration phase
const phase = await this.getCurrentPhase();
// Verify name eligibility
return this.checkEligibility(name, phase);
}
async register(name: string, options: {
deposit: Amount,
owner: PublicKey,
records?: DNSRecord[]
}): Promise {
// Validate registration request
await this.validateRegistration(name, options);
// Submit deposit
const deposit = await this.submitDeposit(options.deposit);
// Enter claim window
return await this.enterClaimWindow(name, deposit);
}
}
class NetworkAPI {
async broadcast(tx: Transaction): Promise<string> {
// Validate transaction
await this.validateTransaction(tx);
// Get connected peers
const peers = await this.getPeers();
// Broadcast to all peers
return await this.broadcastToPeers(peers, tx);
}
// Peer management
async connect(peer: string): Promise<boolean> {
// Validate peer address
this.validatePeer(peer);
// Establish connection
const connection = await this.createConnection(peer);
// Handshake
return await this.performHandshake(connection);
}
}
# Install dependencies
apt-get update
apt-get install -y \
build-essential \
cmake \
libssl-dev \
git
# Clone repository
git clone https://github.com/[project]/[name]
cd [name]
# Build
mkdir build
cd build
cmake ..
make
# config.yaml
dns:
port: 53
recursive: false
serve: true
mempool:
maxmemory: "2GB" # Maximum memory usage
maxsize: 300000 # Maximum transaction count
mining:
enabled: true
threads: 4 # Number of mining threads
network:
maxpeers: 50
port: 12035
node:
datadir: "/data"
type: "full" # full, light, or dns-only
class Registrar {
constructor(config: Config) {
this.node = new Node(config);
this.db = new Database(config.database);
this.monitoring = new Monitoring();
}
async handleRegistration(request: RegRequest) {
// Verify phase eligibility
const phase = await this.node.getCurrentPhase();
if (!phase.isEligible(request.name))
throw new Error("Name not available in current phase");
// Calculate deposit
const deposit = this.calculateDeposit(request.name);
// Process deposit
const receipt = await this.processDeposit(request.payment);
// Enter claim window
const claim = await this.node.enterClaimWindow(request.name, {
deposit: deposit,
owner: request.owner
});
// Monitor status
this.monitorClaim(claim);
return claim;
}
async start() {
// Initialize services
await this.node.connect();
await this.setupAPI();
await this.startMonitoring();
// Start processing registrations
this.processQueue();
}
}
const operationalCosts = {
// Operating costs (monthly)
costs: {
bandwidth: "$30-50",
electricity: "$20-40",
infrastructure: "$50-100"
},
// Hardware requirements
hardware: {
bandwidth: "100Mbps+",
cpu: "4+ cores",
memory: "8GB minimum",
storage: "100GB+ SSD"
}
};
const feeAllocation = {
// Community allocation (20%)
community: {
education: "5%", // Documentation/training
grants: "10%", // Developer grants
outreach: "5%" // Community building
},
// Development allocation (40%)
development: {
core: "15%", // Core protocol
research: "5%", // Research/innovation
security: "10%", // Security/audits
tools: "10%" // Developer tools
},
// Operations allocation (30%)
operations: {
dns: "15%", // DNS infrastructure
monitoring: "5%", // System monitoring
network: "10%" // Network operations
},
// Reserve allocation (10%)
reserve: {
emergency: "5%", // Emergency fund
future: "5%" // Future development
}
};
const marketSegments = {
developers: {
avgNames: 3.2,
percentage: "5%",
useCase: "Development/testing"
},
enterprise: {
avgNames: 5.7,
percentage: "20%",
useCase: "Corporate infrastructure"
},
individuals: {
avgNames: 1.5,
percentage: "40%",
useCase: "Personal domains, projects"
},
smallBusiness: {
avgNames: 2.3,
percentage: "35%",
useCase: "Business presence"
}
};
const projections = {
year1: {
names: 100000,
operators: 500,
revenue: "$1M equivalent"
},
year2: {
names: 500000,
operators: 2000,
revenue: "$5M equivalent"
},
year3: {
names: 2000000,
operators: 5000,
revenue: "$20M equivalent"
}
};