Sun. Jan 2nd, 2022
    DeNS, Free TON,

    The contest for the creation of a decentralized name service, DeNS, announced at the beginning of the year, has been completed. As a technological solution for this service, we proposed the previously described TIP-2 Decentralized Certificates (DeCert) distributed certificate storage design.

    According to the results of the contest, it was supposed to award five winners with amounts from 50,000 to 10,000 tokens in increments of 10,000. Each participant had to develop a certificate system that would be based on TIP-2, and the platform must contain the ability to create subdomains, purchase domains through an auction, have a DeBot interface.

    The three contest leaders scored the same number of points and shared first place. These are the TONRED, Skydev0h and RSquad teams. The prize for each of them is 40,000 TON Crystal.

    The TONRED team’s solution stood out as the most elaborate system for providing protection against potential attacks. Here you can instantly buy a domain name for a short time at a fixed price. Each domain name certificate has its type of subdomain registration and the registration type and other parameters can be changed by the certificate owner. It is stipulated that subsidiary certificates can be issued no longer than the validity period of the parent certificate.

    One auction contract will be deployed for each domain.

    Participant Skydev0h’s solution is a platform that can be both a nickname and an auction, and that provides for updates and actualization. The presented platform consists of several smart contracts, which are responsible for a specific area in the system:

    • DensRoot root smart contract, which is responsible for installing, storing, and coordinating other components. 
    • DensPlatform is the basement for other smart contracts, such as certificates and auctions. 
    • DensCertificate holds information about pointing to a specific smart contract address that can be retrieved and updated by the certificate owner. It can also ask DensRoot to deploy subdomains on behalf of the owner. 
    • DensAuction is based on the Vickrey algorithm and is used to distribute domains under the root smart contract. It is deployed and destroyed on-demand when needed, holds funds of auction participants and returns them when the auction is complete.

    We spoke with RSquad partner Roman Nguyen about the specifics of the contest task, the competing programs, and the offer submitted by their team.

    The variant presented by RSquad and Roman Nguyen himself is conceptually different in that both the naming system and the auction are resolved through decentralized ledgers. Roman shared with us the difficulty that initially stumped their team in the distributed solution of auction technology:

    “To know who won, we need to know all the bets, and this already requires the centralization of the ledger. The solution was found quickly — it was decided to remember the highest one after the first bet was revived, and as a result, the need to store all information about the bets disappeared.

    Through distributed ledgers, the very fundamental architecture of the platform presented by RSquad was also solved. The addresses, or NICs, whose decentralized service needed to be created, represent a set of three data obtained as a result of a certain number of transformations. It is a public key, a smart contract code, and some initial state. In solving the contest task, the team was helped by the technological advantage of Free TON in comparison with other blockchains, which consists in the fact that everything in it is a smart contract. This means that while in most other blockchains the address is some derivative of the public key, in Free TON the address is a collection of data, which allows not only the public key but also various additional data to be ‘encoded’ into the address”.

    According to Roman Nguyen, this technological feature allows developers to use standard approaches known since the beginning of the computer era because ultimately they deal with data expressed in a table. The only difference is that in the classical form this table is stored in one place, and with distributed data, it is, as Roman describes, “like a tree”. As a result, this technology does not change the user experience — despite the non-standard approach, when working with a decentralized ledger, the user performs the same number of actions to get a result as if he worked with the standard, centralized one. All the magic that is invisible to him happens “under the hood”.

    The RSquad option proposes the introduction of domain name levels. Roman told us how it works:

    “There is Root, and in order for decentralized registries to be created, you need the domain name to know its owner, to have some kind of unique identifier. In this case, it is Name. For first-level domains, the nickname has a deployer — Root and some Name. The owner of this certificate can register their subdomains or second-level domains. The owner can create as many subdomains as he wants or transfer them to other owners. Because a subdomain is the same as a domain, just part of its name is a domain name. For a domain, the deployer is Root, for a subdomain — domain”.

    In the future, according to Roman, it is possible to organize auctions for subdomains, which is quite attractive for the Free TON ecosystem, since it creates a secondary market for names.

    What’s Next?

    The three winning solutions are three different isolated systems.

    This means, according to Roman Nguyen, that the implementation of a specific solution in Free TON will depend on who and how will be engaged in production. So far, all three technologies still need to be improved in order to approach the production-ready mark.

    It is also worth noting that at one of the AMA sessions, CTO of TON Labs, Mitja Goroshevsky, said that it is possible to organize the interaction of several DeNS services through DeBot, which could result in the blockchain ecosystem having three different systems with the same smart contract names functioning in parallel.