Whitepaper · Version 1.0 · December 2026

Scruple

A minimalist, post-quantum,
CPU-mined UTXO currency.

Ticker
XSL
Symbol
℈
Base unit
grains
Status
Mainnet candidate
Consensus
Frozen at v1
Software
v0.1-alpha

Abstract

Scruple is a minimalist, post-quantum, CPU-mined UTXO currency. It replaces elliptic-curve signatures with SQIsign Level 1, uses RandomX proof of work with automatic epoch rotation, and emits one scruple per block forever. Compact positional outpoints, deduplicated per-address authorisations, and canonical ordering keep transactions small and unremarkable in shape despite larger post-quantum signatures. Each network derives its genesis block and initial proof-of-work seed deterministically with no premine, no ICO, and no external protocol dependencies. This paper specifies the consensus rules, the emission schedule, and the security trade-offs, and explains why the protocol is designed to ossify.

SQIsign · RandomX · UTXO · Tail emission · Fair launch · Ossification

§ 01Introduction

Scruple is a minimalist, post-quantum, CPU-mined UTXO cryptocurrency. It is designed around a deliberately narrow consensus surface: fixed-size 85-byte block headers, canonical binary encodings, no general-purpose scripting, and a single signature scheme chosen for its resistance to quantum adversaries. Every design decision in this document is weighed against three questions. Does it reduce the amount of code that must be correct? Does it widen the set of people who can validate or mine the chain? Does it remove a trust assumption?

The name is the design brief. A scruple is an old apothecaries' measure — twenty grains, a deliberately small and exact unit. The protocol follows the same instinct. One scruple per block, one signature scheme, two fixed address types (single-key and native M-of-N multisig), one megabyte per block, and a consensus rule set that can be read in an afternoon.

1.1The quantum exposure of existing money

The dominant signature schemes in production cryptocurrencies — ECDSA over secp256k1, Ed25519, and Schnorr variants — derive their security from the hardness of discrete logarithms over elliptic-curve groups. A sufficiently capable cryptographically relevant quantum computer running Shor's algorithm breaks these assumptions outright. This is not a speculative attack on an obscure primitive; it is the standard, well-understood algorithmic result, and the only remaining variables are engineering and time.

The exposure is not merely theoretical for future transactions. Coins sitting behind revealed public keys are exposed today in the sense that their signature scheme provides no post-quantum security margin at all. Scruple takes the position that a new monetary system launched in 2026 should not inherit this exposure. It therefore uses SQIsign, a signature scheme built on isogeny problems between supersingular elliptic curves, for which no efficient quantum attack is known.

1.2Centralisation by hardware

Proof of work is a Sybil-resistance mechanism, but its neutrality depends on the distribution of the hardware required to perform it. When mining migrates to specialised silicon, the security budget of the chain becomes a function of foundry access, capital expenditure, and electricity arbitrage. Scruple uses RandomX, a proof-of-work function designed to exercise the full feature set of a general-purpose CPU — random code execution, large working sets, and cache-sensitive memory access — so that the most efficient mining device remains a commodity processor.

1.3Allocation by privilege

A monetary network's initial allocation is its most consequential political decision. Premines, ICOs, and private early mining concentrate supply before the public can participate, and the resulting concentration persists regardless of how "decentralised" the subsequent protocol is. Scruple launches with no premine, no ICO, no private early mining, and no allocation of any kind to the authors. Every network derives its genesis block and initial proof-of-work seed deterministically from its hardcoded network seed and timestamp — with zero external protocol dependencies — and every spendable scruple enters circulation through open RandomX mining starting at Block 1.

1.4Design response

Scruple answers these three problems with one architecture: a UTXO ledger with post-quantum signatures, CPU-first proof of work, a fixed perpetual block subsidy, and a consensus rule set small enough to ossify.

§ 02Design principles

2.1Minimal consensus surface

Scruple has no general-purpose scripting virtual machine, no OP_RETURN-style arbitrary data field, and no witness discount. Transactions spend outputs and create outputs; authorisation is a signature check. A smaller consensus surface has fewer consensus bugs, fewer implementation divergences, and a smaller set of reasons to change the rules later. The specification is intended to be complete enough that a second implementation could be written from it without consulting the Rust source.

2.2Post-quantum by construction

