Overall Structure
VNS implements Open-Zeppelin's NFT contracts and is compliant with VeChain's VIP-181 standard. All additional logic is all placed in Registry.sol. Beyond Open-Zeppelin, we have one other import, an assembly script for returning the length of a string. This functionality allows us to enforce a minimum character limit on VNS domain names, in order to prevent squatting of high value domains early on.

VIP-181 Compliance

As domains are implemented as VIP-181 tokens, users are able to use existing wallets and services that support VIP-181s to help manage their domains. We plan to leverage Valkyrie to enable users to buy and sell domains and help match domain names with owners who will find the most use of them. VNS domains will also be able to seamlessly work with future dApps and interfaces that support VIP-181s.

Tokens to Domains

As VNS implements VIP-181, we use non-fungible-tokens (NFTs) to represent the different domains within the system. Each NFT has a numeric ID starting from 1 and incrementing with each new domain minted. Transferring this token will transfer ownership and control of the corresponding domain name. Once a user has control of the NFT behind the domain, they can change what address the domain points at, manage subdomains, or sell the domain to another user.