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

rs-platform-version

Max field value size

5,120 bytes (5 KiB)

Maximum single field value

rs-platform-version

Max document value depth

256 nested containers

Maximum nesting depth within a document property value (protocol version 13 and later; unbounded earlier)

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 transitions per batch state transition (document and token transitions counted together)

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

Daily withdrawal limit

Protocol versions 8-13: 200,000,000,000,000 credits (2000 Dash)
Protocol version 14+: 15% of the credits Platform held one day earlier, never below the max withdrawal amount (500 Dash)

The relative limit added in 5.0.0 is max(day-old total × 15%, max withdrawal amount) and has no fixed upper bound. Credit inflows recorded after the day-old snapshot (asset locks and epoch Core rewards) are added in full to this daily maximum, not to the base before the 15% is taken, so the remaining limit is max(day-old total × 15%, 500 Dash) + inflows since the snapshot − withdrawals since the snapshot (floored at zero) and counts net outflow (rs-drive). Until a full day of credit history is available after activation, the previous 2000-Dash limit remains in effect. Withdrawals must also fit the Core credit pool unlock limit below.

v8-v13, v14+

Core credit pool unlock limit

15% of Core’s credit pool balance at the window start, at least 150,000,000,000,000 credits (1500 Dash)

Added in 5.0.0. Platform pools a withdrawal only while Core’s credit pool would drop by at most this amount over the Core credit pool window, counting withdrawals already queued or broadcast but not yet completed. A stricter copy of Core v24’s unlock rule (20%, 2000-Dash floor), so Platform does not pool more than Core will mine

rs-platform-version

Core credit pool window

576 Core blocks (100 on regtest)

Added in 5.0.0. Window over which the Core credit pool unlock limit is measured (Core’s CreditPoolPeriodBlocks)

rs-platform-version

Max group member count

256

Maximum members of a change-control group defined in a data contract (renamed from max_contract_group_size in 5.0.0; unrelated to contract groups)

rs-platform-version

Max token redemption cycles

128

Maximum redemption cycles

rs-platform-version

Max contenders per contest

1,000

Added in 5.0.0. Maximum contenders a contested document vote poll accepts

rs-platform-version

Max shielded transition actions

16

Consensus cap on actions per shielded transition. The effective limit is 6: each action adds ~2,681 bytes to the transition (the 408-byte serialized action plus ~2,273 bytes of Halo 2 proof), so larger transitions exceed the max state transition size

rs-platform-version

Max time-range overlap factor

24

Added in 5.0.0. Maximum range / step for a timeRange index, so at most 24 windows overlap at any timestamp

rs-platform-version

Max time-range TTL

604,800 seconds (1 week)

Added in 5.0.0. Maximum ttl a timeRange index may declare

rs-platform-version

Min time-range TTL drop operations per write

32

Added in 5.0.0. Minimum expired-entry cleanup operations Drive performs on each write into a ttl index

rs-platform-version

Max time-range phase

31,536,000 seconds (365 days)

Added in 5.0.0. Maximum phase offset a timeRange index may declare

rs-dpp

Core dust relay fee

3,000 duffs/kB

Added in 5.0.0. Used to compute the Core dust threshold of a withdrawal’s output script (546 duffs for P2PKH). An expired withdrawal whose whole amount is below it is marked FAILED instead of being re-signed

rs-platform-version

Min GroveDB proof envelope version

1

Added in 5.0.0. Client-side proof verification policy, not a consensus rule: clients reject the legacy V0 proof envelope at every protocol version. Nodes have served V1 since protocol version 12

rs-drive

Max CBOR encoded length

16,384 bytes (16 KiB)

Maximum CBOR encoding size (defined as MAX_ENCODED_KBYTE_LENGTH = 16 kibibytes)

rs-dpp

Contract deserialization limit

15,000

Maximum contract deserialization

rs-dpp

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

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

Protocol Fees#

Base Processing#

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

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

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.

Processing#

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

Storage#

Fees related to data storage operations.