Post-quantum security is not a roadmap item. It is the reason the transaction format looks the way it does. Signature sizes, authorisation deduplication, transaction identifiers, and the Merkle commitment structure are all shaped by the properties of SQIsign — including its lack of strong unforgeability under chosen-message attack.

2.3CPU-first issuance

Mining must remain accessible to ordinary hardware for as long as the network exists. Scruple commits to a RandomX-based proof of work with automatic epoch seed rotation, so that mining parameters evolve deterministically with the chain rather than through contentious algorithm swaps.

2.4Self-contained genesis

A protocol built to ossify for decades should not depend on external networks or third-party relays remaining alive to verify its origin. Each Scruple network derives its genesis block hash and epoch-zero RandomX key deterministically from its network seed and genesis timestamp, so any node can recompute and verify them offline forever.

2.5Bounded participation

Full validation is designed to remain possible on modest hardware. Validators verify proof of work in RandomX light mode (~256 MB), block bodies are capped at one megabyte, and optional pruning retains the complete UTXO set and all headers while discarding old block bodies. Verification is the right of every user, not a service tier.

§ 03Protocol overview

3.1The ledger

Scruple is a UTXO ledger. Each output is a 1-byte address version, a 32-byte address hash, and a u64 amount denominated in grains. Transactions consume existing outputs and create new ones, with the difference between input and output value collected by the miner as a fee. There are no accounts, no balances stored in consensus, and no contract state.

The base unit is the grain. One scruple (1 ℈ = 1 XSL) is exactly 100,000,000 grains, and all amounts are unsigned 64-bit integers. Consensus enforces a strict 1-grain minimum on every output (forbidding zero-value outputs), while default mempool and wallet policy enforces a 5,000-grain (0.00005 XSL) dust floor to bound UTXO-set spam without baking a fee-market assumption into consensus.

3.2Constants and units

Parameter Value
Ticker / symbol XSL / ℈ (U+2108)
Grains per scruple 100,000,000
Block subsidy 1 XSL, perpetual
Target block time 300 seconds
Maximum block size 1,000,000 bytes
Maximum transaction size 100,000 bytes
Maximum inputs / outputs / auth per transaction 1,024
Consensus minimum output 1 grain (relay/wallet dust policy: 5,000 grains)
Address versions 1 (single-key) · 2 (native M-of-N multisig, N <= 15)
Block version 1
Coinbase maturity Mainnet 24 (~2 hr) · Testnet 6 · Devnet 2
Max future block time 1,200 seconds (20 minutes)
Difficulty window 60 blocks, per-block LWMA
RandomX epoch 2,048 blocks with 64-block lag

3.3What Scruple deliberately omits

The absence of a feature is a feature. No scripting VM means no reentrancy, no gas metering, and no state-bloat surface. No witness discount means a single, uniform byte accounting rule for every part of a transaction. No arbitrary data embedding means block space is not a general-purpose storage market. These omissions keep the validation path straight-line and auditable.

§ 04Cryptographic construction

4.1Domain-separated BLAKE3

All consensus hashing is BLAKE3-256 with an explicit ASCII domain prefix:

H(domain, data) = BLAKE3(domain || data)

Domain separation prevents cross-context hash reuse by construction. A digest computed for one purpose can never be reinterpreted as a digest for another.

Domain tag Purpose
scruple-addr-v1 Single-key (v1) address hash from public key
scruple-addr-v2 Native M-of-N multisig (v2) address hash
scruple-txid-v1 Transaction identifier (excludes auth)
scruple-wtxid-v1 Witness transaction identifier (includes auth)
scruple-sighash-v1 Signature digest
scruple-merkle-leaf Merkle leaf node
scruple-merkle-node Merkle internal node
scruple-block-root-v1 Combined txid/wtxid block commitment
scruple-header-v1 Block identifier
scruple-genesis-v1 Genesis block prev_hash commitment and burn output
scruple-rx-genesis Epoch-zero RandomX seed
scruple-hd-v1 HD wallet child derivation
scruple-rbf-shrink-v1 Non-consensus FSS-RBF change-shrink proof (MSG_TX_BUMP)

4.2SQIsign Level 1

Scruple uses pure-Rust NIST Round-3 SQIsign at Security Level 1, in its compressed form:

  • Public key: 83 bytes.
  • Compressed signature: 176 bytes.
  • Tagged auth footprint: 260 bytes (1 B tag + 83 B pk + 176 B sig) per unique v1 signing address, or 4 + 83*N + 177*M bytes per unique v2 M-of-N multisig address (1 <= M <= N <= 15, e.g. 607 bytes for 2-of-3).

