Incorporating NFTs into Neo Name Service
Neo Name Service (NNS) will be a native service on Neo3 to simplify hash string addresses with a full support for the NFT standard.
In current blockchains, the smart contract addresses and account addresses are often a complex and lengthy hash string, which are ‘too difficult’ for the human brain. We need a short, memorable sentence to replace these hash strings when used.
To make it more user friendly, we are introducing a native domain name system — Neo Name Service (NNS) in Neo3, using easy-to-remember domain names as a replacement for difficult-to-remember strings. Eg. Users can initiate a transaction directly to a certain domain name, the effect is the same as transferring money to a certain address.
Imagining, when buying a product, would you rather fill in an address of at least 20 characters, Eg.0xXXXXXXXXXXXXXXXXXXXX? Or just “justin.wallet”?
What is NNS
After learning from the DNS system in the real world, we designed NEO’s exclusive domain name service NNS for users.
NNS (Neo Name Service): An on-chain domain name service that can simplify complex and lengthy strings into simple short sentences that conform to a certain format, Eg. “0xXXXXXXXXXXXXXXXXXXXX”-> “xxx.xxx.xxx”. Users can directly use these short sentences to replace the original complex character strings, and the two have the same effect.
Domain assets under the NFT standard
We found in the design that the transfer and lease of domain names naturally have the property of ownership. This means that the domain name is an asset. Unlike traditional NEP5 standard digital assets, domain names are unique. This means that a new asset standard is needed to describe this asset, so we used the NFT standard.
NFT (Non-Fungible Token): defines an inseparable and unique interface specification for token interaction and circulation.
An open NNS ecology
NNS in NEO3 will be a semi-open domain name service. NEO’s protocol layer will provide the most basic domain name resolution, transfer, lease and other services. Domain name service providers or individual users can obtain the right to hold the domain name through lease, and resell or authorize it to secondary users, which will spawn a rich and diverse ecological application.
NNS Design
Define
Domain Name
Use an simple string to replace account address / contract address / other complex strings. Use a format similar to traditional DNS as the domain name format.
- Format:
third-level domain.second-level domain.top-level domain.root domain
Using “.” As a delimiter, the domain name level increases from right to left, the low-level domain name is the parent domain name of the high-level domain name, and the high-level domain name is the sub-domain name of the low-level domain name. The parent domain name initially owns all the subdomains under it.
NNS supports up to third-level domain names.
Domain lifecycle
In order to avoid long-term occupation of domain name resources by invalid or malicious acts, the root domain name is held by the administrator for a long time. The first-level domain name will adopt the lease model, and the validity period of other domain names is equivalent to the validity period of its first-level domain name.
If the domain name holder still wants to continue to hold the domain name, it needs to renew the first-level domain name.
System Structure
The overall system is composed of Domain Exchange, Registration Center, Registry Table and Resolver.
Registration Center: Responsible for the management of domain name registration, lease renewal, transfer and permission settings.
• Comply with NFT standards
• One of the core components
Registry Table: Record domain name, ownership, resolver, TTL (validity period) and other information.
• NameHash as data ID, value = hash (hash (hash (hash (root domain name) + first-level domain name) + second-level domain name) + third-level domain name)
• One of the core components
Resolver: Parse the domain name string and return the corresponding account address / contract address / other complex string
• One of the core components
How to use NNS
Domain lease
In order to avoid the long-term occupation of domain name resources by invalid or malicious acts, except for the root domain name that is held by the administrator for a long time, all other domain names will adopt the lease model. Users or domain name service providers can register a first-level domain name by paying a registration fee in the registration center, and may obtain the right to hold the domain name for one year. After the lease expires, if you still want to hold the domain name, you need to apply for lease renewal service in the registration center, otherwise the domain name holding rights will be recovered. Domains are for rent only.
Domain trading
The ownership of the domain name can be freely traded as an NFT asset. Users can sell their pending orders on the exchange, after the transaction is completed, register and transfer their holding rights in the registration center.
Domain parse
The user can query the resolver corresponding to the domain name through the registry table. The resolver will parse the domain name and return the corresponding string to complete the domain name resolution service. Of course, the resolver must be configured in advance, if not configured, it will return a null value.
Note: This scheme is still being perfected, not the final implementation.
Author: Mengyu Liu