Skip to content

Transaction Format

Soqucoin uses a UTXO transaction model based on Bitcoin's, with one critical difference: every signature is ML-DSA-44 (NIST FIPS 204) instead of ECDSA. This page documents the byte-exact witness format accepted by soqucoind on mainnet.


Witness-v1 layout

Every Soqucoin spend carries a witness with exactly two stack items:

witness = [ sig₂₄₂₀ ‖ 0x01,        // Item 1: signature + SIGHASH_ALL
            0x00 ‖ pubkey₁₃₁₂ ]     // Item 2: key type + public key
Field Size (bytes) Description
sig 2,420 ML-DSA-44 signature (FIPS 204)
0x01 1 SIGHASH_ALL flag
0x00 1 Key type byte (ML-DSA-44 / FIPS-204 form)
pubkey 1,312 ML-DSA-44 public key

Total witness size: 3,734 bytes per input.

Sighash computation

Soqucoin uses BIP-143 sighash with empty-context ML-DSA signing:

  1. Compute the BIP-143 sighash digest (same algorithm as Bitcoin SegWit v0)
  2. Sign with ML-DSA-44 using an empty context string (per FIPS 204 §4.2)
  3. Append SIGHASH_ALL (0x01) to the signature

Address scheme

Addresses use Bech32m encoding (BIP-350):

address = bech32m(hrp, witness_version, witness_program)

hrp              = "sq" (mainnet, testnet, regtest) / "ssq" (stagenet test network)
witness_version  = 1
witness_program  = SHA-256(pubkey₁₃₁₂)   // 32 bytes

Example (shortened): sq1p7wk3v5f4e2r8n6h9a1c4d7g0j3m6q2t5x8...

Units

Unit Value
1 SOQ 100,000,000 shors
1 shor smallest unit (like satoshis)

MAX_MONEY = 20,000,000,000 SOQ (src/amount.h). This is a per-transaction ceiling. It is not a supply cap: Soqucoin has perpetual tail emission and total supply passes this figure during the first epoch.

UTXO model

Soqucoin transactions consume unspent outputs (UTXOs) and create new ones, exactly like Bitcoin. Key differences:

  • No legacy address types. All addresses are witness-v1 (Bech32m).
  • Larger witness. ML-DSA-44 signatures are 2,420 bytes (vs 72 bytes for ECDSA). Each block commits a PAT attestation over its Dilithium spends in a coinbase output; a node may discard attested witness data past the finality horizon (witness pruning), which is where the storage saving is realized.
  • 60-second blocks. Target block time is 60 seconds (vs Bitcoin's 10 minutes).
  • Coinbase maturity. On mainnet, 288 blocks before a mined block's coinbase outputs are spendable.

Verification

This witness format is:

  • Byte-exact against soqucoind consensus (node-proven)
  • Accepted live on the pre-mainnet test network (TypeScript end-to-end test, 2026-06-20), and enforced by every mainnet node
  • Audited by Halborn (30 findings, all remediated)

Next steps