# 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.&#x20;

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](../../domain-management/domain-operations#operators "mention")) 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.

{% hint style="info" %}
Please note that all domain registrations include a 'protocol fee' set by ZERO that applies only when the price and 'stake fee' (if applicable) are greater than zero (0).

When registering a domain via ZERO's stake-to-mint paradigm, the protocol fee will be symmetrical, meaning it will be charged both during domain registration and domain revocation (if applicable).&#x20;
{% endhint %}

The configuration is as follows:

<table data-header-hidden><thead><tr><th width="230"></th><th width="314.3333333333333"></th><th></th></tr></thead><tbody><tr><td><strong>Property</strong></td><td><strong>Definition</strong></td><td><strong>Options</strong></td></tr><tr><td><code>IZNSPricerContract</code></td><td> 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.</td><td><code>ZNSFixedPricer</code>  (address) or <code>ZNSCurvePricer</code>  (address)</td></tr><tr><td><code>PaymentType</code></td><td>Set the form of payment for subdomain creation.</td><td>DIRECT (0) or STAKE (1)</td></tr><tr><td><code>AccessType</code></td><td>Specify what users are able to mint subdomains.</td><td>LOCKED (0), OPEN (1), or MINTLIST (2)</td></tr><tr><td>priceConfig</td><td>Bytes encoded representation of a price config for a specific Pricer contract chosen as <code>pricer</code> above.</td><td>Encoded <code>struct PriceConfig</code> of a specific Pricer with data filled.</td></tr></tbody></table>

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.

{% hint style="info" %}
ZERO can not be held responsible for the behavior and logic of any 3rd party contracts used by domain owners. Each user should do their due diligence on the parent domain before purchasing their subdomain.
{% endhint %}

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](pricing "mention").

{% hint style="info" %}
NOTE: Solidity does not allow optional parameters and so “optional” ones listed must be provided as zero (0) values.
{% endhint %}

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 on `ZNSTreasury` contract inside a `paymentConfig` 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.