Operation

Fee (Credits)

Source

Storage disk usage (per byte)

27,000

rs-platform-version

Storage processing (per byte)

400

rs-platform-version

Storage load (per byte)

20

rs-platform-version

Non-storage load (per byte)

10

rs-platform-version

Storage seek

2,000

rs-platform-version

TTL ephemeral disk usage (per byte)

270

Added in 5.0.0. Charged as processing for bytes written under a timeRange ttl index instead of the storage rate; not refunded on removal. rs-platform-version

Cryptographic Operations#

Signature Verification#

Fees for verifying different signature types.

Key Type

Verification Fee (Credits)

Source

ECDSA Secp256k1

15,000

rs-platform-version

BLS 12-381

300,000

rs-platform-version

ECDSA Hash160

15,500

rs-platform-version

BIP13 Script Hash

300,000

rs-platform-version

EdDSA 25519 Hash160

3,500

rs-platform-version

Hashing#

Fees for cryptographic hash operations.

Operation

Fee (Credits)

Source

Single SHA256 (base)

100

rs-platform-version

Blake3 (base)

100

rs-platform-version

SHA256 + RIPEMD160 (base)

6,000

rs-platform-version

SHA256 (per block)

5,000

rs-platform-version

Blake3 (per block)

300

rs-platform-version

RIPEMD160 (per block)

5,000

rs-platform-version

Sinsemilla (base)

40,000

rs-platform-version

Data Contract Validation#

Fees for validating data contract structure during state transition processing.

Fee Type

Amount (Credits)

Source

Document type base fee

500

rs-platform-version

Schema size fee (per byte)

10

rs-platform-version

Per property fee

40

rs-platform-version

Non-unique index base fee

50

rs-platform-version

Non-unique index per property fee

30

rs-platform-version

Unique index base fee

100

rs-platform-version

Unique index per property fee

60

rs-platform-version

Document TTL#

Added in version 5.0.0.

Documents of a type that declares a ttl are stored without a storage refund. Instead of the perpetual storage rate, each byte the document writes is priced by its remaining lifetime, and the document prepays the processing cost of its eventual deletion.

Fee

Amount (Credits)

Source

Lifetime up to 1 hour (per byte)

1

rs-platform-version

Lifetime up to 1 day (per byte)

4

rs-platform-version

Lifetime up to 2 days (per byte)

8

rs-platform-version

Lifetime up to 4 days (per byte)

15

rs-platform-version

Lifetime up to 7 days (per byte)

26

rs-platform-version

Longer lifetimes (per byte, per 788,400-second period spanned, rounded up)

34

rs-platform-version

Deletion prepayment (base)

1,200,000

rs-platform-version

Deletion prepayment (per index level)

400,000

rs-platform-version

Deletion prepayment (per document byte)

420

rs-platform-version

Document References#

Added in version 5.0.0.

Fee

Amount (Credits)

Description

Source

chooseFirst candidate

100,000

Charged per competing document a refersTo chooseFirst scan reads. Check tx requires the signer to hold the full budget (100,000 credits × max chooseFirst candidates) beyond the estimated fee, but only the scan actually performed is charged

rs-platform-version

where list element

100

Charged per list element a refersTo where entry reads

rs-platform-version

Shielded Fees#

Fees for the zero-knowledge compute and storage of shielded transitions that GroveDB metering does not price. The minimum shielded fee for a bundle of n actions is proof verification fee + n × per-action processing fee + n × storage bytes per action × (27,000 + 400), where 27,000 and 400 are the storage disk usage and storage processing rates per byte. Transitions that meter their storage instead charge only the compute portion (proof verification plus per-action processing).

Fee

Amount

Source

Proof verification (per bundle)

Updated in 5.0.0.
Through protocol version 13: 100,000,000 credits
Protocol version 14+: 40,000,000 credits

through v13, v14+

Processing (per action)

22,000,000 credits

through v13, v14+

Storage bytes (per action)

