📋 SubdomainPolicy Structure
The WildDNS contract allows domain owners to create sophisticated subdomain ecosystems using the SubdomainPolicy structure. Each policy defines how subdomains under a parent domain behave, enabling various business models and use cases.
🔧 subdomainsEnabled
Master switch to enable/disable subdomain creation under this domain
🌍 publicMintingEnabled
Allow anyone to mint subdomains (true) or restrict to domain owner only (false)
⚡ forceBuyEnabled
Enable force-buy mechanism for subdomains during specific time windows
🔥 forceBuyAlwaysEnabled
Allow force-buy at any time, creating a continuous marketplace
🔄 domainOwnerRecoverable
Allow domain owner to recover/reclaim subdomains if needed
✏️ canBeRenamed
Allow subdomain owners to rename their subdomains
💰 mintPrice
Price in wei for minting new subdomains
📈 forceBuyPriceMultiplier
Multiplier (2-5x) for calculating force-buy prices
🛡️ forceBuyProtectionPeriod
Time in seconds when subdomains can be obtained with force-buy after minting or after last force-buy
Default 2 weeks
🔄 refreshPeriod
Time window for domain refresh, when entering the refresh beriod, after the force-buy period ends then only the owner can use refresh to extend the refresh period and force-buy is not allowed
Fefault 52 weeks, it is 54 - 2 from forceBuyProtectionPeriod
⏰ subscriptionDuration
Duration of subdomain subscriptions (0 = no subscription enabled)
Can be used for subscripon based services
🔒 mintLockPeriod
Additional optional time after minting when force-buy is possible, this can increase the time associtated with forceBuyProtectionPeriod but only for mints
Can be used for example to allow new minted subdomains to be aquired (only once) with force buy in first 3 months after minting without changing forceBuyProtectionPeriod
🚀 Application Examples
Here are different types of applications you can build using various subdomain policy configurations:
Premium Status Domains
Exclusive high-value domains where ownership represents status and wealth.
Configuration:
- publicMintingEnabled: true
- mintPrice: 5 ETH (millionaire.wild)
- forceBuyAlwaysEnabled: true
- forceBuyPriceMultiplier: 2
- subscriptionDuration: 0 (permanent)
Use Case: john.millionaire.wild, sarah.ceo.wild - Always yours until someone pays double!
Brand Control System
Complete brand control where only domain owner can create and manage subdomains.
Configuration:
- publicMintingEnabled: false
- mintPrice: 0 (owner only)
- forceBuyEnabled: false
- domainOwnerRecoverable: true
- subscriptionDuration: 0 (permanent)
Use Case: api.my_company.wild, docs.my_company.wild - Airdrop functionality with super powers!
Free-to-Start Marketplace
Anyone can register free subdomains, but they become tradeable through force-buy.
Configuration:
- publicMintingEnabled: true
- mintPrice: 0 ETH (free)
- forceBuyAlwaysEnabled: true
- forceBuyPriceMultiplier: 2
- subscriptionDuration: 0 (permanent)
Use Case: dev.onchain.wild, crypto.onchain.wild - Free to start, tradeable forever!
Personal Brand (No Subdomains)
Keep your domain exclusive - no subdomains allowed to maintain brand integrity.
Configuration:
- subdomainsEnabled: false
- All other settings: N/A
Use Case: vitalik.wild - Exclusive personal brand, no subdomains!
Subscription Service Access
Time-based access to services through renewable subdomain subscriptions.
Configuration:
- publicMintingEnabled: true
- mintPrice: 0.1 ETH
- forceBuyEnabled: false
- subscriptionDuration: 30 days
- domainOwnerRecoverable: false
Use Case: user123.netflix.wild, premium.spotify.wild - Buy once, renew to maintain access!
Donation & Proof Platform
Transparent donation system where higher donations can claim recognition spots.
Configuration:
- publicMintingEnabled: true
- mintPrice: 0.01 ETH (min donation)
- forceBuyAlwaysEnabled: true
- forceBuyPriceMultiplier: 2
- subscriptionDuration: 0 (permanent)
Use Case: mike.christmas_donations.wild, sarah.new_boat.wild - Proof of donation with competitive giving!
Marketplace Platform
Create a decentralized marketplace where each store gets its own subdomain.
Configuration:
- publicMintingEnabled: true
- mintPrice: 0.01 ETH
- forceBuyEnabled: true
- forceBuyAlwaysEnabled: false
- canBeRenamed: true
Use Case: store1.marketplace.wild, electronics.marketplace.wild
Gaming Guilds
Gaming communities where each guild gets a subdomain with subscription model.
Configuration:
- publicMintingEnabled: false
- subscriptionDuration: 30 days
- mintPrice: 0.005 ETH
- domainOwnerRecoverable: true
- forceBuyEnabled: false
Use Case: dragons.gaming.wild, warriors.gaming.wild
Corporate Departments
Enterprise solution where departments get managed subdomains.
Configuration:
- publicMintingEnabled: false
- mintPrice: 0 (free for owner)
- forceBuyEnabled: false
- domainOwnerRecoverable: true
- canBeRenamed: false
Use Case: hr.company.wild, marketing.company.wild
NFT Collections
Each NFT project gets a subdomain with high-value trading mechanics.
Configuration:
- publicMintingEnabled: true
- mintPrice: 0.1 ETH
- forceBuyAlwaysEnabled: true
- forceBuyPriceMultiplier: 3
- mintLockPeriod: 7 days
Use Case: cryptopunks.nft.wild, artblocks.nft.wild
Educational Platform
Schools and courses with semester-based subdomain access.
Configuration:
- publicMintingEnabled: false
- subscriptionDuration: 120 days
- mintPrice: 0.02 ETH
- forceBuyEnabled: false
- refreshPeriod: 180 days
Use Case: math101.university.wild, physics.university.wild
Freelancer Network
Professional network where freelancers can claim and trade profiles.
Configuration:
- publicMintingEnabled: true
- mintPrice: 0.05 ETH
- forceBuyEnabled: true
- forceBuyPriceMultiplier: 2
- canBeRenamed: true
Use Case: designer.freelance.wild, developer.freelance.wild
💡 Revenue Models
🤝 Revenue Sharing
Domain owners earn 80% of subdomain mint and renewal fees, while 20% goes to the protocol. For force-buy transactions, subdomain owners get 70%, parent domain owners get 24%, and the protocol gets 6%.
💎 Premium Domains
Set high mint prices for exclusive subdomain spaces
🔄 Subscription Model
Recurring revenue through subscription-based subdomains
it can also be used for gated access to other resources, for example user A authenticates with eth wallet, then the service can check if that wallet has a valid subscription
⚡ Trading Fees
Earn from force-buy transactions in your subdomain ecosystem
🎯 Freemium
Free basic subdomains with premium features available
🛠️ Implementation Example
Here's how to set up a marketplace subdomain policy:
setSubdomainPolicy( parentTokenId, true, // subdomainsEnabled true, // publicMintingEnabled true, // forceBuyEnabled false, // forceBuyAlwaysEnabled false, // domainOwnerRecoverable true, // canBeRenamed 10000000000000000, // mintPrice (0.01 ETH) 3, // forceBuyPriceMultiplier 604800, // forceBuyProtectionPeriod (7 days) 4665600, // refreshPeriod (54 weeks) 0, // subscriptionDuration (permanent) 0, // mintLockPeriod "https://api.marketplace.wild/metadata/", // metadataPrefix "0x" // customData ); // Configure free subdomain policy, a second example await wildDNS.setSubdomainPolicy( onchainTokenId, true, // subdomainsEnabled true, // publicMintingEnabled true, // forceBuyEnabled false, // forceBuyAlwaysEnabled false, // domainOwnerRecoverable true, // canBeRenamed 0, // FREE minting 2, // multiplier 86400, // 1-day protection 604800, // 7-day refresh period 0, // no subscription 604800, // 7-day mint lock "", "0x" ); // main SubdomainPolicy structure struct SubdomainPolicy { bool subdomainsEnabled; bool publicMintingEnabled; bool forceBuyEnabled; bool forceBuyAlwaysEnabled; bool domainOwnerRecoverable; bool canBeRenamed; uint256 mintPrice; uint256 forceBuyPriceMultiplier; uint256 forceBuyProtectionPeriod; uint256 refreshPeriod; uint256 subscriptionDuration; uint256 mintLockPeriod; string metadataPrefix; bytes customData; }