Home Docs Blog Contact

Core Architecture

November 19th, 2021

The Domain is the main contract of Avvy. A Domain is an ERC721 NFT, making it compatible with standard NFT exchanges. Additional code in the Domain contract implements the the Domain Name Lifecycle, keeping track of registrations and allows authorized Agent contracts to handle actions such as leasing, auctions, and domain recycling (see below for more information).

Domain names hashed using the Poseidon hash (read more about privacy mechanisms here). Unlike ENS, the Domain represents only the second level of a name (for example, avvydomains.avax can be registered but subdomain.avvydomains.avax cannot). Registrars for subdomains will be possible but via additional contracts.
 


Domains belong to a Namespace. Each Namespace (such as .avax) defines the following parameters of the Domain Name Lifecycle:

  • the Grace Period length defines how long the previous registrant of a domain will have to re-claim the domain before the domain is offered to others.
  • the Recycling Period length defines how long Recycling Agents will have to recycle the domain, after the domain lease has expired and the Grace Period has finished. One example method of recycling a domain is to use an English Auction.

Each Namespace will reference the following contracts:

  • a Name Constraint contract, responsible for deciding whether a given name can or cannot be registered in the Namespace. Because domains are referenced using NameHash, these name constraints will be enforced using zero-knowledge proofs.
  • a Pricing Oracle, responsible for fetching the lease price of a given name. Again, because domains are referenced using NameHash, properties of a given name required for determining pricing will be asserted via zero-knowledge proofs.

 

Domain Management Agents

In order to reduce the complexity of the Domain contract, various responsibilities have been allocated to external contracts referred to as Agents. 

 

Leasing Agent

Contracts acting as Leasing Agents are the primary allocators of domains. For example, domains registered during the Sunrise Auction or afterwards will be leased via Leasing Agents. These contracts will also be responsible for lease extensions and Grace Period renewals.

Recycling Agent

After a domain has expired and the Grace Period has elapsed, the domain is considered to be permanently expired, entering the Recycling Period. During the Recycling Period, Recycling Agents will be responsible for allocating the domain. An example re-allocation process would be an English Auction.

Suspension Agent & Revocation Agent

Suspension and revocation mechanisms have been built into the core contract. Suspension involves disabling a domain, while revocation involves transferring it to another registrant at any given time. The processes related to suspension & revocation are not yet defined, however the roles have been built in & separated to keep possibilities open in the future.