Skip to main content



A coin is a digital asset that exists on a blockchain. It is a unit of account used as a store of value. Block producers are rewarded in coins, and coins are used to pay transaction fees. A coin is distinct from a token, which is any digital asset that means something to a decentralized application, including representing a real-world asset. That means all coins are tokens, but not all tokens are coins.


Compact is the domain-specific language, based on TypeScript, in which Midnight's smart contracts are expressed. While the language does allow contracts to be expressed concisely, the primary derivation of the name is from the noun form of the word compact, meaning an agreement, contract, or covenant among people or institutions.


Concurrency is the ability of many users to perform tasks simultaneously without blocking each other. This ensures increased throughput and makes transaction and smart contract processing more efficient.

Consensus mechanism

The consensus mechanism of a blockchain is the set of rules that govern the way that the participants in the network agree to add blocks to the chain. Each block must conform to the chain’s rules, and the blocks must be chained in the correct sequence, avoiding or resolving forks in the chain.


A digital asset stored on a blockchain ledger that is intended to be used as a medium of exchange for goods or services. Blockchain protocols use cryptography to ensure the security and verification of ownership and fund movements.
Unlike traditional currencies, a cryptocurrency is not controlled by a government. Its value is determined by the dynamics of market supply and demand.

Custom spend logic

A term used to indicate a potential feature of Midnight, where spending a coin involves executing attached logic so that certain invariants of token lifecycle can be enforced. An example use case may be requiring a known/ allowed source of tokens.

Custom token

Custom tokens are user-defined tokens designed to fulfill specific features and functionalities, like voting and governance. Custom tokens in Midnight are managed by the ledger alongside Midnight’s native tokens using the same mechanics.


A DApp, short for decentralized application, is a computer program that operates on a network without a single central server, typically a blockchain.

DApp developer

An individual or organization that creates and maintains DApps.

DApp operator

An individual or organization responsible for the management, operation, and support of a decentralized application. DApp operators often engage DApp developers, or are themselves DApp developers.


A system or organization where there is no single authority in control. Instead, the system or organization is run by numerous decision makers with equal or comparable standing.


Short for ‘development network’, a devnet is a blockchain that behaves like the mainnet and is used for testing DApps that are in development. It uses test tokens with no value. Some governance parameters may be set differently from the mainnet for the convenience of developers. In Midnight, the process of DApp deployment proceeds from a devnet to one or more testnets (such as preview and pre-production) before the DApp is released on the mainnet.


A blockchain is distributed because a copy of it is stored on many computers across the world.

Domain separator

A field used when a DApp asks a user to sign a message. It helps ensure that a message from one DApp cannot be used in a different DApp or on a different network.

Fungible token

Fungible tokens are identical to one another, have the same value, and are interchangeable.


