DotnsFlatPricing
Inherits: IDotnsPricing
Title: DotNS Flat Pricing
Prices every registration at a single deposit, whatever the base length.
The launch cost model: one constant amount for any name the bands admit, so a nine-plus
character name costs the same flat deposit and shorter names stay gated by PopRules. The
deposit is fixed at deployment, so a new amount is a fresh deployment registered under
DotnsConstants.COST_MODEL. DotnsScarcityPricing is the length-sensitive alternative
held as a later candidate; it is not the registered default.
Note: security-contact: admin@parity.io
Constants
FORM_ID
Identifier of the flat model form, mixed into version.
Separates this form from another model that reuses the same deposit, so version
cannot collide across model forms.
uint256 public constant FORM_ID = uint256(keccak256("dotns.pricing.flat.v1"))
deposit
Deposit in wei charged for every base length.
uint256 public immutable deposit
Functions
constructor
Fixes the deposit for the life of this model.
Requires a strictly positive deposit so the model can never price at zero; a zero amount triggers @custom:reverts PricingError.
constructor(uint256 depositValue) ;
Parameters
| Name | Type | Description |
|---|---|---|
depositValue | uint256 | Deposit in wei charged for every base length. |
priceForBaseLength
Returns the registration cost in wei for a label of the given base length.
Returns the same deposit for every base length: the amount does not vary with the label, so the argument is read only to satisfy the interface.
function priceForBaseLength(uint256) external view override returns (uint256 weiPrice);
Parameters
| Name | Type | Description |
|---|---|---|
<none> | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
weiPrice | uint256 | Registration cost in wei for that base length. |
version
Returns a stable identifier for this model and its parameters.
Two deployments with the same deposit share a version; any change to the deposit changes it.
function version() external view override returns (uint256 modelVersion);
Returns
| Name | Type | Description |
|---|---|---|
modelVersion | uint256 | Identifier derived from the model form and its parameters. |