Hey everyone,
Today I registered muneeb.btc and changed my Twitter name to muneeb.btc. Marvin has been working on the .btc app for some months and looks like it’s stable enough for community members to register domains.
What are .btc domains?
.btc domains are registered through a smart contract on Stacks. You can see the smart contract deployment here. It’s 917 lines of code written in Clarity language. The smart contracts runs on the Stacks chain, which has full smart contracts, and all transactions automatically settle on Bitcoin.
How .btc domains work?
Let’s look at an example name registration. Let’s say you wanted to register muneeb.id. You will:
-
Send a name-preorder transaction to the BNS smart contract. This transaction will contain a hashed name (argument called “hashed-salted-fqn”, fqn means fully-qualified-name). All Stacks transaction settle on Bitcoin i.e., every Stacks block has a corresponding Bitcoin block and Stacks block hashes are broadcasted on the Bitcoin main chain by miners. A single hash on Bitcoin can contain thousands of Stacks transactions. This is how you scale operations.
-
After your name-preorder transaction has enough confirmation, you will send a name-register transaction that reveals the name you registered. You include the name (e.g., muneeb) and the namespace (e.g., .btc) in this transaction. An example transaction is below:
Stacks transactions follow the probabilistic finality of Bitcoin i.e., once enough Bitcoin blocks have passed since the Stacks transaction that settled on a Bitcoin block then the Stacks transaction is considered (probabilistically) final.
You can learn more about the BNS contract here.
Benefits of .btc domains:
The benefit of this approach is that all additional data about smart contract language and data on registered domains is kept outside of the main Bitcoin chain (avoids spamming the main BTC chain) yet it benefits from the security of Bitcoin. To rewrite the history of Stacks, an attacker will need to rewrite Bitcoin blockchain history, which is extremely hard (almost impossible) to do.
You also don’t need to modify the Bitcoin main chain to introduce smart contracts. Such modifications cannot realistically happen given Bitcoin is durable/immutable and does not drastically change.
With the capabilities of Stacks, a relatively simple 917 lines of code implemented decentralized domains functionality. For those who remember Namecoin, Namecoin had to fork Bitcoin and run an entirely separate chain (merged mined with Bitcoin) to implement such functionality. With the design of Stacks any developer can deploy new types of smart contracts without the need to fork Bitcoin or run separate chains. Stacks transactions automatically settles on Bitcoin and smart contracts on Stacks automatically see all BTC state and can react to it and make it programmable.
What’s next for .btc?
We’re at an early stage of the .btc domains. Right now you can either directly interact with the BNS smart contract and register a domain or use a decentralized web registrar btc.us to register. With btc.us you are in control of your keys and can pay for the domain either in USD or using cryptocurrencies.
You can also set your zone file to redirect a subdomain like muneeb.btc.us to your favorite traditional DNS domain. You are of course trusting the owner of btc.us for the redirection in that case.
It’d be great to have .btc domains integrations with browsers like Brave and Opera (which have integrated other decentralized name systems before). Eventually I’d love to see direct support for .btc domains in web browsers so you can bypass the DNS system and directly use these domains, powered by Bitcoin!