A gadget is a specialized entry point, specific to zero-knowledge cryptography, designed to bring ZK Snark circuit development within reach of a wide range of developers. Midnight cryptography (Midnight's cryptographic backend library) provides several gadgets, including a signing gadget, an encryption gadget, and a hashing gadget.

Halo 2

A high-performance ZK Snark implementation from the Electric Coin company.


In cryptography, a hash value, or hash for short, is the output of a mathematical operation called a hash function. A hash function takes a string of any length and produces a string of fixed length such that it is infeasible to derive the input value, there is a very low probability of two strings producing the same hash function, and even a small change to the input will always result in a different output.


Kachina is a unified security model for data-protecting smart contracts that bridge the gap between a private state on the user’s local machine and a public state on the blockchain.
It is based on the universally composable (UC) model. By relying on ZK Snarks, Kachina establishes a smart contract protocol that ensures data protection while operating within the UC security framework.


The public record of contract state and token state on the blockchain. The ledger does not exist as a single document on the blockchain at any point. Instead, the current ledger, as of some block, can be synthesized by reading the blockchain up to that block.

In Compact, the ledger declaration specifies the contract's contributions to the global ledger.

Light client

A blockchain light client interacts with full nodes to find information about the blockchain, but only stores part of the ledger itself. By verifying headers and using Merkle proofs, light clients can ensure that the data they receive from full nodes is valid and accurate. Light clients require less processing power and storage capacity compared to full nodes, making them more suitable for devices with limited resources such as smartphones or IoT devices.


The fully developed and deployed blockchain where transactions are verified and recorded.

Merkle tree

A data structure used in cryptography and computer science to verify the integrity and consistency of large data sets. Named after its inventor Ralph Merkle, a Merkle tree is a binary tree where each leaf node represents a hash value of a specific data block.


Multi-asset refers to the capability of a blockchain platform or protocol to support and handle various types of digital assets or tokens simultaneously.

Non-fungible token (NFT)

Non-fungible tokens are unique and indivisible tokens recorded on a blockchain. They can represent ownership rights to tangible assets like real estate or artwork, or to intangible assets such as a rare magical sword in a Web3 game.


A blockchain node is a computer or device that participates in a blockchain network. It plays a crucial role in maintaining the decentralized and distributed nature of blockchain technology. There are several types of nodes, and one node can be more than one type.

  • An active node is one whose purpose is to mint blocks for the blockchain.
  • A full node stores a copy of the entire blockchain, that is, all the transactions and data records ever executed within the network.
  • A passive node is one that is receiving blocks and transactions from its peers (and in the future, will share these with its peers).


An oracle is a service or mechanism that provides external data to smart contracts. It means smart contracts can interact with external information sources by using data from oracles to automate actions.

Pedersen commitments

A cryptographic technique introduced by Torben Pedersen in a 1992 conference paper that enables the commitment to a value without revealing the value itself. It involves combining the value with a random blinding factor using mathematical operations to create a commitment. The committed value remains hidden and computationally difficult to reverse-engineer without knowing the blinding factor. Pedersen commitments are homomorphically additive, allowing one to ‘add’ commitments to two values to get a commitment to the sum of the original values. This can be further stretched to sums of arbitrary-dimension vectors by committing each dimension with a different base.

Private oracle

The set of witness functions and the private state over which they operate constitute the private oracle for a contract.


An entity or party that aims to convince another party, known as the verifier, about the validity or truthfulness of a statement without revealing any sensitive or confidential information. The prover's role is to construct a proof that demonstrates knowledge of certain data or the ability to perform a specific computation, while maintaining confidentiality.

Pub-sub indexer

Publish-subscribe (pub-sub) indexer is a component that follows the Midnight chain to index events and data in a queryable database. Light clients can subscribe to this service to receive any relevant data such as token transactions associated with a given set of wallet addresses, or transactions related to a given smart contract.

Qualified coin

A coin registered in the ledger's commitment Merkle tree with a known index and so qualified to be spent in a transaction.

Self-sovereign identity (SSI)

Self-sovereign identity is a lifetime portable identity for a person, organization or thing. It does not depend on any centralized authority and cannot be taken away. Individuals have the right to decide what personal information they share and with whom. They can selectively disclose only the necessary information for a specific transaction or interaction.


Shielded tokens allow for interactions to occur without metadata leakage. Wallet addresses and transaction details are not disclosed to counterparties or made available on a public ledger.

Smart contract

A program encoded on a blockchain that executes predefined actions when specific conditions are met. Smart contracts eliminate the need for intermediaries by enforcing the terms of the contract through computer code. Smart contracts enable transparent, secure, and tamper-resistant transactions because they are executed on a decentralized network with no single point of failure.


See ZK-Snark.


State refers to the current data or information stored within a smart contract. It represents the values of variables, storage locations, and any other relevant information that is necessary for the contract’s execution and functioning.


The exchange or trading of one cryptocurrency or token for another directly on the blockchain, without the need for an intermediary. These swaps are often facilitated through specialized smart contracts or decentralized exchanges (DEXs).


A testnet is an intermediate step between a devnet and the mainnet. Like a devnet, it is a blockchain with all the characteristics of the mainnet except that it uses test tokens with no real-world value. Some governance parameters may be set differently from the main chain for the convenience of developers.
The process of DApp deployment normally proceeds from a devnet to one or more testnets (such as preview and pre-production) before the DApp is released on the mainnet. Testnet parameters may be set closer to their production values than on a devnet.


A token is any digital asset that means something to a decentralized application, including acting as a store of value or representing a real-world asset.


The transfer or exchange of digital assets or information on a blockchain network. A transaction involves records such as the sender, recipient, and the amount or type of assets being transferred, into a block within the blockchain. Transactions are verified, validated, and added to the blockchain through a consensus mechanism, ensuring their integrity and immutability.

Transaction balancing

If a wallet receives a transaction that is not balanced (that is - for a token type transaction the value of inputs does not equal the value of outputs), the wallet balances the transaction by providing necessary inputs and outputs so that it can be accepted by the ledger.


A programming language developed by Microsoft that adds features to JavaScript. It allows developers to catch errors during development and improves code quality. TypeScript code is turned into JavaScript for execution and is commonly used for web development, providing better tooling support and productivity, particularly for larger code bases and teams.

Universally Composable (UC) security framework

A theoretical framework described by Ran Canetti in a 2020 paper. It is used to analyze and prove the security of cryptographic protocols in a composable manner. In the UC framework, protocols are treated as building blocks that can be composed together to form more complex protocols. The framework allows for the analysis of the security properties of a protocol when it is used as a component in a larger system.


An entity or party that aims to verify the validity or truthfulness of a statement presented by another party, known as the prover, without requiring full knowledge of the underlying data or computation. The verifier's role is to examine the proof provided by the prover and determine its correctness based on the agreed-upon rules and cryptographic protocols.


A digital tool or software that allows users to view, send, and receive digital assets securely. These wallets store private keys and public addresses, enabling users to manage their digital assets on a blockchain network.


Web3 is a decentralized version of the WorldWide Web built on blockchain technology and cryptographic principles. It provides a trustless, and more user-centric online experience. It aims to transform the way information, value, and digital assets are shared, accessed, and interacted with.

Web3 wallet

A Web3 wallet extends a digital asset wallet by enabling connection to DApps, and allowing the management of assets other than cryptocurrency, such as NFTs.


In mathematical logic, a witness is a value that satisfies an assertion. For example, a witness for 'there exists an integer greater than 0' is the number 5. For the zero-knowledge proofs in Midnight, a witness is a function that satisfies a different kind of assertion: there exists a function with a specified type signature. The circuits defined in Compact can call such witness functions, but the definitions of the witnesses are outside Compact, and their effects on private state are not recorded in the public ledger.

Zero-knowledge proof (ZKP)

A zero-knowledge proof allows someone to prove they know a secret without revealing the secret. For example, a ZKP can prove that an attribute has a value within a range without revealing its exact value. A potential client of a DApp or service can use ZKP to selectively disclose information from their self-sovereign identity without disclosing other information.

Zero-knowledge (ZK) circuit

Arithmetic circuits are short programs, consisting of a fixed number of multiplications and additions in a modular prime field. A zero-knowledge circuit is a special case that demonstrates the existence of a solution to an arithmetic circuit without revealing the input values or intermediate steps.

ZK Snarks

A zero-knowledge succinct non-interactive argument of knowledge (ZK Snark) is a specific type of zero-knowledge proof. They are particularly efficient and powerful for two reasons. First, ZK Snarks are succinct, meaning that the proof size remains constant, regardless of the complexity or size of the statement being proved. This property is highly desirable because it provides efficient verification and reduces the amount of data that needs to be transmitted. Second, ZK Snarks are non-interactive, meaning that the prover can generate a proof without requiring any additional interaction with the verifier. This makes them more efficient than other types of ZK proofs, which typically involve multiple rounds of communication.


Midnight uses Zswap – a transaction scheme that combines the strengths of Zcash and SwapCT – to create a straightforward transaction protocol based on ZK Snarks. Zswap enables the merging of transactions while preserving the confidentiality of data. It addresses the limitations of privacy-oriented cryptocurrencies by providing a mechanism for supporting multiple asset types and facilitating atomic swaps, thereby offering a scalable and secure solution for DeFi applications.