โ๏ธBase Distribution Configuration
When a top-level domain is registered through ZNSRootRegistrar
, optional distribution configs --dictating the rules for creation of its subdomains -- can be specified. These are kept on the subdomain specific registrar ZNSSubRegistrar
responsible for creating and managing subdomains.
The registration process for subdomains also allows an optional distribution to be specified with the parameters outlined below. If no configuration is provided, the configuration will be empty and any attempts to mint further subdomains will fail. Domain owners or approved operators (see Operators) are an exception to this; owners and operators do not require payment of any kind beyond transaction gas costs, thus the configuration of the parent domain doesn't matter.
The configuration is as follows:
Property
Definition
Options
IZNSPricerContract
The address of the contract that defines the pricing system for subdomains. Optionally, any 3rd party contract can potentially be set here by the domain owner. Zero is not responsible for behavior or logic of any 3rd party contracts.
ZNSFixedPricer
(address) or ZNSCurvePricer
(address)
PaymentType
Set the form of payment for subdomain creation.
DIRECT (0) or STAKE (1)
AccessType
Specify what users are able to mint subdomains.
LOCKED (0), OPEN (1), or MINTLIST (2)
priceConfig
Bytes encoded representation of a price config for a specific Pricer contract chosen as pricer
above.
Encoded struct PriceConfig
of a specific Pricer with data filled.
Pricer contracts define a model for domains prices to be calculated. Two price contracts are provided by ZNS as ZNSFixedPricer
and ZNSCurvePricer
, but external, custom contracts maybe be developed by and added for any community as the system is modular.
The ZNS fixed price contract (ZNSFixedPricer
) defines a simple model where a domain owner specifies a specific, set price for child subdomain registrations, as well as an optional fee to be implemented if the parent domains chooses stake payments for subdomain registrations. The price of every subdomain for this parent domain will be the same.
The ZNS curved price contract (ZNSCurvePricer
) is more complex and specifies several variables used in calculating the price of a child subdomain based on its character length. More details on this can be found here in Pricing.
The Options referenced above are defined as follows:
DIRECT: Payment is a one-time, irreversible transfer of funds from the user registering the child domain to the parent domain
beneficiary
set onZNSTreasury
contract inside apaymentConfig
struct.STAKE: A staking contract is funded with the stake amount until such a time as the subdomain is revoked by its owner; if or when that occurs, the stake amount will be refunded to the subdomain owner, but the subdomain will be destroyed. An optional stake fee can be set by the parent domain owner on top of the stake amount. If the subdomain is revoked in the future, neither the stake fee nor the ZERO's protocol fee will be returned. Only the protocol fee is symmetrical -- not the stake fee -- and thus only the protocol fee will be charged on revocation.
LOCKED: Only a domain's owner or operator can mint subdomains.
OPEN: Anyone can mint subdomains for a given parent domain.
MINTLIST: Only those enumerated in a specified mintlist of users can mint subdomains for a given parent domain.
Last updated