SQIsign's security rests on isogeny problems between supersingular elliptic curves rather than on discrete logarithms in a group of known order, and is therefore not vulnerable to Shor's algorithm. The trade-off is explicit: signatures are larger than elliptic-curve signatures and verification is more expensive. Scruple mitigates the size cost structurally, by requiring only one authorisation per unique address rather than one per input, and verifies block signatures in parallel across CPU cores.

Scruple chooses a post-quantum primitive and pays the byte cost openly, rather than inheriting a classical primitive and deferring the cost to an unknown future migration.

4.3Addresses and native multisig

Scruple supports two fixed address versions — v1 single-key and v2 native M-of-N multisig (1 <= M <= N <= 15, with public keys sorted strictly ascending) — both committing to a 32-byte domain-separated BLAKE3 hash:

v1: addr_hash = BLAKE3("scruple-addr-v1" || pubkey_83)
v2: addr_hash = BLAKE3("scruple-addr-v2" || u8(M) || u8(N) || pubkey_0 || ... || pubkey_{N-1})

User-facing addresses are encoded with BIP-350 Bech32m, carrying a 6-character BCH checksum and a network-specific human-readable prefix (xsl1p... / xsl1z... on Mainnet, txsl1... on Testnet, dxsl1... on Devnet) so typos and cross-network sends are caught before signing. Legacy xsl1:<64-hex> and xsl2:<64-hex> strings remain accepted for backward compatibility. Because public keys and multisig quorum descriptors are revealed only when an output is spent, unspent outputs sit behind a one-way post-quantum hash, and single-key and multisig inputs can be mixed cleanly within the same transaction.

4.4Transaction identity and non-malleability

SQIsign signatures are not strongly unforgeable under chosen-message attack: an observer may be able to transform a valid signature into a different valid signature for the same message. A protocol that hashes signatures into the transaction identifier would inherit that malleability.

Scruple eliminates it by construction:

txid(tx)  = BLAKE3("scruple-txid-v1"  || encode_body(tx))
wtxid(tx) = BLAKE3("scruple-wtxid-v1" || encode(tx))

The txid commits to the transaction body only, never to auth. The wtxid commits to the full transaction including signatures. Both are committed in the block header through a dual Merkle root, so signatures remain authenticated by proof of work without ever contaminating the identifier that outpoints refer to.

4.5Reorg-safe signatures

Scruple's compact outpoints reference chain position rather than transaction identifiers. Without an additional binding, a deep reorganisation could map the same coordinates to a different output, allowing a signature to be replayed against an unintended UTXO.

The signature digest closes this with zero extra on-chain bytes by binding every spent output's creating txid and full output encoding:

sighash(tx, spent_utxos) = BLAKE3(
    "scruple-sighash-v1"
    || txid(tx)
    || spent_utxos[0].txid || encode(spent_utxos[0].output)
    || ...
)

This yields two guarantees at once: a signature is useless against any other output at the same coordinates, and every input amount and output amount is cryptographically bound for offline or hardware signers. Fee-drain attacks that rely on misreporting input values fail, because the digest covers the true values.

4.6Merkle commitments

Merkle leaves and nodes are separately domain-separated. Odd node counts duplicate the last node. The block header commits to both trees:

tx_root     = merkle_root([tx.txid()  for tx in block.transactions])
wt_root     = merkle_root([tx.wtxid() for tx in block.transactions])
merkle_root = BLAKE3("scruple-block-root-v1" || tx_root || wt_root)

§ 05Transactions and the UTXO model

5.1Compact outpoints

A conventional outpoint costs 36 bytes: a 32-byte transaction identifier plus a 4-byte index. Scruple instead references an output by its immutable position in the chain:

OutPoint := height(varint) || tx_index(varint) || out_index(varint)

At three to five bytes per reference, this is roughly an order-of-magnitude reduction in the per-input byte cost. The saving is particularly valuable in a post-quantum protocol, where the signature side of the transaction is necessarily heavier. Reorg safety is preserved entirely by the sighash construction described above.

5.2Canonical ordering

Every non-coinbase transaction must have strictly ascending inputs, non-decreasing outputs, and strictly ascending, deduplicated authorisations. Canonical ordering serves three purposes. It makes the byte representation unique, so there is exactly one valid encoding of any transaction. It forbids duplicate inputs in a single pass. And it removes change-position and input-ordering heuristics as wallet fingerprints.

