The tokens object defines each type of token in the data contract. At a minimum, a token must consist of conventions and change control rules. Each token must be assigned a unique position within the contract and follow the token constraints.
The following example shows a minimal tokens object defining a single token with basic conventions:
{
"tokens": {
"0": {
"$format_version": "0",
"conventions": {
"$format_version": "0",
"localizations": {
"en": {
"$format_version": "0",
"shouldCapitalize": false,
"singularForm": "credit-token",
"pluralForm": "credit-tokens"
}
},
"decimals": 8
}
}
}
}Tokens may also define distribution rules, history tracking, marketplace rules, and various configuration options. Refer to this table for a brief description of the major token sections:
| Feature | Description |
|---|---|
| Conventions | Display properties including localization, decimals, and naming conventions |
| Configuration | Behavioral settings for token operations, freezing, and emergency actions |
| Change Control Rules | Authorization rules governing who can modify token parameters |
| Distribution Rules | Rules for token distribution, minting destinations, and pricing |
| History Tracking | Configuration for recording token operations in Platform history |
Token creation incurs specific fees based on which token features are used:
| Operation | Fee (DASH) | Description |
|---|---|---|
| Token registration | 0.1 | Base fee for adding a token to a contract |
| Perpetual distribution | 0.1 | Fee for enabling perpetual distribution |
| Pre-programmed distribution | 0.1 | Fee for enabling pre-programmed distribution |
| Search keyword fee | 0.1 | Per keyword fee for including search keywords |
Each token in the tokens object must be assigned a unique position value, with ordering starting at zero and incrementing with each token. The position is used as the key in the tokens object and indicates which token to perform operations on when a contract contains multiple tokens.
{
"tokens": {
"0": { /* first token definition */ },
"1": { /* second token definition */ },
"2": { /* third token definition */ }
}
}The conventions object defines the display and formatting properties of a token. It includes localization settings, decimal precision, and naming conventions that determine how the token is presented to users.
The localizations object contains language-specific display properties using ISO 639-1 language codes as keys. Each localization entry includes:
| Property | Type | Description |
|---|---|---|
$format_version |
string | Version of the localization format (currently "0") |
shouldCapitalize |
boolean | Whether the token name should be capitalized when displayed |
singularForm |
string | Singular form of the token name |
pluralForm |
string | Plural form of the token name |
"localizations": {
"en": {
"$format_version": "0",
"shouldCapitalize": true,
"singularForm": "loyalty-point",
"pluralForm": "loyalty-points"
},
"es": {
"$format_version": "0",
"shouldCapitalize": false,
"singularForm": "punto-de-lealtad",
"pluralForm": "puntos-de-lealtad"
}
}The decimals property specifies the number of decimal places for token amounts. This affects how token balances are displayed and calculated. If decimals is set to zero, token operations (e.g., mint, transfer) will only allow integer amounts.
"conventions": {
"$format_version": "0",
"localizations": { /* ... */ },
"decimals": 8 // 8 decimal places (default)
}Token configuration controls behavioral aspects of token operations, including supply management, operational controls, and security features.
| Property | Type | Description |
|---|---|---|
baseSupply |
unsigned integer | Initial supply of tokens created at contract deployment |
maxSupply |
unsigned integer | Maximum number of tokens that can ever exist (null for unlimited) |
| Property | Type | Description |
|---|---|---|
startAsPaused |
boolean | Whether the token begins in a paused state where tokens cannot be transferred |
allowTransferToFrozenBalance |
boolean | Whether transfers to frozen balances are permitted |
| Property | Type | Description |
|---|---|---|
mainControlGroup |
unsigned integer | Position assigned to the main control group |
mainControlGroupCanBeModified |
string | Authorization level for modifying the main control group |
Example:
{
"baseSupply": 1000000,
"maxSupply": 10000000,
"startAsPaused": false,
"allowTransferToFrozenBalance": true,
"mainControlGroup": null,
"mainControlGroupCanBeModified": "NoOne"
}Change control rules define authorization requirements for modifying various aspects of a token after deployment. These rules specify who can make changes and under what conditions.
Rules can authorize no one, specific identities, or multiparty groups. The complete set of options defined by DPP is:
| Authorized Party | Description |
|---|---|
NoOne |
No one is authorized |
ContractOwner |
Only the contract owner is authorized |
Identity(Identifier) |
Only an identity is authorized |
MainGroup |
Only the main control group is authorized |
Group(<x>) |
Only the specific group based in contract position "x" is authorized |
Each rule consists of the following parameters defined in DPP that control its behavior:
| Field | Description |
|---|---|
authorized_to_make_change |
This is who is authorized to make such a change. Valid values are listed in the authorized parties table. |
admin_action_takers |
This is who is authorized to make such a change to the people authorized to make a change. Valid values are listed in the authorized parties table. |
changing_authorized_action_takers_to_no_one_allowed |
Are we allowed to change to NoOne in the future (default: false) |
changing_admin_action_takers_to_no_one_allowed |
Are we allowed to change the admin action takers to NoOne in the future (default: false) |
self_changing_admin_action_takers_allowed |
Can the admin action takers change themselves (default: false) |
Example
"<rule_name>": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
}Tokens support the following change control rules:
| Rule Name | Description |
|---|---|
conventionsChangeRules |
Controls who can modify token conventions (localization) |
maxSupplyChangeRules |
Controls who can modify the maximum supply limit |
perpetualDistributionRules |
Controls who can modify perpetual distribution settings (subset of distributionRules) |
preProgrammedDistribution |
Controls who can modify pre-programmed distribution settings (subset of distributionRules) |
newTokensDestinationIdentityRules |
Controls who can change where new tokens are sent (subset of distributionRules) |
mintingAllowChoosingDestinationRules |
Controls who can modify minting destination rules (subset of distributionRules) |
changeDirectPurchasePricingRules |
Controls who can set direct purchase pricing (subset of distributionRules) |
tradeModeChangeRules |
Controls who can modify trade mode rules (subset of marketplaceRules) |
manualMintingRules |
Controls who can manually mint tokens |
manualBurningRules |
Controls who can manually burn tokens |
freezeRules |
Controls who can freeze token balances |
unfreezeRules |
Controls who can unfreeze token balances |
destroyFrozenFundsRules |
Controls who can destroy frozen funds |
emergencyActionRules |
Controls who can execute emergency actions |
Example:
"manualMintingRules": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
}Distribution rules govern how tokens are created, allocated, and priced within the platform. These rules provide flexible mechanisms for token distribution and marketplace integration.
| Property | Type | Description |
|---|---|---|
perpetualDistribution |
object | Ongoing distribution mechanism for continuous token allocation |
perpetualDistributionRules |
object | Change control rules for perpetual distribution |
preProgrammedDistribution |
object | Scheduled distribution events with specific timing and recipients |
newTokensDestinationIdentity |
string | Default identity to receive newly minted tokens |
newTokensDestinationIdentityRules |
object | Change control rules for destination identity |
mintingAllowChoosingDestination |
boolean | Whether minting operations can specify custom destinations |
mintingAllowChoosingDestinationRules |
object | Change control rules for destination choice |
changeDirectPurchasePricingRules |
object | Change control rules for direct purchase pricing |
Perpetual distribution enables ongoing token allocation. The following configuration distributes 100 tokens to the contract owner every 60 minutes (3600000 ms):
"perpetualDistribution": {
"$format_version": "0",
"distributionType": {
"TimeBasedDistribution": {
"interval": 3600000,
"function": {
"FixedAmount": {
"amount": 100
}
}
}
},
"distributionRecipient": "ContractOwner"
}A wide variety of emission patterns are provided to cover most common scenarios. The following table summarizes the options and links to further details.
| Name | Description |
|---|---|
| Fixed Amount | Emits a constant number of tokens per period |
| Random | Emits a random amount between min and max, using a PRF |
| Step Decreasing Amount | Emits tokens that decrease in discrete steps at fixed intervals |
| Linear | Linear growth/decay with integer or fractional precision |
| Polynomial | Polynomial with integer or fractional exponents or coefficients |
| Exponential | Emits tokens following an exponential function |
| Logarithmic | Slows emission over time |
| Inverted Logarithmic | Slows emission over time |
| Stepwise | Emits constant values within predefined steps |
Emits a constant (fixed) number of tokens for every period.
- Formula:
f(x) = n - Use Case:
- When a predictable, unchanging reward is desired.
- Simplicity and stable emissions.
- Example: If
n = 5tokens per block, then after 3 blocks the total emission is 15 tokens.
Emits a random number of tokens within a specified range.
-
Formula:
f(x) ∈ [min, max]- Constraints:
minmust be ≤max, otherwise the function is invalid.- If
min == max, this behaves like a Fixed Amount function with a constant emission.
- Constraints:
-
Description
- This function selects a random token emission amount between
minandmax. - The value is drawn uniformly between the bounds.
- The randomness uses a Pseudo Random Function (PRF) from x.
- This function selects a random token emission amount between
-
Use Case
- Stochastic Rewards: Introduces randomness into rewards to incentivize unpredictability.
- Lottery-Based Systems: Used for randomized emissions, such as block rewards with probabilistic payouts.
-
Example
Suppose a system emits between 10 and 100 tokens per period.
Random { min: 10, max: 100 }Period (x) Emitted Tokens (Random) 1 27 2 94 3 63 4 12 - Each period, the function emits a random number of tokens between
min = 10andmax = 100. - Over time, the average reward trends toward the midpoint
(min + max) / 2.
- Each period, the function emits a random number of tokens between
Emits tokens that decrease in discrete steps at fixed intervals.
- Formula:
f(x) = n * (1 - (numerator / denominator))^((x - s) / step_count) - Description: Reduces token emissions by a fixed percentage at regular intervals. Includes optional start offset and minimum emission floor.
step_count: number of periods between each stepnumeratoranddenominator: the reduction factor per steps: optional start period offset (e.g., start block or time). If not provided, the contract creation start is used.n: initial token emission amountmin_value: optional minimum emission value
- Use Case: Reward systems with predictable decay—ideal for Bitcoin-style halvings or Dash-style gradual reductions
- Example:
- Bitcoin: 50% reduction every 210,000 blocks
- Dash: ~7% reduction every 210,240 blocks
Emits tokens following a linear function that can increase or decrease over time with fractional precision.
-
Formula:
f(x) = (a * (x - s) / d) + b -
Description: Supports both integer and fractional slopes via
a / dratio. Enables precise reward schedules without floating-point rounding errors.- Parameters
a: slope numerator (positive = increase, negative = decrease)d: slope divisor (enables fractional precision)s: optional start period offset (defaults to contract creation)b: starting emission amountmin_value/max_value: optional emission bounds
- Behavior
- If
a > 0, emissions increase linearly over time - If
a < 0, emissions decrease linearly over time - If
a = 0, emissions remain constant atb
- If
- Parameters
-
Use Case: Predictable inflation or deflation, gradual reward scaling, clamped emission schedules
-
Example:
- Increasing Linear Emission:
f(x) = (1 * (x - 0) / 1) + 10 - Decreasing Linear Emission:
f(x) = (-2 * (x - 0) / 1) + 100 - Delayed Start:
f(x) = (5 * (x - 10) / 1) + 50 - Clamping Emissions:
f(x) = (2 * (x - 0) / 1) + 50
- Increasing Linear Emission:
A polynomial function using fixed-point arithmetic for fractional or integer exponents.
-
Formula:
f(x) = (a * (x - s + o)^(m / n)) / d + b -
Description:
Emits tokens based on a polynomial curve, where the exponent is defined as a fraction (m / n). This enables a wide range of growth or decay behaviors—linear, quadratic, root-based, and more—using precise fixed-point logic.
Parameters:a: coefficient scaling the curve (positive for growth, negative for decay)mandn: exponent numerator and denominator, allowing fractional powers (e.g.,m = 1,n = 2→ square root)d: divisor to scale the results: optional start period offseto: offset inside the exponent inputb: amount added after the curve is computedmin_value/max_value: optional boundaries to clamp emissions
-
Use Case:
- Accelerating Growth: Use
a > 0andm > 1for quadratic/cubic growth - Diminishing Emissions: Use
a < 0and fractional exponents for decaying curves - Root-based Models: Use
m = 1,n > 1to slow down early growth - Flexibility: Fine-tune emission behavior with high control over shape
- Accelerating Growth: Use
-
Example:
- Increasing Polynomial Growth:
f(x) = (2 * (x - s + o)^2) / d + 10 - Decreasing Polynomial Decay:
f(x) = (5 * (x - s + o)^(-1)) / d + 10 - Inverted Growth → Decreasing Over Time:
f(x) = (-3 * (x - s + o)^2) / d + 50 - Inverted Decay → Slowing Increase:
f(x) = (-10 * (x - s + o)^(-2)) / d + 50
- Increasing Polynomial Growth:
Emits tokens following an exponential function.
- Formula:
f(x) = a * e^(b * x) + c - Description:
b> 0 -> rapid growthb< 0 -> rapid decay
- Use Case: Early contributor boosts or quick emission tapering
- Example: f(x) = 100 * e^(-0.693 * x) + 5
Logarithmic growth of token emissions.
- Formula:
f(x) = a * log_b(x) + c - Description: Growth slows as
xincreases - Use Case: Sustainable long-term emission tapering
- Example: f(x) = 20 * log_2(x) + 5
Emits tokens following an inverted logarithmic decay curve.
-
Formula:
f(x) = (a * log(n / (m * (x - s + o)))) / d + b -
Description:
Emits a high number of tokens initially, with emissions decreasing rapidly at first, then slowing over time. Useful when early adoption or front-loaded incentives are desired.
Parameters:a: scaling factor for the log termd: divisor to scale the final resultmandn: Control the logarithmic inversiono: offset applied inside the logarithms: optional start period offset (defaults to contract creation time if not provided)b: offset added after scalingmin_value/max_value: optional bounds to constrain emissions
-
Use Case:
- Gradual Decay of Rewards: Prioritize early users with higher emissions that reduce over time
- Resource Draining / Controlled Burn: Designed for token models where supply tapers gradually
- Airdrops & Grants: Rewards diminish for late claimants, encouraging early participation
-
Example:
-
f(x) = (1000 * log(5000 / (5 * (x - 1000)))) / 10 + 10 -
Sample outputs:
Period (x) Emission (f(x)) 1000 500 tokens 1500 230 tokens 2000 150 tokens 5000 50 tokens 10,000 20 tokens 50,000 10 tokens -
Starts high and decays gradually without hitting zero too fast
-
Emits tokens in fixed amounts for specific intervals.
- Description: Emissions remain constant within each step
- Use Case: Adjust rewards at specific milestones
- Example: 100 tokens per block for first 1000 blocks, then 50 tokens thereafter
Pre-programmed distribution allows scheduling specific token allocations at predetermined times. The following configuration distributes 3 sets of tokens to the same identity at the defined timestamps:
"preProgrammedDistribution": {
"$format_version": "0",
"distributions": {
"1749662152621": {
"2yZbE3TAZAhLwNVQk7JMUUuBXgrVt1NG172PGjeUfjUo": 100
},
"1749665692621": {
"2yZbE3TAZAhLwNVQk7JMUUuBXgrVt1NG172PGjeUfjUo": 1000
},
"1781198092621": {
"2yZbE3TAZAhLwNVQk7JMUUuBXgrVt1NG172PGjeUfjUo": 1000000
}
}
}Direct purchase pricing enables tokens to be purchased directly using Platform:
"changeDirectPurchasePricingRules": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
}Token history tracking controls which operations are recorded in Platform's historical records. This provides audit trails and transparency for token operations.
| Property | Type | Default | Description |
|---|---|---|---|
keepsTransferHistory |
boolean | true | Record all token transfers |
keepsFreezingHistory |
boolean | true | Record freeze/unfreeze operations |
keepsMintingHistory |
boolean | true | Record token minting events |
keepsBurningHistory |
boolean | true | Record token burning events |
keepsDirectPricingHistory |
boolean | true | Record direct purchase price changes |
keepsDirectPurchaseHistory |
boolean | true | Record direct purchase transactions |
Example:
"keepsHistory": {
"$format_version": "0",
"keepsTransferHistory": true,
"keepsFreezingHistory": true,
"keepsMintingHistory": true,
"keepsBurningHistory": true,
"keepsDirectPricingHistory": true,
"keepsDirectPurchaseHistory": false
}Marketplace rules define how tokens can be traded within Platform's built-in marketplace system.
| Mode | Description |
|---|---|
NotTradeable |
Token cannot be traded on the marketplace |
Example:
"marketplaceRules": {
"$format_version": "0",
"tradeMode": "NotTradeable",
"tradeModeChangeRules": {
"V0": {
"authorized_to_make_change": "NoOne",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
}
}For performance and security reasons, tokens have the following constraints:
| Parameter | Value |
|---|---|
| Maximum number of keywords | 50 |
| Keyword length | 3 to 50 characters |
| Description length | 3 to 100 characters |
| Maximum note length | 2048 characters |
| Maximum number of tokens per contract | Only limited by maximum contract size |
| Parameter | Value |
|---|---|
| Language code length | 2 to 12 characters |
| Token name length (singular) | 3 to 25 characters |
| Token name length (plural) | 3 to 25 characters |
| Decimal places | 0 to 16 |
| Maximum localization entries | Only limited by maximum contract size |
| Parameter | Value |
|---|---|
| Maximum token amount | 2^64 - 1 |
This example shows the complete structure of a token definition with all major configuration options:
{
"tokens": {
"0": {
"$format_version": "0",
"conventions": {
"$format_version": "0",
"localizations": {
"en": {
"$format_version": "0",
"shouldCapitalize": true,
"singularForm": "reward-token",
"pluralForm": "reward-tokens"
}
},
"decimals": 8
},
"conventionsChangeRules": {
"V0": {
"authorized_to_make_change": "NoOne",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"baseSupply": 1000000,
"maxSupply": 10000000,
"keepsHistory": {
"$format_version": "0",
"keepsTransferHistory": true,
"keepsFreezingHistory": true,
"keepsMintingHistory": true,
"keepsBurningHistory": true,
"keepsDirectPricingHistory": true,
"keepsDirectPurchaseHistory": true
},
"startAsPaused": false,
"allowTransferToFrozenBalance": true,
"maxSupplyChangeRules": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"distributionRules": {
"$format_version": "0",
"perpetualDistribution": null,
"perpetualDistributionRules": {
"V0": {
"authorized_to_make_change": "NoOne",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"preProgrammedDistribution": null,
"newTokensDestinationIdentity": null,
"newTokensDestinationIdentityRules": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"mintingAllowChoosingDestination": true,
"mintingAllowChoosingDestinationRules": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"changeDirectPurchasePricingRules": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
}
},
"manualMintingRules": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"manualBurningRules": {
"V0": {
"authorized_to_make_change": "ContractOwner",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"freezeRules": {
"V0": {
"authorized_to_make_change": "NoOne",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"unfreezeRules": {
"V0": {
"authorized_to_make_change": "NoOne",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"destroyFrozenFundsRules": {
"V0": {
"authorized_to_make_change": "NoOne",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"emergencyActionRules": {
"V0": {
"authorized_to_make_change": "NoOne",
"admin_action_takers": "NoOne",
"changing_authorized_action_takers_to_no_one_allowed": false,
"changing_admin_action_takers_to_no_one_allowed": false,
"self_changing_admin_action_takers_allowed": false
}
},
"mainControlGroup": null,
"mainControlGroupCanBeModified": "NoOne",
"description": "Reward token for customer loyalty program"
}
}
}