Updated in 5.0.0.
Through protocol version 13: 344 bytes
Protocol version 14+: 550 bytes

through v13, v14+

Voting#

Fees related to contested document voting.

Fee Type

Amount (Credits)

Amount (Dash)

Source

Contested document vote resolution fund

Updated in 5.0.0.
Through protocol version 13: 20,000,000,000
Protocol version 14+: 10,000,000,000

0.2
0.1

through v13, v14+

Contested document unlock fund

400,000,000,000

4.0

rs-platform-version

Single vote cost

Updated in 5.0.0.
Through protocol version 13: 10,000,000
Protocol version 14+: 2,000,000

0.0001
0.00002

through v13, v14+

Moderation election vote resolution fund

50,000,000,000

0.5

Added in 5.0.0. Paid by each application in a moderation team election. rs-platform-version

Added in 5.0.0. Starting in protocol version 14, the first 250 contenders of a contest pay the vote resolution fund, and the fund then doubles for every 50 additional contenders (twice the fund for the 251st to 300th contender, up to 32,768 times the fund for the 951st to 1,000th).

Identity Model#

Identity Limits#

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

Identity Create Fees#

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 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

Contract version stamp size

5 bytes

Added in 5.0.0. Extra bytes document serialization format 3 adds to the estimated document size

rs-dpp

Document Type Limits#

Added in version 5.0.0.

Limits on the document type keywords added in protocol version 14, enforced when a data contract is registered or updated unless noted otherwise.

Limit

Value

Description

Source

Max typed array items

1,024

Maximum maxItems a typed array property may declare

rs-platform-version

Max indexed typed array items

16

Maximum maxItems of a typed array whose elements an index keys documents by

rs-platform-version

Max windowed indexed typed array items

4

Maximum maxItems of an indexed typed array when the same index also has a timeRange or integerRange window

rs-platform-version

Max index entries per document

256

Maximum index entries one document of a type with an indexed typed array can write across all of the type’s indexes

rs-platform-version

Max references per document

256

Maximum refersTo references one document of a type can carry. A typed array of references counts as its maxItems

rs-platform-version

Max reference operands

4

Maximum operands in one refersTo anyOf or allOf list

rs-platform-version

Max reference expression depth

4

Maximum nesting of anyOf / allOf combinators in a refersTo expression

rs-platform-version

Max chooseFirst candidates

1,000

Maximum competing documents a create reads for a refersTo chooseFirst (enforced when the document is created)

rs-platform-version

Max chooseFirst order properties

10

Maximum properties a chooseFirst orders commitments by (by)

rs-dpp

Max property constraints

16

Maximum propertyConstraints rules per document type

rs-platform-version

Max property constraint nodes

32

Maximum nodes (comparisons, operators, properties, and values) in one propertyConstraints rule

rs-platform-version

Max property constraint aggregates

4

Maximum distinct countOf and sumOf totals the propertyConstraints rules of one document type read

rs-platform-version

Min document TTL

3,600 seconds (1 hour)

Minimum ttl a document type may declare

rs-platform-version

Max document TTL

31,536,000 seconds (365 days)

Maximum ttl a document type may declare

rs-platform-version

Max document expirations per block

128

Maximum expired documents Platform deletes in one block; the rest wait for later blocks, oldest first

rs-platform-version

Max document expiration weight per block

1,024

Maximum expiry cleanup work per block, where each deleted document weighs 1 plus the weighted index levels of its type

rs-platform-version

Max contested summed value magnitude

134,217,728 (2^27)

A summed property of a document type with a contested index must declare a maximum and minimum within ±2^27

rs-platform-version

Max expiring signed summed value magnitude

134,217,728 (2^27)

A summed property that may be negative, on a document type with a ttl, must declare a maximum and minimum within ±2^27

rs-platform-version

Contract Groups and Moderation#

Added in version 5.0.0.

Limit

Value

Description

Source

Max contract group memberships per contract

16

Maximum contract group memberships a data contract create transition may declare

rs-platform-version

Max contract group admins