5.3Authorisation deduplication

Spending ten outputs from the same address requires one 260-byte v1 authorisation (or one v2 multisig authorisation), not ten. Consensus computes the sorted unique set of (addr_version, addr_hash) pairs across all spent outputs and requires the authorisation list to match that set exactly, one-to-one. This converts a per-input signature cost into a per-address cost, and it is the single most important structural compensation for post-quantum signature sizes.

5.4Fees and dust

The fee is sum(inputs) - sum(outputs), checked with overflow-safe integer arithmetic. Consensus requires every output to carry at least 1 grain (CONSENSUS_MIN_OUTPUT), forbidding zero-value outputs without hard-coding a fee-market price assumption into the permanent protocol rules. Default mempool relay and wallet policy enforces a 5,000-grain (0.00005 XSL) dust floor (DUST_FLOOR) and a 1 grain/byte minimum relay fee, keeping UTXO spam uneconomical while allowing future node operators to adjust the dust floor if Scruple's purchasing power changes orders of magnitude — with no hard fork required.

5.5Validation

Transaction validation enforces, in order: serialised size and I/O bounds; canonical ordering; output version, amount, and sum validity; UTXO existence and coinbase maturity; input-sum sufficiency; authorisation deduplication and ordering; and finally SQIsign verification of every authorisation against the sighash. Any failure rejects the transaction and, by extension, any block containing it.

§ 06Blocks and consensus

6.1Header

The block header is a fixed 85 bytes. There is no variable-length field and no version negotiation within version 1.

Offset Length Field
0 1 version (must be 1)
1 32 prev_hash
33 32 merkle_root
65 8 timestamp (u64_le)
73 4 target_bits (u32_le)
77 8 nonce (u64_le)

The block identifier is BLAKE3("scruple-header-v1" || header[0..85]). The proof-of-work input is the same 85 bytes, so the block's identity and its work commitment are derived from one canonical serialisation.

6.2Block validation

A candidate block at height parent.height + 1 must satisfy: total serialised size at most one megabyte; version equality; a known valid parent; a timestamp strictly greater than the median time past of up to eleven ancestors and at most 1,200 seconds (20 minutes) ahead of the validator's clock; an exactly correct target_bits recomputed by the difficulty algorithm; a RandomX digest within target under the seed derived from its own ancestry; a matching dual Merkle root; and a coinbase whose declared height equals the block height, whose outputs are at least 1 grain each, and whose total value does not exceed subsidy plus fees.

Non-coinbase transactions are validated sequentially against the pre-block UTXO set. Spent inputs are removed immediately, preventing intra-block double spends, while newly created outputs enter the set only after the whole block succeeds, prohibiting intra-block chains of unconfirmed transactions. Validation is deterministic and order-independent in outcome, even though it is sequential in execution.

6.3Fork choice

The active chain is the valid chain with the greatest cumulative work, where each block contributes work_from_bits(target_bits) and accumulation saturates at U256. No checkpoints, finality gadgets, or social overrides exist in consensus. Reorganisations are handled with per-block undo logs stored alongside the chain state.

§ 07Proof of work

7.1RandomX

RandomX executes randomly generated programs with a large memory working set, making it a poor fit for fixed-function silicon and a good fit for the CPUs people already own. Scruple's consensus requires that RandomX(seed, header[0..85]), interpreted as a big-endian 256-bit integer, be less than or equal to the decoded target.

7.2Epoch rotation

The RandomX key rotates automatically every 2,048 blocks — approximately 7.1 days at the target block interval — with a 64-block lag:

if height < 2048 + 64:
    seed = genesis_randomx_seed(params)
else:
    seed_height = floor((height - 64) / 2048) * 2048
    seed        = ancestor_block_hash(parent, seed_height)

Because the seed is read along the candidate header's own ancestry, competing forks derive their keys deterministically and without ambiguity. The lag gives every node a stabilisation window to pre-initialise the next epoch's cache before it becomes active, avoiding synchronisation stalls at epoch boundaries. Proof-of-work parameters therefore evolve without a hard fork.

7.3Target encoding and work

Targets use a compact 32-bit encoding with a one-byte exponent and a 23-bit mantissa whose top bit must be clear. Invalid encodings are rejected. Work is defined deterministically as floor(2^256 / (target + 1)), with work(2^256 - 1) = 1. Cumulative work, not block count, decides the active chain.

