Protocol Constants#
This page provides a comprehensive reference for all constants, limits, and default values defined in the Dash Platform Protocol implementation (rs-dpp).
System Limits#
Maximum sizes and limits for various platform components.
Limit |
Value |
Description |
Source |
|---|---|---|---|
Max contract size |
16,384 bytes (16 KiB) |
Maximum serialized data contract |
|
Max field value size |
5,120 bytes (5 KiB) |
Maximum single field value |
|
Max state transition size |
20,480 bytes (20 KiB) |
Maximum serialized state transition |
|
Max transitions in documents batch |
1 |
Maximum document transitions per batch |
|
Withdrawals per block |
4 |
Maximum withdrawal transactions per block |
|
Retry signing expired withdrawals per block |
1 |
Max expired withdrawal retries per block |
|
Max withdrawal amount |
50,000,000,000,000 credits |
500 Dash maximum per withdrawal |
|
Max contract group size |
256 |
Maximum members per group |
|
Max token redemption cycles |
128 |
Maximum redemption cycles |
|
Max shielded transition actions |
100 |
Maximum shielded transitions per batch |
|
Max CBOR encoded length |
16,384 bytes (16 KiB) |
Maximum CBOR encoding size |
|
Contract deserialization limit |
15,000 |
Maximum contract deserialization |
Credit System#
Credits are the unit of account for fees on Dash Platform. They are created from Dash locked on the Core blockchain.
Constant |
Value |
Description |
Source |
|---|---|---|---|
|
1,000 |
Credits created per duff (satoshi) |
|
|
9,223,372,036,854,775,807 |
Maximum credit value (i64::MAX) |
Conversion: 1 Dash = 100,000,000 duffs = 100,000,000,000 credits
Protocol Fees#
Base Processing#
These constants define the base costs for state transition processing.
Constant |
Value (Credits) |
Description |
Source |
|---|---|---|---|
|
10,000 |
Base state transition processing fee |
|
|
0 |
Default priority tip |
|
|
5,000 |
Storage cost per byte |
|
|
12 |
Processing cost per byte |
|
|
2,000 |
Base deletion cost |
|
|
8,400 |
Base read cost |
|
|
6,000 |
Base write cost |
State Transition Pricing#
These constants define minimum values required for a state transition to be considered valid.
State Transition |
Min Fee (Credits) |
Min Fee (Dash) |
Source |
|---|---|---|---|
Credit Transfer |
100,000 |
0.000001 |
|
Credit Transfer to Addresses |
500,000 |
0.000005 |
|
Credit Withdrawal |
400,000,000 |
0.004 |
|
Identity Update |
100,000 |
0.000001 |
|
Document Batch (per sub-transition) |
100,000 |
0.000001 |
|
Contract Create |
100,000 |
0.000001 |
|
Contract Update |
100,000 |
0.000001 |
|
Masternode Vote |
100,000 |
0.000001 |
|
Address Credit Withdrawal |
400,000,000 |
0.004 |
|
Address Funds Transfer (per input) |
500,000 |
0.000005 |
|
Address Funds Transfer (per output) |
6,000,000 |
0.00006 |
|
Identity Create (base) |
2,000,000 |
0.00002 |
|
Identity Key (per key at creation) |
6,500,000 |
0.000065 |
|
Identity TopUp (base) |
500,000 |
0.000005 |
Execution and Resource Pricing#
These fees meter execution and resource usage. They do not affect validity, but determine total cost.
Processing#
Fees for specific operations during state transition processing.
Operation |
Fee (Credits) |
Source |
|---|---|---|
Fetch identity balance |
10,000 |
|
Fetch identity revision |
9,000 |
|
Fetch identity balance and revision |
15,000 |
|
Fetch identity key by ID |
9,000 |
|
Fetch identity token balance |
10,000 |
|
Fetch prefunded specialized balance |
10,000 |
|
Fetch key with type, nonce and balance |
12,000 |
|
Fetch single identity key |
10,000 |
|
Network threshold signing |
100,000,000 |
|
Validate key structure |
50 |
Storage#
Fees related to data storage operations.
Operation |
Fee (Credits) |
Source |
|---|---|---|
Storage disk usage (per byte) |
27,000 |
|
Storage processing (per byte) |
400 |
|
Storage load (per byte) |
20 |
|
Non-storage load (per byte) |
10 |
|
Storage seek |
2,000 |
Cryptographic Operations#
Signature Verification#
Fees for verifying different signature types.
Key Type |
Verification Fee (Credits) |
Source |
|---|---|---|
ECDSA Secp256k1 |
15,000 |
|
BLS 12-381 |
300,000 |
|
ECDSA Hash160 |
15,500 |
|
BIP13 Script Hash |
300,000 |
|
EdDSA 25519 Hash160 |
3,500 |
Hashing#
Fees for cryptographic hash operations.
Operation |
Fee (Credits) |
Source |
|---|---|---|
Single SHA256 (base) |
100 |
|
Blake3 (base) |
100 |
|
SHA256 + RIPEMD160 (base) |
6,000 |
|
SHA256 (per block) |
5,000 |
|
Blake3 (per block) |
300 |
|
RIPEMD160 (per block) |
5,000 |
|
Sinsemilla (base) |
40,000 |
Data Contract Validation#
Fees for validating data contract structure during state transition processing.
Fee Type |
Amount (Credits) |
Source |
|---|---|---|
Document type base fee |
500 |
|
Schema size fee (per byte) |
10 |
|
Per property fee |
40 |
|
Non-unique index base fee |
50 |
|
Non-unique index per property fee |
30 |
|
Unique index base fee |
100 |
|
Unique index per property fee |
60 |
Voting#
Fees related to contested document voting.
Fee Type |
Amount (Credits) |
Amount (Dash) |
Source |
|---|---|---|---|
Contested document vote resolution fund |
20,000,000,000 |
0.2 |
|
Contested document unlock fund |
400,000,000,000 |
4.0 |
|
Single vote cost |
10,000,000 |
0.0001 |
Identity Model#
Identity Limits#
Limit |
Value |
Description |
Source |
|---|---|---|---|
Max public keys per identity |
15,000 |
Maximum keys an identity can have |
|
Max keys in creation |
6 |
Keys allowed at identity creation |
|
Identity nonce value filter |
0xFFFFFFFFFF |
40-bit nonce filter |
|
Max missing identity revisions |
24 |
Maximum revision gaps |
Identity Create Fees#
Requirement |
Value |
Description |
Source |
|---|---|---|---|
Min asset lock balance |
200,000 duffs |
0.002 Dash minimum |
|
Min top-up balance |
50,000 duffs |
0.0005 Dash minimum |
|
Min address funding balance |
50,000 duffs |
0.0005 Dash minimum |
|
Min identity funding amount |
200,000 credits |
Minimum for address-based creation |
Document & Data Contract Model#
Document and Index Limits#
Limit |
Value |
Description |
Source |
|---|---|---|---|
Max indexed string length |
63 characters |
Maximum indexable string |
|
Max indexed byte array length |
255 bytes |
Maximum indexable byte array |
|
Max indexed array items |
1,024 |
Maximum items in indexed array |
|
Max index size |
255 bytes |
Maximum total index size |
|
Default hash size |
32 bytes |
Standard hash size |
|
Default float size |
8 bytes |
Standard float size |
|
Empty tree storage size |
33 bytes |
Storage for empty tree |
|
Storage flags size |
2 bytes |
Size of storage flags |
Data Contract Constants#
Constant |
Value |
Description |
Source |
|---|---|---|---|
Initial contract version |
1 |
Starting version number |
Data Contract Registration Fees#
One-time fees for registering data contracts and their components.
Component |
Fee (Credits) |
Fee (Dash) |
Source |
|---|---|---|---|
Base contract registration |
10,000,000,000 |
0.1 |
|
Document type registration |
2,000,000,000 |
0.02 |
|
Non-unique index registration |
1,000,000,000 |
0.01 |
|
Unique index registration |
1,000,000,000 |
0.01 |
|
Contested index registration |
100,000,000,000 |
1.0 |
|
Token registration |
10,000,000,000 |
0.1 |
|
Token perpetual distribution |
10,000,000,000 |
0.1 |
|
Token pre-programmed distribution |
10,000,000,000 |
0.1 |
|
Search keyword (per keyword) |
10,000,000,000 |
0.1 |
Tokens#
Tokens are defined within data contracts and share the same lifecycle, versioning, and validation model as documents.
Token Limits#
Limit |
Value |
Description |
Source |
|---|---|---|---|
Max token note length |
2,048 bytes |
Maximum note/memo length |
Token Distribution Function Limits#
These limits apply to token perpetual distribution function parameters.
Parameter |
Min |
Max |
Source |
|---|---|---|---|
|
1 |
281,474,976,710,655 (2^48 - 1) |
|
|
1 |
32,767 (2^(63-48) - 1) |
|
Linear slope A |
-255 |
256 |
|
Polynomial M |
-8 |
8 |
|
Polynomial N |
0 |
32 |
|
Polynomial A |
-255 |
256 |
|
Log A |
-32,766 |
32,767 |
|
Exponential A |
1 |
256 |
|
Exponential M |
-8 |
8 |
|
Exponential N |
0 |
32 |
|
Default step decreasing max cycles |
128 |
128 |
Address System#
Added in version 3.0.0.
Address Constants#
Constant |
Value |
Description |
Source |
|---|---|---|---|
Address hash size |
20 bytes |
Size of address hash |
|
Platform HRP (mainnet) |
“dash” |
Human-readable prefix |
|
Platform HRP (testnet) |
“tdash” |
Testnet human-readable prefix |
|
P2PKH address type |
0xb0 (176) |
Pay-to-public-key-hash encoding type byte |
|
P2SH address type |
0x80 (128) |
Pay-to-script-hash encoding type byte |
Transaction Limits#
Limit |
Value |
Description |
Source |
|---|---|---|---|
Min output amount |
500,000 credits |
Minimum output per address |
|
Min input amount |
100,000 credits |
Minimum input per address |
|
Max fee strategies |
4 |
Maximum fee strategy steps |
|
Max address inputs |
16 |
Maximum input addresses per address-based transition |
|
Max address outputs |
128 |
Maximum output addresses per address-based transition |
Epoch and Time Constants#
Constant |
Value |
Description |
Source |
|---|---|---|---|
Genesis epoch index |
0 |
First epoch number |
|
Perpetual storage eras |
50 |
Number of storage eras (~50 years) |
|
Default epochs per era |
40 |
Epochs in each era (~1 year) |
|
Epoch key offset |
256 |
Offset for epoch keys |
|
Max epoch |
65,279 |
Maximum epoch number (u16::MAX - 256) |
Refund Constants#
Constant |
Value |
Description |
Source |
|---|---|---|---|
Min refund limit |
32 bytes |
Minimum bytes for refund |