16

Maximum admins a contract group may name besides its owner

rs-platform-version

Max contract group name length

64 characters

Maximum length of a contract group name

rs-platform-version

Max contract group description length

256 characters

Maximum length of a contract group description

rs-platform-version

Max contract moderators

16

Maximum moderator identities a moderated data contract may name (the owner counts when named)

rs-platform-version

Max suspension end time

9,007,199,254,740,991 ms (2^53 - 1)

Latest block time a contract suspension may run until

rs-platform-version

Max moderation reason length

1,024 bytes

Maximum UTF-8 length of the text of a ban, suspension, warning, or moderator document deletion reason

rs-platform-version

Max warnings per identity

16

Maximum warnings one identity may carry on a contract at a time

rs-platform-version

Max moderation reason documents

16

Maximum documents a moderation reason may cite

rs-platform-version

Election window (join and vote)

Min: 86,400 seconds (1 day) on mainnet, none on other networks
Max: 2,419,200 seconds (4 weeks)

Bounds on the join window and vote window of an elected moderation team declaration

rs-platform-version

Default election window

604,800 seconds (1 week)

Join window and vote window of an elected moderation team declaration that omits them

rs-dpp

Challenge cool-down

Min: 1,209,600 seconds (2 weeks)
Max: 94,608,000 seconds (3 years)

Bounds on how long a seated moderation team is safe from a challenge after a seat change

rs-platform-version

Document restore window

604,800,000 ms (7 days)

How long after a moderator deletes a document the contract’s moderators may restore it

rs-platform-version

Max added moderators

15

Maximum members an elected moderation declaration may let a seated team’s leader add (maxAddedModerators)

rs-platform-version

Max charter elected members

15

Maximum members a moderation charter elects besides its leader

rs-platform-version

Data Contract Constants#

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

Token once-per-identity distribution

Updated in 5.0.0.
Through protocol version 13: 0
Protocol version 14+: 10,000,000,000

0
0.1

through v13, v14+

Search keyword (per keyword)

10,000,000,000

0.1

rs-platform-version

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

rs-dpp

Max token pool notes for outgoing

250

Added in 5.0.0. Highest minimumPoolNotesForOutgoing a token configuration may set for its shielded pool

rs-platform-version

Max evonode reward claim epochs

100

Added in 5.0.0. Maximum finalized epochs one EvonodesByParticipation perpetual distribution claim reads, unless a single distribution cycle spans more. An evonode further behind is paid over several claims

rs-platform-version

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

Address System#

Added in version 3.0.0.

Address Constants#

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

Transaction Limits#

Limit

Value

Description

Source

Min output amount

500,000 credits

Minimum output per address

rs-platform-version

Min input amount

100,000 credits

Minimum input per address

rs-platform-version

Max fee strategies

4

Maximum fee strategy steps

rs-platform-version

Max address inputs

16

Maximum input addresses per address-based transition

rs-platform-version

Max address outputs

128

Maximum output addresses per address-based transition

rs-platform-version

Max asset lock transaction inputs

100

Maximum L1 transaction inputs in an asset lock proof

rs-platform-version

Epoch and Time Constants#

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

Refund Constants#

Constant

Value

Description

Source

Min refund limit

32 bytes

Minimum bytes for refund

rs-dpp

Withdrawal Constants#

Constant

Value

Description

Source

Min withdrawal amount

1,000,000 credits

1,000 duffs minimum per withdrawal (protocol version 12 and later; raised from 190,000 credits in earlier versions). Starting in protocol version 14, the Core transaction fee is deducted from the withdrawn amount, so a withdrawal must be at least this minimum plus the Core fee (190-byte asset unlock transaction × coreFeePerByte × 1,000 credits)

rs-platform-version

Min core fee per byte

1

Must be Fibonacci number

rs-dpp

Max core fee per byte

6,765

Added in 5.0.0. Highest coreFeePerByte a withdrawal may set (protocol version 14 and later; uncapped earlier)

rs-platform-version