7.4Mining modes

Validators run RandomX in light mode (256 MB RAM), which keeps the cost of verification low. Solo miners may enable full-memory mode (2 GB shared dataset across worker threads) for roughly ten times the hashrate on identical consensus rules. The distinction is an implementation detail, not a protocol distinction: a block produced either way is the same block.

§ 08Difficulty adjustment

8.1LWMA

Difficulty retargets every block using an integer linearly weighted moving average over up to 60 intervals. Recent intervals are weighted linearly more heavily than older ones, so the estimator responds quickly to real hashrate changes without oscillating.

N                   = min(available_intervals, 60)
dt_k                = clamp(H[k].timestamp - H[k-1].timestamp, 1, 1800)
weighted_solvetimes = Σ k * dt_k
avg_work            = floor(Σ work(H[k]) / N)
expected_weighted   = 300 * N * (N + 1) / 2
next_work           = floor(avg_work * expected_weighted / max(weighted_solvetimes, 1))

The resulting target is then clamped against the tip target to at most a halving or doubling per block. All arithmetic is exact unsigned integer math; no floating-point operation appears anywhere in the consensus path.

8.2Manipulation resistance

Three mechanisms bound the obvious attacks. Solvetimes are clamped to [1, 1800] seconds, limiting the influence of forged timestamps. The single-block clamp limits how far difficulty can be pushed by any one header. And timestamps must exceed the median time past of the ancestor window, so a miner cannot freely backdate blocks to accelerate the chain.

§ 09Emission and economics

9.1Fixed tail emission

The block subsidy is one scruple, forever. There are no halvings, no decreasing schedule, and no terminal supply cap. At a five-minute target interval the chain produces 288 blocks per day and therefore 105,120 XSL per year, plus transaction fees.

subsidy(height) = 1 XSL = 100,000,000 grains   for all heights
annual_emission = 288 blocks/day * 365 days * 1 XSL = 105,120 XSL

9.2Supply schedule

Years after genesis Approximate blocks Circulating supply
1 105,120 105,120 ℈
5 525,600 525,600 ℈
10 1,051,200 1,051,200 ℈
25 2,628,000 2,628,000 ℈
100 10,512,000 10,512,000 ℈

Supply is a straight line. It is predictable at any horizon without a model, and the annual inflation rate declines continuously as a fraction of the existing stock even though the absolute issuance never changes.

9.3Why no halving

Halving schedules make the security budget discontinuous. Each halving is a scheduled shock to miner revenue that must be absorbed by fees, price, or a reduction in security. Scruple prefers a security budget that is constant in native units and boring by design. A perpetual subsidy also means that fee pressure never has to become coercive in order to keep miners honest: block space can remain cheap without starving the security budget.

Scarcity in Scruple is therefore a rate, not a terminal number. Nothing about this design promises appreciation, and this document makes no price claims of any kind.

9.4Fees

Fees are voluntary and market-discovered. Default node policy relays transactions at a minimum of one grain per byte and bounds the mempool at 50,000,000 bytes, evicting the lowest fee-rate entries when full. These are local policy parameters, not consensus rules; nodes may tune them without forking.

§ 10Genesis and launch

10.1Deterministic genesis

Scruple launches directly to mainnet with no premine, no ICO, no foundation treasury, and no author allocation. Rather than anchoring genesis to an external messaging protocol or third-party relay network that could degrade or disappear over time, each Scruple network (mainnet, testnet, devnet) derives its Height-0 genesis block and epoch-zero RandomX seed deterministically from its ASCII genesis_seed ("scruple-mainnet-genesis-v1", "scruple-testnet-genesis-v1", "scruple-devnet-genesis-v1") and genesis_timestamp (u64_le):

genesis_preimage     = genesis_seed || genesis_timestamp (u64_le)

genesis_commitment   = BLAKE3("scruple-genesis-v1" || genesis_preimage)
genesis_randomx_seed = BLAKE3("scruple-rx-genesis" || genesis_preimage)

The deterministic Height-0 block contains a single unspendable burn coinbase output (never inserted into the active UTXO set), sets header.prev_hash = genesis_commitment, and uses genesis_randomx_seed as the RandomX program key for heights 1..=2111 before automatic epoch rotation takes over. Because the derivation is completely self-contained, verifying the genesis block never requires external network state, relay archives, or extra launch flags.

