What is HostDec?
HostDec combines three layers to create a complete decentralized hosting protocol: a smart contract on the blockchain, a web interface, and a desktop browser with native resolution.
.hostdec domains natively. Downloadable as a .exe from GitHubFull flow
From registration to having your site accessible at yourdomain.hostdec, the process follows four clear steps.
Register the domain in the DApp
Connect MetaMask at hostdec.com, type the desired name, and approve the transaction with HDEC tokens. The contract on Arbitrum One mints an ERC-721 NFT directly to your wallet. This token represents exclusive and irrevocable ownership of the domain.
Upload your site to IPFS
Use Pinata, Web3.Storage, or any IPFS node to upload your site files. What you need is the root CID of the directory, in the format QmXyz… or bafy….
Link the CID to the domain
In "My Domains" on the DApp, paste the CID and sign with your wallet. The contract executes setCIDWeb(tokenId, cid) and stores the association on-chain. From that moment, the server can resolve the domain.
Browse with the desktop browser
Download the HostDec browser from GitHub (a single .exe). Type yourdomain.hostdec directly in its address bar: the browser fetches the CID from the blockchain and serves the IPFS content natively.
Smart Contract
The smart contract is the core of the protocol. It manages domain ownership, stores IPFS CIDs, and maintains the version history of each token. Administration is protected by a timelock + multisig system.
Domain NFT
Each registered domain is a unique, indivisible ERC-721 token. Ownership of the NFT equals ownership of the domain: transferring it transfers full control.
Two independent CID types
The contract distinguishes two CID storages with different purposes:
getCIDWebdomain.hostdec.getCurrentCIDCircular version buffer
The contract maintains a history of the latest NFT metadata versions. You can query previous versions with getRecentHistory(tokenId), which returns an array of {cid, timestamp}, the total historical update count, and the oldest version available in the buffer.
Metadata cooldown
The updateMetadata function has a waiting period between updates to prevent on-chain spam. If you try to update before it expires, the contract reverts with the UpdateTooSoon error indicating exactly how much time is left. The web CID (setCIDWeb) has no such restriction.
HDEC Token
Domains are registered by paying with the protocol's native token: HDEC. The price varies by name length: shorter names are scarcer and have higher value.
| Length | Example | Price | Rarity |
|---|---|---|---|
| 3 characters | btc.hostdec |
10,000 HDEC | ● Premium |
| 4 characters | defi.hostdec |
1,000 HDEC | ● Rare |
| 5–6 characters | pablo.hostdec |
500 HDEC | ● Standard |
| 7+ characters | miblog.hostdec |
100 HDEC | ● Common |
approve() with the exact amount if your current allowance is insufficient, then proceeds with registerDomain().
Contract functions
Reference of the main ABI functions for integrating with or directly interacting with the protocol.
getCIDWeb(uint256 tokenId) → string
Returns the CID of the published website. This is the one the server resolves and serves at domain.hostdec.
getCurrentCID(uint256 tokenId) → string
Returns the current CID from the NFT metadata buffer (tokenURI). Independent from the web CID.
getRecentHistory(uint256 tokenId) → (versions[], totalCount, oldestAvailable)
History from the circular metadata buffer: array of {cid, timestamp}, total update count, and the oldest version available.
hasCIDWeb(uint256 tokenId) → bool
Indicates whether the domain has a web CID configured. Allows checking if the domain has published content.
setCIDWeb(uint256 tokenId, string cid)
Links an IPFS CID to the domain as a website. Can only be called by the NFT owner. No cooldown.
updateMetadata(uint256 tokenId, string cid)
Updates the NFT tokenURI CID with a cooldown between calls. Records the new version in the circular buffer.
DomainRegistered(address owner, string name, uint256 tokenId, uint256 price, uint256 timestamp)
Emitted when a new domain is registered. Contains owner, name, tokenId, price paid in HDEC, and timestamp.
CIDWebUpdated(uint256 tokenId, string cid, address updatedBy, uint256 timestamp)
Emitted every time the domain's web CID is updated. Allows indexing the publication history.
The Web DApp
hostdec.com is the main interface of the protocol. From there you register domains, manage IPFS content, operate the marketplace, and monitor on-chain stats.
Register a domain
The registration process is guided step by step in the DApp. Here is what happens technically at each stage.
Availability check
The DApp calls getTokenId(name) on the contract. If it returns 0, the name is available. Simultaneously it calculates the price based on length and displays it before continuing.
HDEC approval (if needed)
If your current allowance is less than the required price, the DApp automatically executes tokenContract.approve(CONTRACT_ADDRESS, price). This transaction only costs gas, not HDEC.
NFT minting
With approval confirmed, the DApp executes registerDomain(name). The contract transfers the HDEC, mints the ERC-721 NFT to your wallet, and emits the DomainRegistered event. The operation is irreversible and permanent on the blockchain.
Naming rules
Names must have a minimum of 3 characters and can only contain lowercase letters a-z, numbers 0-9, and hyphens -. They cannot start or end with a hyphen.
Publish content on IPFS
IPFS is the decentralized storage network where your site's content lives. The contract only stores the CID; the actual content lives on IPFS.
What is a CID?
A CID (Content Identifier) is the unique content identifier on IPFS. It is cryptographically derived from the content itself: the same file always generates the same CID. When you update your site, the CID changes.
How to upload to IPFS
You can use pinning services like Pinata or Web3.Storage. You upload your site folder and get the root CID of the directory. That CID is what you paste in "My Domains" on the DApp.
Resolution in the browser
The HostDec browser fetches the CID registered in the contract, caches it locally, and loads the content by accessing the IPFS network directly via ipfs://{cid}. Internal navigation between pages on the site is resolved dynamically within the same .hostdec domain.
// Resolution logic in the browser const tokenId = await contract.getTokenId(keyword); const cid = await contract.getCIDWeb(tokenId); // Load content: ipfs://{cid}/{subpath}
Marketplace
Domain NFTs can be freely bought and sold in the integrated marketplace. Transactions are settled in ETH with real-time pricing.
Order protocol
The marketplace uses the OpenSea Seaport protocol to structure orders. This ensures compatibility with the NFT ecosystem and transactions include the standard protocol fee.
HostDec Desktop Browser
The HostDec desktop browser is a standalone application that natively resolves .hostdec domains, does not modify OS settings, and works entirely online.
How does it work?
The browser includes a built-in resolution engine. When you type a .hostdec address in its navigation bar, the application directly queries the contract on Arbitrum to get the IPFS CID associated with the domain and loads the content transparently. It does not need local intermediate servers or special OS permissions.
Resolution flow
You enter myblog.hostdec in the browser
The browser detects the .hostdec TLD and intercepts navigation to use its own decentralized resolution engine, instead of conventional DNS.
Queries the Arbitrum blockchain
The browser calls getTokenId(name) to get the domain's tokenId, then getCIDWeb(tokenId) to retrieve the active IPFS CID. The result is cached locally to speed up subsequent visits.
Loads content from IPFS
With the CID in hand, the browser accesses the IPFS network and renders the site directly in its window. The address bar shows myblog.hostdec at all times, preserving the expected browsing experience.
.exe from GitHub Releases. Download, run, and browse.
Download & installation
The HostDec browser is distributed from GitHub Releases as a ready-to-use executable file. No installers, no dependencies.
Steps for Windows
Download the executable
Visit the Releases page on the official HostDec GitHub repository and download the .exe file for the latest stable version.
Run the browser
Double-click the downloaded .exe. No installation or admin permissions required. The browser opens directly, ready to browse.
Browse .hostdec domains
Type any registered domain in the address bar (e.g.: myblog.hostdec) and the browser resolves it automatically by querying the online blockchain.
.hostdec domains you need an active internet connection.