The Keypair
Every user generates a post-quantum keypair. The private key sk is kept secret; the public key pk is shared and is what controls the user's on-chain balance. The scheme is ML-DSA (Dilithium), a NIST-standardized lattice-based signature scheme. Its security rests on the hardness of the Module-Learning-With-Errors problem, which no known quantum algorithm solves in polynomial time.
The public key pk is a pair of a lattice matrix A and a noise term e, both determined by sk. Recovering sk from pk is exactly the MLWE problem — believed hard for both classical and quantum adversaries. The keypair exists entirely on the user's device; the network never sees sk.
The Address
An address is a hash of the public key, not the public key itself. This makes addresses shorter, makes them checksum-verifiable, and gives a small extra layer of privacy — the public key is only revealed when the address spends its first transaction.
The address hash H is SHA3-256. The checksum prevents accidental address corruption — a single mistyped character changes the checksum, and wallets reject any address whose checksum does not match. The result is a human-facing string that encodes a cryptographic commitment. Two users with the same pk always get the same address; two users with different pk essentially never collide (collision probability is 2−128 by birthday bound).
The Signed Intent
A transaction is a message from the sender to the network. It declares the recipient, the amount, the fee, an expiry, and a random salt. Before the transaction is sent, the sender signs a hash of these fields — a sighash — with their private key. The signature is the only thing that makes the transaction valid; without it, the intent is just bytes.
σ = Signsk( H(m) ) where H = SHA3-256
The transaction is encoded as a FlashTransaction — nonce-less, because replay protection is provided by the salt. A transaction with a repeated salt and identical fields would have an identical sighash, and any duplicate sighash is rejected by the mempool. The expiry field bounds the time-window in which the transaction can be included, so a stale transaction cannot be replayed after a long delay.
The Mempool
The mempool is a local queue of pending transactions, one per node. It is not a global data structure — each node keeps its own view of what is pending. A transaction enters the mempool if and only if it passes the node's local validation predicate. Nodes do not agree on the mempool; they only agree on blocks.
The three conditions are necessary and, together, sufficient. If any one fails, the transaction is dropped. If all three pass, the transaction is queued for inclusion in a future block. There is no notion of priority or bidding — the base fee is fixed and the mempool is roughly FIFO by arrival. This simplicity is a deliberate choice: an auction-based mempool would add a decision surface that benefits large miners and disadvantages users.
The Block
A miner selects a batch of transactions from the mempool, orders them by arrival, and constructs a block. The block references multiple parents — the tip of the DAG at the moment of construction — and commits to a Merkle root of its transaction set. Then the miner searches for a nonce that makes the PoW hash fall below the current target.
pow(nonce) = P2( MemLoop(B3Chain( pre_pow ‖ timestamp ‖ nonce )) ) ≤ target
The PoW function is SahyadriX: a three-stage memory-hard function. BLAKE3 fills a 16 MB buffer, a 1024-round mixing loop folds it into a 32-byte state, and a Poseidon2 permutation compresses that state into the final hash. The intermediate stage is optimized for search (a miner can afford to run heavy loops); the final Poseidon2 binding is what makes the output verifiable in a proof system without proving every BLAKE3 iteration.
The nonce is the only field the miner can freely vary — every other field comes from the current DAG state. Finding a valid nonce is a search; verifying it is a single hash check. This asymmetry is what makes PoW work: expensive to produce, cheap to verify.
The DAG Merge
Once a valid block is found, it is broadcast to the network. Every other node verifies it independently: the PoW is checked against the target, the transactions are checked against the mempool predicate, and the parent references are checked to ensure they exist in the node's current view. If valid, the block enters the DAG.
The key property: valid blocks are never discarded. If two miners find blocks at the same time, both enter the DAG. There is no orphan race. The two blocks become parallel branches at the same depth, and both will be ordered canonically in the next step.
This is what makes SahyadriDAG different from a linear chain. In a linear chain, one of the two blocks would be orphaned and the miner's work wasted. In the DAG, both contribute to the network's cumulative security, because both are permanent and both feed into subsequent weight accumulation. Parallelism is not waste; it is strength.
The Canonical Order
The DAG gives a partial order — it says which blocks are ancestors of which, but not how to compare blocks at the same depth. Ashwa Consensus turns this partial order into a total order by ranking blocks with cumulative work and breaking ties with hash order. Every honest node computes this ranking identically, so every node ends up with the same canonical history.
∨ ( depth(bi) = depth(bj) ∧ W(bi) > W(bj) )
Cumulative work W is defined recursively over the DAG:
Where d(B) is the block's own difficulty. Because the DAG is acyclic, this sum is finite and well-defined. Blocks that arrive later reference more ancestors, so their cumulative work is higher — which means the depth of a block is a proxy for how much total work stands behind it.
A transaction becomes final when the block containing it has accumulated enough cumulative work that reversing it would require more work than any plausible adversary could produce. Formally:
Where ε is the safety margin. There is no fixed "confirmation count" in the protocol — the threshold depends on the network's hash rate and the user's own risk tolerance. A merchant may consider 6 confirmations sufficient; an exchange may prefer 30. Both are correct, because both reflect the same mathematical bound.
KeyGen → addr → sign → mempool → block → DAG → order → finality