10.2Verification

Anyone can inspect and verify any network's genesis offline:

  1. Run the deterministic genesis inspector:
scruple genesis --network mainnet
  1. Confirm that the printed genesis_hash and randomx_epoch0_seed match the running mainnet node (scruple info) bit-for-bit.
  2. Confirm that Block 1's prev_hash equals genesis_hash, that its timestamp follows genesis_timestamp, and that it verifies under randomx_epoch0_seed.

10.3Scope of guarantees

Deterministic genesis guarantees that every node on a given network agrees on Height 0 and Epoch 0 with zero external dependencies or configuration ambiguity. It does not substitute for public release discipline, independent review of the implementation, or ongoing scrutiny of hashrate distribution after launch.

§ 11Network and privacy

11.1Transport

Peers communicate over persistent framed TCP connections. Each frame is [4B p2p_magic][1B kind][4B len_le][payload], where p2p_magic isolates networks immediately at the transport header ("XSL1" Mainnet, "XSLT" Testnet, "XSLD" Devnet). The transport uses keepalives, timeouts, /16 IPv4 and /32 IPv6 outbound subnet diversity, DNS seed bootstrapping with peers.json persistence, headers-first synchronisation with cross-peer in-flight block deduplication, and misbehavior ban scoring. Framing and peer management are policy, not consensus.

11.2Dandelion++ and fast-fluff commerce

Originated transactions enter a stem phase, routed along a per-epoch relay peer, before diffusing to the network. An embargo timer of roughly twenty seconds falls back to ordinary broadcast if the transaction is not observed fluffed (deferring the flush while a node has zero peers so brief disconnects never drop pending sends), protecting against both source-IP snooping and black-hole peers that silently drop stem traffic. Combined with canonical transaction ordering and authorisation deduplication, this reduces the fingerprintable surface of a typical spend. For point-of-sale zero-confirmation commerce where immediate propagation matters more than stem delay, senders may opt into fast_fluff broadcast.

11.3Mempool policy, 0-conf safe fee bumping, and double-spend proofs

Default relay policy requires a minimum fee rate of one grain per byte, enforces a 5,000-grain dust floor, caps the mempool at 50,000,000 bytes (evicting the lowest fee-rate transactions under pressure), expires unconfirmed entries after a 72-hour TTL, and periodically rebroadcasts aged transactions.

