.. _protocol-ref-constants:
This page provides a comprehensive reference for all constants, limits, and default values defined in the Dash Platform Protocol implementation (rs-dpp).
Maximum sizes and limits for various platform components.
Limit
Value
Description
Source
Max contract size
16,384 bytes (16 KiB)
Maximum serialized data contract
rs-platform-version
Max field value size
5,120 bytes (5 KiB)
Maximum single field value
rs-platform-version
Max state transition size
20,480 bytes (20 KiB)
Maximum serialized state transition
rs-platform-version
Max transitions in documents batch
1
Maximum document transitions per batch
rs-platform-version
Withdrawals per block
4
Maximum withdrawal transactions per block
rs-platform-version
Retry signing expired withdrawals per block
1
Max expired withdrawal retries per block
rs-platform-version
Max withdrawal amount
50,000,000,000,000 credits
500 Dash maximum per withdrawal
rs-platform-version
Max contract group size
256
Maximum members per group
rs-platform-version
Max token redemption cycles
128
Maximum redemption cycles
rs-platform-version
Max shielded transition actions
16
Maximum actions per shielded transition
rs-platform-version
Max CBOR encoded length
16,384 bytes (16 KiB)
Maximum CBOR encoding size
rs-dpp
Contract deserialization limit
15,000
Maximum contract deserialization
rs-dpp
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
CREDITS_PER_DUFF
1,000
Credits created per duff (satoshi)
rs-dpp
MAX_CREDITS
9,223,372,036,854,775,807
Maximum credit value (i64::MAX)
rs-dpp
Conversion: 1 Dash = 100,000,000 duffs = 100,000,000,000 credits
These constants define the base costs for state transition processing.
Constant
Value (Credits)
Description
Source
BASE_ST_PROCESSING_FEE
10,000
Base state transition processing fee
rs-dpp
DEFAULT_USER_TIP
0
Default priority tip
rs-dpp
STORAGE_CREDIT_PER_BYTE
5,000
Storage cost per byte
rs-dpp
PROCESSING_CREDIT_PER_BYTE
12
Processing cost per byte
rs-dpp
DELETE_BASE_PROCESSING_COST
2,000
Base deletion cost
rs-dpp
READ_BASE_PROCESSING_COST
8,400
Base read cost
rs-dpp
WRITE_BASE_PROCESSING_COST
6,000
Base write cost
rs-dpp
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
rs-platform-version
Credit Transfer to Addresses
500,000
0.000005
rs-platform-version
Credit Withdrawal
400,000,000
0.004
rs-platform-version
Identity Update
100,000
0.000001
rs-platform-version
Document Batch (per sub-transition)
100,000
0.000001
rs-platform-version
Contract Create
100,000
0.000001
rs-platform-version
Contract Update
100,000
0.000001
rs-platform-version
Masternode Vote
100,000
0.000001
rs-platform-version
Address Credit Withdrawal
400,000,000
0.004
rs-platform-version
Address Funds Transfer (per input)
500,000
0.000005
rs-platform-version
Address Funds Transfer (per output)
6,000,000
0.00006
rs-platform-version
Identity Create (base)
2,000,000
0.00002
rs-platform-version
Identity Key (per key at creation)
6,500,000
0.000065
rs-platform-version
Identity TopUp (base)
500,000
0.000005
rs-platform-version
Execution and Resource Pricing
These fees meter execution and resource usage. They do not affect validity, but determine total cost.
Fees for specific operations during state transition processing.
Operation
Fee (Credits)
Source
Fetch identity balance
10,000
rs-platform-version
Fetch identity revision
9,000
rs-platform-version
Fetch identity balance and revision
15,000
rs-platform-version
Fetch identity key by ID
9,000
rs-platform-version
Fetch identity token balance
10,000
rs-platform-version
Fetch prefunded specialized balance
10,000
rs-platform-version
Fetch key with type, nonce and balance
12,000
rs-platform-version
Fetch single identity key
10,000
rs-platform-version
Network threshold signing
100,000,000
rs-platform-version
Validate key structure
50
rs-platform-version
Fees related to data storage operations.
Fees for verifying different signature types.
Fees for cryptographic hash operations.
Fees for validating data contract structure during state transition processing.
Fees related to contested document voting.
Limit
Value
Description
Source
Max public keys per identity
15,000
Maximum keys an identity can have
rs-dpp
Max keys in creation
6
Keys allowed at identity creation
rs-platform-version
Identity nonce value filter
0xFFFFFFFFFF
40-bit nonce filter
rs-dpp
Max missing identity revisions
24
Maximum revision gaps
rs-dpp
Requirement
Value
Description
Source
Min asset lock balance
200,000 duffs
0.002 Dash minimum
rs-platform-version
Min top-up balance
50,000 duffs
0.0005 Dash minimum
rs-platform-version
Min address funding balance
50,000 duffs
0.0005 Dash minimum
rs-platform-version
Min identity funding amount
200,000 credits
Minimum for address-based creation
rs-platform-version
Max asset-lock transaction inputs
100
Maximum Core inputs in an asset-lock transaction used to fund an identity or top-up (introduced in protocol v3 to prevent stuck funds; v1/v2 had no effective limit)
rs-platform-version
Document & Data Contract Model
Document and Index Limits
Limit
Value
Description
Source
Max indexed string length
63 characters
Maximum indexable string
rs-dpp
Max indexed byte array length
255 bytes
Maximum indexable byte array
rs-dpp
Max indexed array items
1,024
Maximum items in indexed array
rs-dpp
Max index size
255 bytes
Maximum total index size
rs-dpp
Default hash size
32 bytes
Standard hash size
rs-dpp
Default float size
8 bytes
Standard float size
rs-dpp
Empty tree storage size
33 bytes
Storage for empty tree
rs-dpp
Storage flags size
2 bytes
Size of storage flags
rs-dpp
Constant
Value
Description
Source
Initial contract version
1
Starting version number
rs-dpp
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
rs-platform-version
Document type registration
2,000,000,000
0.02
rs-platform-version
Non-unique index registration
1,000,000,000
0.01
rs-platform-version
Unique index registration
1,000,000,000
0.01
rs-platform-version
Contested index registration
100,000,000,000
1.0
rs-platform-version
Token registration
10,000,000,000
0.1
rs-platform-version
Token perpetual distribution
10,000,000,000
0.1
rs-platform-version
Token pre-programmed distribution
10,000,000,000
0.1
rs-platform-version
Search keyword (per keyword)
10,000,000,000
0.1
rs-platform-version
Tokens are defined within data contracts and share the same lifecycle, versioning, and validation model as documents.
Limit
Value
Description
Source
Max token note length
2,048 bytes
Maximum note/memo length
rs-dpp
Token Distribution Function Limits
These limits apply to token perpetual distribution function parameters.
Parameter
Min
Max
Source
MAX_DISTRIBUTION_PARAM
1
281,474,976,710,655 (2^48 - 1)
rs-dpp
MAX_DISTRIBUTION_CYCLES_PARAM
1
32,767 (2^(63-48) - 1)
rs-dpp
Linear slope A
-255
256
rs-dpp
Polynomial M
-8
8
rs-dpp
Polynomial N
0
32
rs-dpp
Polynomial A
-255
256
rs-dpp
Log A
-32,766
32,767
rs-dpp
Exponential A
1
256
rs-dpp
Exponential M
-8
8
rs-dpp
Exponential N
0
32
rs-dpp
Default step decreasing max cycles
128
128
rs-dpp
:::{versionadded} 3.0.0
:::
Constant
Value
Description
Source
Address hash size
20 bytes
Size of address hash
rs-dpp
Platform HRP (mainnet)
"dash"
Human-readable prefix
rs-dpp
Platform HRP (non-mainnet)
"tdash"
Human-readable prefix used for testnet, devnet, and regtest
rs-dpp
P2PKH address type (bech32m)
0xb0 (176)
Pay-to-public-key-hash bech32m encoding type byte
rs-dpp
P2SH address type (bech32m)
0x80 (128)
Pay-to-script-hash bech32m encoding type byte
rs-dpp
Constant
Value
Description
Source
Genesis epoch index
0
First epoch number
rs-dpp
Perpetual storage eras
50
Number of storage eras (~50 years)
rs-dpp
Default epochs per era
40
Epochs in each era (~1 year)
rs-dpp
Epoch key offset
256
Offset for epoch keys
rs-dpp
Max epoch
65,279
Maximum epoch number (u16::MAX - 256)
rs-dpp
Constant
Value
Description
Source
Min refund limit
32 bytes
Minimum bytes for refund
rs-dpp
Constant
Value
Description
Source
Min withdrawal amount
190,000 credits
ASSET_UNLOCK_TX_SIZE (190) × MIN_CORE_FEE_PER_BYTE (1) × CREDITS_PER_DUFF (1,000)
rs-dpp
Min core fee per byte
1
Must be Fibonacci number
rs-dpp