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:
Each Namespace will reference the following contracts:
In order to reduce the complexity of the Domain contract, various responsibilities have been allocated to external contracts referred to as Agents.
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.
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 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.