Development of Custom Blockchain Domain Service
When standard .eth or .bnb are insufficient — you need a custom TLD for your ecosystem. .defi, .game, .dao, branded suffix like .uniswap — this is not just a name, it's the entry point to ecosystem identity. A custom domain service provides full control: pricing, registration rules, governance integration, ecosystem-specific resolver records.
Architectural Choice: ENS Fork vs From Scratch
Forking ENS is the right solution in 90% of cases. ENS has passed audits, has ready subgraphs, wallet integrations, and ethers.js understands it natively. Key components to modify:
Registry — practically unchanged. Node ownership logic is universal.
BaseRegistrar — change TLD to yours, adapt grace period and expiry policy to project needs.
ETHRegistrarController — rename, change pricing, optionally remove commit-reveal if front-running protection is not needed.
PublicResolver — add custom record types specific to your ecosystem.
NameWrapper — optional, adds ERC-1155 subdomains and fuses.
Custom Resolver Records
For a gaming domain, specific data is needed:
// Extend PublicResolver with custom fields
contract GamingResolver is PublicResolver {
// node => game_id => in-game address
mapping(bytes32 => mapping(uint256 => string)) private _gameAddresses;
// node => character stats (IPFS hash)
mapping(bytes32 => string) private _characterData;
event GameAddressChanged(bytes32 indexed node, uint256 gameId, string gameAddress);
function setGameAddress(
bytes32 node,
uint256 gameId,
string calldata gameAddress
) external authorised(node) {
_gameAddresses[node][gameId] = gameAddress;
emit GameAddressChanged(node, gameId, gameAddress);
}
function gameAddress(bytes32 node, uint256 gameId)
external view returns (string memory)
{
return _gameAddresses[node][gameId];
}
}
Custom Pricing Logic
ENS fork uses linear or tiered pricing by name length. For a custom service, you can add:
Dynamic pricing by demand: price grows with high demand (like bonding curve).
Premium for short names at launch: first 30 days after launch — 10x price, then normalizes. Prevents bot hoarding of short names.
Whitelist phase: before public sale — registration only for holders of specific NFT or token.
contract CustomPriceOracle {
uint256 public constant LAUNCH_PREMIUM_PERIOD = 30 days;
uint256 public launchTime;
// Premium multiplier: decreases from 10x to 1x linearly over 30 days
function getPremiumMultiplier() public view returns (uint256) {
if (block.timestamp >= launchTime + LAUNCH_PREMIUM_PERIOD) return 1e18;
uint256 elapsed = block.timestamp - launchTime;
uint256 premium = 10e18 - (9e18 * elapsed / LAUNCH_PREMIUM_PERIOD);
return premium;
}
function price(string calldata name, uint256 duration)
external view returns (uint256)
{
uint256 basePrice = getBasePrice(name, duration);
return basePrice * getPremiumMultiplier() / 1e18;
}
}
Governance Integration
For DAO-managed namespace: pricing changes, new TLDs, reserved names — all through governance proposal.
contract DomainGovernor {
ICustomRegistry public registry;
ICustomPriceOracle public priceOracle;
// Only through governance timelock
function updatePrices(uint256[] calldata newPrices) external onlyTimelock {
priceOracle.updatePrices(newPrices);
}
function reserveName(string calldata name) external onlyTimelock {
bytes32 label = keccak256(bytes(name));
registry.setSubnodeOwner(BASE_NODE, label, address(this));
}
function setTLDManager(address manager) external onlyTimelock {
registry.setOwner(ROOT_NODE, manager);
}
}
Revenue Model
Monetization options:
Registration fees — primary source. 100% to treasury or split with stakers.
Renewal fees — annually. Provides predictable flow, motivates keeping popular names active.
Secondary market royalty — 2-5% of secondary sales (ERC-2981). Passive income from NFT trading.
Premium auctions — short names (1-3 characters) sold via Vickrey or Dutch auction instead of fixed price.
Wallet and Wallet Integration
Challenge with custom domains: wallets don't know about them by default. Solutions:
Rainbow kit, WalletConnect: support any EVM-compatible ENS fork if you provide the correct registry address.
Universal Resolver: ENS L1 resolver can be configured as a gateway for custom namespaces via CCIP-Read. This allows MetaMask and other wallets to resolve custom names without changes on their side.
Custom browser extension: for maximum control — but high adoption barrier.
Stack
| Component | Technology |
|---|---|
| Contracts | Solidity 0.8.x + ENS fork + OpenZeppelin |
| Subgraph | The Graph (AssemblyScript) |
| Resolution SDK | TypeScript, fork ENS.js |
| Frontend | React + wagmi + viem |
| CCIP-Read gateway | Node.js + Express |
| Auction mechanism | Vickrey or Dutch auction contract |
Development Timeline
Phase 1 — Core contracts (4-6 weeks): Registry + Resolver + BaseRegistrar + PriceOracle + Controller. ENS fork adaptation.
Phase 2 — Extended features (2-4 weeks): custom resolver types, governance integration, premium auction.
Phase 3 — Infrastructure (2-3 weeks): The Graph subgraph, resolution SDK, CCIP-Read gateway.
Phase 4 — Frontend (2-4 weeks): registration UI, domain management, marketplace integration.
Audit (2-4 weeks): mandatory, registrar accepts ETH/tokens.
Full production-ready service: 3-4 months. MVP with basic registration: 6-8 weeks.







