Skip to main content
For the complete documentation index, see llms.txt

Tokens on Midnight

Midnight has one native token, NIGHT, and one native resource, DUST. NIGHT is transferable, used for staking and governance, and generates DUST over time. DUST is a shielded, non-transferable resource that the network consumes to pay transaction fees. Both operate across a dual ledger that supports shielded (private) and unshielded (public) state.

This section covers NIGHT, DUST, and the custom tokens you create in Compact.

NIGHT and DUST

  • NIGHT: the native utility token. You hold NIGHT for staking, governance, and DUST generation. Unit: STAR (1 NIGHT = 10^6 STAR).
  • DUST: a shielded, non-transferable fee resource (not a token). Your NIGHT balance generates DUST over time up to a cap, and every transaction consumes it. Unit: SPECK (1 DUST = 10^15 SPECK).

For the economic rationale behind this design, see Dual-component tokenomics. For the technical architecture of DUST (generation, decay, registration), see DUST architecture.

Shielded and unshielded

Midnight's dual ledger lets tokens exist in two forms:

  • Shielded: private state where wallet addresses and transaction details stay confidential. 1AM and urble default to shielded.
  • Unshielded: public state visible on the ledger, similar to transparent blockchains. Lace is opt-in for shielded.

Both NIGHT and custom tokens can move between shielded and unshielded state. For code examples of shielded and unshielded token transfers in Compact, see Token transfers.

Custom tokens

You can create your own fungible and non-fungible tokens in Compact. The standard library provides mintShieldedToken (and its unshielded counterpart) to mint new tokens, and sendShielded / receiveShielded to transfer them. Token standards on Midnight will come through the MIP (Midnight Improvement Proposal) process. In the meantime, the OpenZeppelin contracts for Compact library provides reusable access control and security primitives modeled on the Solidity originals.

Fees

Every transaction on Midnight requires DUST. On a fresh wallet, DUST generation depends on how you register your NIGHT. Today, most NIGHT reaches Midnight through the cross-chain path (cNIGHT on Cardano), and the registration must finalize on Cardano and then reach a Midnight node, a process that takes about 12 hours. On a local network, DUST generates in about 5 minutes. This delay goes away once native mNIGHT launches. To get started:

Further reading