Zero-confirmation commerce and fee bumping are usually treated as incompatible: full Replace-by-Fee lets a sender redirect a merchant's unconfirmed payment back to themselves, while strict First-Seen-Safe rules trap single-UTXO users whenever fees rise. Scruple resolves this tension entirely at the mempool/P2P layer (with zero consensus changes) via Ownership-Proven First-Seen-Safe RBF (MSG_TX_BUMP):

  1. Every output of every replaced mempool transaction must appear verbatim in the replacement at the same or higher amount — except an output may be reduced or removed if and only if the bump carries a valid SQIsign TxAuth signature over BLAKE3("scruple-rbf-shrink-v1" || old_txid || new_txid) proving the output's owner consented to shrinking it.
  2. Because the sender controls their own change key (and never the merchant's key), even a single-UTXO sender can bump a stuck fee by shrinking their own change output with a cryptographic proof, while a one-output Send Max transaction can be bumped by adding an extra confirmed UTXO with zero shrink proofs.
  3. No honest node ever accepts a fee bump that reduces, removes, or redirects a merchant's output. If an adversary broadcasts a conflicting spend attempting to steal a 0-conf output, honest nodes reject it and immediately broadcast a compact Double-Spend Proof (MSG_DSPROOF) across the network so merchants are alerted within seconds via get_tx (double_spend_detected: true) and dsproofs.

11.4Storage, pruning, and ever-seen address index

Chain state lives in an embedded disk-backed database (redb) holding headers, a height index, cumulative work, the active UTXO set, raw block bytes, per-block undo logs, a compact seen_addrs index (32 bytes per ever-confirmed address hash, surviving spends and pruning), and an optional --txindex table for full confirmed transaction lookup. Restarts and reorganisations are fast and bounded in RAM. Optional pruning (--prune N, minimum 288 blocks) discards block bodies and undo logs older than the most recent N blocks while retaining all headers, the complete active UTXO set, and seen_addrs.

§ 12Wallet standard

12.1HD derivation and entropy

Wallets are deterministic. A 24-word BIP-39 mnemonic (generated from OS RNG or verified Bring-Your-Own-Entropy from dice rolls, coin flips, raw hex, or text) produces a 64-byte seed, which is expanded with domain-separated BLAKE3 (scruple-hd-v1) into a ChaCha20Rng stream used to derive SQIsign Level 1 keypairs — separating even indices (0, 2, 4, ...) for receiving and per-block mining payout rotation from odd indices (1, 3, 5, ...) for change. Recovery therefore requires only the mnemonic and the derivation rules.

12.2Encryption, coin control, and multisig

At rest, wallets may be encrypted with an Argon2id key derivation function and ChaCha20-Poly1305 authenticated encryption, guarded by an OS file lock (WalletFileLock) with secret material zeroised in memory after use. The wallet supports exact byte-rate fee estimation, coin control, per-UTXO freezing, multi-recipient batch sends, --fit-max consolidation sweeps, Ownership-Proven FSS-RBF fee bumps (scruple bump-fee), reorg-safe pending-spend reconciliation, and offline JSON PartialTx cosigning for native v2 M-of-N multisig vaults.

12.3Recovery

Gap-limit scanning (DEFAULT_GAP_LIMIT = 20) queries both live UTXOs and the node's seen_addrs ever-seen address index to reconstruct receiving and change addresses. Because seen_addrs records every address ever confirmed on-chain even after its UTXOs are spent or historical blocks are pruned, recovery never terminates prematurely across long runs of spent addresses. Because addresses are deterministic and transaction ordering is canonical, a restored wallet presents the same structure as the original rather than a new fingerprint.

§ 13Governance and ossification

Scruple has no on-chain governance, no foundation allocation, and no protocol treasury. Consensus constants are frozen at version 1. The explicit goal is ossification: a protocol that stops changing, so that its rules become something users can rely on rather than negotiate.

Changes to consensus are still possible in principle, through the ordinary mechanism of users running different software. But the design deliberately minimises the set of reasons to want one. There is no scripting layer to extend, no VM opcode surface to debate, and no scheduled monetary intervention. Node policy, transport, wallet behaviour, and user interfaces can all improve without touching consensus.

§ 14Security considerations

14.1SQIsign maturity

SQIsign is a young primitive relative to elliptic-curve signatures. Its post-quantum security argument is strong in principle, but the scheme has less cryptanalytic history and a smaller implementation ecosystem than classical alternatives. Verification cost is also materially higher. Users should treat these as real engineering risks, not as solved problems.

14.2Hashrate and majority attacks

Cumulative-work fork choice means that a majority of hashrate can reorganise the chain. RandomX broadens who can mine, but it does not eliminate the possibility of concentration in botnets or large CPU fleets. A young network with low total hashrate is more exposed than a mature one.

14.3Timestamp and difficulty manipulation

Median-time-past, solvetime clamping, and the single-block difficulty clamp bound timestamp manipulation. They do not make timestamp forgery impossible, only unprofitable within the intended bounds.

14.4Implementation risk

The reference implementation is alpha software. Consensus-critical code paths — canonical decoding, sighash construction, difficulty arithmetic, and proof-of-work verification — are the highest-value targets for independent review, and an external audit is a prerequisite for a confident mainnet launch.

14.5Quantum caveat

Post-quantum signatures protect transaction authorisation. They do not make every part of the system quantum-proof, and they do not address side channels, key handling, or endpoint compromise. A signature scheme cannot compensate for a compromised wallet.

§ 15Implementation status

The reference implementation is a Rust workspace containing a headless node and a pure-Rust desktop GUI built with egui. It includes canonical codecs, SQIsign v1 single-key and v2 native M-of-N multisig signing and parallel block verification, BIP-350 Bech32m addresses, RandomX proof of work with automatic epoch rotation, per-block LWMA difficulty, headers-first P2P synchronisation, Dandelion++ relay with fast-fluff POS mode, Ownership-Proven FSS-RBF fee bumping and 0-conf Double-Spend Proofs, cookie-authenticated JSON-RPC with explorer endpoints, an HD encrypted wallet with BYOE entropy and coin control, pruning, seen_addrs recovery, --txindex, and a multi-threaded CPU solo miner with per-block address rotation.

The software is v0.1-alpha. The consensus rules in this document are frozen as a mainnet candidate; the implementation is not yet presented as production-hardened. Devnet exists so that the full lifecycle — key generation, mining, spending, confirmation, and reorganisation — can be exercised end to end before value is at stake.

§ 16Conclusion

Scruple is an argument about restraint. A monetary protocol does not need a scripting language, a treasury, a foundation, a premine, or an ever-expanding feature list. It needs a small set of rules that are easy to verify, expensive to break, and open to anyone with an ordinary computer.

By committing to post-quantum signatures from the first block, CPU-first proof of work, a perpetual one-scruple subsidy, and a self-contained deterministic genesis, Scruple aims to be a currency whose guarantees are structural rather than promotional. The measure of the system is whether it still makes sense when nobody is marketing it.

§ 17Appendix A: Consensus constants

Constant Value
GRAINS_PER_SCRUPLE 100,000,000
BLOCK_REWARD 100,000,000 grains
MAX_BLOCK_SIZE 1,000,000 bytes
MAX_TX_SIZE 100,000 bytes
MAX_TX_IO 1,024
Max transactions per block 10,000
CONSENSUS_MIN_OUTPUT 1 grain (policy DUST_FLOOR: 5,000 grains)
BLOCK_VERSION 1
ADDR_VERSION_SQISIGN_L1 / ADDR_VERSION_MULTISIG_SQISIGN_L1 1 / 2 (MAX_MULTISIG_KEYS = 15)
Coinbase maturity Mainnet 24 · Testnet 6 · Devnet 2
LWMA_WINDOW 60
RANDOMX_EPOCH_LENGTH 2,048
RANDOMX_EPOCH_LAG 64
MAX_FUTURE_BLOCK_TIME 1,200 seconds
Mainnet initial / max target bits 0x1e0fffff / 0x1f7fffff
Testnet initial / max target bits 0x1f0fffff / 0x207fffff
Devnet initial / max target bits 0x200fffff / 0x207fffff
Per-network P2P magic Mainnet "XSL1" · Testnet "XSLT" · Devnet "XSLD"
PK_LEN / SIG_LEN 83 / 176 bytes

§ 18Appendix B: Canonical encodings

Every consensus object has a single canonical byte representation. Non-minimal varints, varint overflow, and trailing bytes are all consensus-invalid. Varints are unsigned LEB128 with strict minimality: a multi-byte varint must not end in 0x00, and the tenth byte may carry at most one payload bit.

TransactionBody :=
    flag : u8                       // 1 = coinbase, 0 = spend
    if flag == 1: coinbase_height : varint
    else:         inputs          : OutPoint[varint count <= 1024]
    outputs       : Output[varint count <= 1024]

Transaction :=
    body
    if flag == 0: auth : TxAuth[varint count <= 1024]

Output   := addr_version(u8) || addr_hash(32) || amount(varint)
OutPoint := height(varint) || tx_index(varint) || out_index(varint)
TxAuth   := tag(u8) || (
                if tag == 1: pubkey(83) || sig(176)
                if tag == 2: threshold(u8) || n(u8) || pubkeys(83 * n)
                             || m(u8 == threshold) || (signer_idx(u8), sig(176))[m]
            )

Block    := header(85) || transactions[varint count <= 10000]

Coinbase transactions carry neither inputs nor an authorisation trailer. Decoding a standalone transaction or block must consume every byte in the buffer.

§ 19References

  1. Bitcoin: A Peer-to-Peer Electronic Cash System. Satoshi Nakamoto, 2008 — the UTXO ledger and cumulative-work fork choice.
  2. RandomX: A Proof-of-Work Algorithm Optimised for General-Purpose CPUs. Tevador, 2019 — CPU-first proof of work.
  3. SQIsign: Compact Post-Quantum Signatures from Quaternions and Isogenies. De Feo, Kohel, Leroux, Petit, Wesolowski — the signature primitive used for transaction authorisation.
  4. BLAKE3. O'Connor, Aumasson, Neves, Wilcox-O'Hearn — domain-separated hashing throughout consensus.
  5. Dandelion++: Lightweight Cryptocurrency Networking with Formal Anonymity Guarantees. Fanti et al. — stem/fluff transaction relay.
  6. BIP-39: Mnemonic Code for Generating Deterministic Keys. — wallet seed representation.
  7. Argon2. Biryukov, Dinu, Khovratovich — memory-hard password-based key derivation for wallet encryption.