home / daemons

permanent liquidity · hush your money

Daemons

Always-on peers for the rounds that need a counterparty.

Two daemons: CashShuffle and CashFusion. They are designed to join the Nostr relay pool, hold a capped chipnet float, and run the round logic as peers — not as servers. This page is the public record of the implementation: what is built, what is partial, what is planned, and what the Nito Cash client must approve before anything is deployed.

M1 done · M2–M4 partialnot deployedNito final approval

no daemon is running · the cores and gates are public

on this page

Twelve sections, one orchestration.

01 · the gap

A round needs a peer that stays online.

M1 done · M2–M4 partialnot deployed

CashShuffle and CashFusion are peer-to-peer protocols. A browser tab is a good user-facing peer, but it is not a reliable counterparty: it closes, it sleeps, and it cannot provide liquidity at 03:00. The daemons are designed to fill that gap with a small, capped float and an always-on relay connection.

They are Nostr clients, not servers. They make outbound WebSocket connections, register, shuffle, verify, sign and broadcast exactly like a browser peer. No inbound port is required. No wallet key is sent to a relay. No other peer’s key is ever held.

This page is deliberately early. The cores are implemented; the daemon process is not. The value of the page is the boundary: every capability is marked real, implemented, partial, or planned, and every acceptance gate is named before deployment.

2

daemons in progress

0

deployed

4

Nito rounds

5 / 7

peer shapes

02 · the two

One runtime, two modes.

The shared transport and wallet are the same. The round logic is different: CashShuffle is the equal-output shuffle; CashFusion is the six-phase mix. CashShuffle is the first milestone.

01M2–M4 partial · M5 next

CashShuffle

The equal-output shuffle

A permanent peer and possible coordinator for CashShuffle-over-Nostr. Equal inputs, onion-wrapped outputs, a verify-before-sign phase, and BCH Schnorr signatures. The first daemon milestone.

  • 5-peer equal-output round; coordinator = lowest ephemeral pubkey
  • NIP-59 gift wrap + NIP-44 over a relay pool
  • VERIFY before SIGNING: the peer checks its own output first
  • BCH Schnorr with SIGHASH_ALL|FORKID (0x41)
  • Role-2 pool-native batching: 2 tagged fuel UTXOs per action
  • Capped chipnet float; no wallet key on the relay

peers

5

transport

NIP-59

signing

BCH Schnorr

deployment

not deployed

jump to the details →
02M6 · not started

CashFusion

The six-phase mix

The later mode: a six-phase CashFusion round over the same relay pool and wallet. Coordinator privacy is explicit — the daemon defaults to avoiding the coordinator role, because the CashFusion coordinator sees the mapping.

  • Six phases: announce → election → registration → mixnet → assembly → signing
  • 5-party 10 in / 10 out; 7-party 14/14 signatures
  • 80 ms per-event pacing; the measured relay set
  • Coordinator policy: avoid (default), rotate, or allow
  • Same BCH wallet and shared transport as CashShuffle
  • G4 testnet only; the mainnet opt-in beta is not built

peers

5–7

fee

5,000 sats

coordinator

avoid

deployment

not deployed

jump to the details →

[status · M1–M4 cores implemented; no daemon process is running or deployed]

03 · the comparison

What each daemon can do

The matrix is the plan, not a live capability report. The status row is the honest one.

dimensionCashShuffle daemonCashFusion daemon
protocolequal-output shufflesix-phase mix
peers5 (the design floor)5 measured; 7-party 14/14 tested
anonymity modelequal outputs; the onion hides the input→output mappingmulti-input / multi-output mix; amounts remain public
coordinatorlowest ephemeral pubkey; the daemon can coordinateelected; the daemon avoids the role by default
transportNIP-59 gift wrap + NIP-44 over relayssame shared transport
signingBCH Schnorr 0x41; never Nostr BIP-340BCH Schnorr 0x41; verify before sign
pool compositionrole-2 tagged fuel pairs + 2 blanks per lockno pool composition in the G4 testnet scope
statusM1 done; M2–M4 partial; M5 not startedorchestration; M6 not started

[source · daemons/cashshuffle/README.md, daemons/cashfusion/README.md, docs/P2P-FUSION-DESIGN.md]

04 · the shape

One host, one relay pool, no server.

The daemons are designed to run under systemd on blackhost. The only network direction is outbound: WebSocket to the relays and Electrum to chipnet.

┌────────────────────────────── blackhost · systemd ──────────────────────────────┐
│                                                                                 │
│   cashshuffle-daemon.service                 cashfusion-daemon.service          │
│   User=cashshuffle · 512M · 50% CPU          User=cashfusion · 512M · 50% CPU   │
│   M1 done · M2–M4 partial                     M6                                 │
│                                                                                 │
└───────────────────────────────────┬─────────────────────────────────────────────┘
                                    │ outbound WSS · NIP-59 gift wrap
                                    ▼
┌─────────────────────────────────────────────────────────────────────────────────┐
│  relay pool · 3–5 public relays                                                  │
│  ciphertext + p tag + timing only · 80 ms per event per connection               │
└───────────────────────────────────┬─────────────────────────────────────────────┘
                                    │ gift-wrapped events
                                    ▼
┌─────────────────────────────────────────────────────────────────────────────────┐
│  Nito Cash browser peers                                                         │
│  the user-facing peer · the final approval for any deployed result               │
└─────────────────────────────────────────────────────────────────────────────────┘

relay-pool.js

N relays, per-connection 80 ms outbox, dedupe by event id, reconnect/backoff, resubscribe, NIP-42 AUTH.

round.js

CashShuffle phases with VERIFY before SIGNING; CashFusion six phases with coordinator policy. No signature without a verified transaction.

wallet.js

Equal-amount UTXO selection, BCH Schnorr 0x41, broadcast, balance and caps. The Nostr signer is never reused.

pool.js

Role-2 tag pairs, two blanks per lock, lock + action, VM-eval in consensus and standard modes.

[source · daemons/README.md, daemons/cashshuffle/README.md, daemons/cashfusion/README.md]

05 · the boundary

Real, implemented, partial, or planned.

The page is useful only if the boundary is explicit. Nothing here is marked live that is not live.

surfacestatedetail
Orchestration treerealCommits 239d66c + M1–M4: plans, transport, round, wallet signer, pool builders, tests, hardened units.
Daemon processplannedsrc/main.js loads the config and exits with “not implemented”; the round state machine, wallet selection, BCH P2PKH signer, pool helpers and lock/action builders exist, but signature verification/timeouts/persistence, the network loop and Electrum broadcast are pending.
Nostr transportimplementedShared transport: official NIP-44 v2 KDF/padding passes the official `nip44.vectors.json`; Nito chose official (`ac61542`), adopted the NIP-59 timestamps and wired NIP-42 (`d85bade`); relay pool with 80 ms pacing, dedupe, reconnect; CashShuffle transport wrapper. 44 shared tests.
CashShuffle roundcore implementedRound state machine + VERIFY before SIGNING; 16 tests including the malicious-coordinator case; Nito added the client VERIFY. Signature verification, timeouts, persistence, the network loop, Electrum broadcast and end-to-end A1/A2 are pending.
CashFusion roundplannedNo implementation. G4 (mainnet opt-in beta) is not built.
Pool-native batchingbuilders implementedCarrier/tag/fuel-pair/cost helpers and the lock/action builders are implemented and tested (14 tests: 7 pool + 7 lock/action). Nito confirmed the 2N shape, pinned the proving assets and PASSED the witness acceptance (`a304d3c`); the browser acceptance also PASSED (SHIELD 1ca58773… → TRANSFER 50644d00… → UNSHIELD f52008f4…). The 2N network loop, VM-eval and off-chain note delivery remain. The 3-out v3 is a separate pool line — measured and deployed as a chipnet demo (184,528 constraints; SHIELD e847ef56… → TRANSFER ef64f3dd… → UNSHIELD ec31a41c…; 3-out verifier/hook/witness built); the 2N fee-lock shape is unchanged.
blackhost deploymentnot deployedThe systemd units are templates. No service is installed or running.
Nito final approvalstandingThe Nito Cash client remains the final approval; the record goes in A10/CF-A6 after the web-platform acceptance.

[boundary · orchestration commit 239d66c; the daemon process, round, wallet and pool builder are stubs]

06 · the invariants

The rules the code must keep.

These are not features. They are the conditions under which a daemon is allowed to hold a float.

theft defense

Verify before sign

The Nito protocol core has no transaction object and no output check. The daemon adds a VERIFY phase: its own output is present at the expected amount and address, the input set matches, and the fee matches the model before any signature is produced.

signature separation

BCH Schnorr is not BIP-340

Nostr events use BIP-340. BCH inputs use BCH Schnorr with the 0x41 sighash byte. The wallet module uses the BCH path only; the Nostr signer is never reused for a transaction.

key hygiene

No wallet key on the relay

The daemon uses per-round Nostr keys. The BCH seed lives in a mode-600 file owned by the service user, outside the repository, and never touches a relay. The daemon never holds another peer’s key.

bounded risk

Caps and one in-flight round

The proposed CashShuffle cap is 400,000 sats: 10 actions of 30,000-sat fuel, 20,000 sats of blanks, and up to 50,000 sats of lock fees. The daemon serializes rounds and tracks the global cap.

operations

Non-root systemd

Dedicated users, NoNewPrivileges, ProtectSystem=strict, ProtectHome, PrivateTmp, StateDirectory, MemoryMax=512M, CPUQuota=50%. The metrics endpoint binds to localhost only.

chain safety

VM-eval before broadcast

Every role-2 action is evaluated in consensus and standard modes before broadcast. Any error rejects the action. The lock and action are broadcast atomically; the action spends the lock’s unconfirmed outputs.

07 · the composition

The shuffle is designed to pay the pool.

Pool-native batching is the design that makes the round outputs the role-2 tagged fuel UTXOs. The tag binds each fuel pair to the action that will spend it. The arithmetic is exact, and the earlier “5 outputs → 5 actions” version was wrong.

carrier

169 B

OP_RETURN payload: nf0 ‖ nf1 ‖ cm0 ‖ cm1 ‖ newRoot ‖ pv(8) ‖ sign(1)

tag

SHA256

SHA256(carrier[0..64]) = SHA256(nf0_LE ‖ nf1_LE)

fuel

2 × 15,000

Two tagged fuel UTXOs with the same tag per action; 30,000 sats of action fee

blanks

2 × 1,000

Two blanks per lock at the vending price; the blank is the mutable NFT with an empty commitment

state float

10,000

The state NFT carries a 10,000-sat float; the action conserves it

lock fee

separate

The lock/shuffle transaction fee is separate from the 30,000-sat action fee

one role-2 action
  in0  tagged fuel UTXO  ─┐
  in1  tagged fuel UTXO  ─┴─ same tag = SHA256(nf0_LE ‖ nf1_LE)
  in2  state NFT          ── storedRoot ‖ nullifierSetHash; FT = balance

  out0 169-B OP_RETURN carrier
  out1 new state NFT      ── 10,000-sat float; FT = newBalance
  out2 public payout      ── only when sign = 1

  fee  = in0.sats + in1.sats = 30,000 sats (the action fee)
  lock = a separate signed P2PKH tx with its own fee

corrected arithmetic

A 5-peer round with one 15,000-sat output per participant produces five distinct tags and zero same-tag pairs. Five actions need 10 tagged fuel outputs, not 5. The pool-native round must produce two tagged outputs per action, or each participant must contribute two equal inputs and receive two same-tag outputs.

The carrier, tag, fuel-pair and cost helpers and the BCH lock/action builders are implemented and tested (14 tests: 7 pool + 7 lock/action); the web-platform acceptance, VM-eval and note delivery are pending.

[source · docs/POOL-HANDOFF-2026-11-24-NITO-ROLE2-TAGGED.md §3–§4; pool-registry.json]

08 · the sequence

M0–M1 done. M2–M4 are partial.

Nito answered the client questions; the remaining Nito work is the store/UI wiring and the web-platform acceptance. Hush still needs signature verification, timeouts, persistence, the Electrum broadcast, network loop, VM-eval, note delivery and deployment. The roadmap is ordered by dependency: transport, then round, then wallet, then the pool composition, then operations, then CashFusion, then production.

M0done

Orchestration

Tree, plans, acceptance, open questions, config/metrics, stubs, units. Commit 239d66c.

M1done

Shared transport

Official NIP-44 (ac61542), NIP-59 timestamps, relay pool with 80 ms pacing, dedupe, reconnect, NIP-42 (d85bade); CashShuffle transport wrapper. 44 shared tests.

M2in progress

CashShuffle round

Round state machine + VERIFY before SIGNING; 16 tests including the malicious-coordinator case; Nito added the client VERIFY. Signature verification, timeouts, persistence, network loop, Electrum broadcast and A1/A2 end-to-end pending.

M3in progress

Wallet and liquidity

Equal-amount selection, funding selection and caps implemented (5 tests); BCH P2PKH signer implemented (4 tests); Electrum broadcast pending.

M4in progress

Pool-native batching

Carrier/tag/fuel-pair/cost helpers and lock/action builders implemented (14 tests: 7 pool + 7 lock/action); Nito confirmed the 2N shape, pinned the assets and PASSED the witness acceptance (a304d3c); the browser acceptance PASSED (SHIELD 1ca58773… → TRANSFER 50644d00… → UNSHIELD f52008f4…); the 2N network loop, VM-eval and note delivery remain. The 3-out v3 is a separate pool line — measured and deployed as a chipnet demo (SHIELD e847ef56… → TRANSFER ef64f3dd… → UNSHIELD ec31a41c…; 3-out verifier/hook/witness built).

M5not started

Operations

Hardened systemd, metrics endpoint, journald caps, backup/restore, 24 h soak.

M6not started

CashFusion

Six-phase round, measured constants, coordinator avoidance, G4 testnet.

M7not started

Production

Security review, mainnet opt-in beta, Gate 7 ceremony for the pool, Nito final approval.

[source · daemons/ROADMAP.md; M0 = commit 239d66c]

09 · the gates

No daemon ships without these.

The gates are written before the code. A1 and A2 are the first two: a real 5-peer round and a malicious-coordinator negative test.

CashShuffle · A1–A10

A2 unit test passes
  • A15-peer chipnet round. 5 equal inputs → 5 equal outputs, all BCH Schnorr signatures, one txid, no wallet key on the relay.
  • A2Malicious coordinator. A coordinator presents a transaction that omits a peer’s output; the peer refuses to sign and the round aborts. Unit test passes; end-to-end pending.
  • A324 h uptime. Relay drop and reconnect; 80 ms pacing; no bans; a round completes after the reconnect.
  • A410 rounds within cap. 10 consecutive rounds within the float cap; balance and caps visible in the metrics.
  • A5Tag pairs. Two tagged fuel UTXOs per action; five actions require 10 tagged outputs, not 5.
  • A6Blank cost. Two blanks per lock at 1,000 sats each; the cap includes fuel, blanks and the lock fee.
  • A7Signature separation. BCH Schnorr on inputs, BIP-340 on Nostr events; cross-use rejects.
  • A8NIP-44 / NIP-59. Official vectors, standard-peer decrypt, two-day timestamp window, subscription since.
  • A9Hardening. Non-root, NoNewPrivileges, ProtectSystem, localhost metrics, seed mode 600, journald cap.
  • A10Nito approval. The Nito client runs against the daemon and records written approval.

CashFusion · CF-A1–CF-A7

not started
  • CF-A15-party round. 10 inputs / 10 outputs, 1,760 B, 5,000 sats, 10/10 signatures.
  • CF-A27-party round. 14/14 signatures and one broadcast txid.
  • CF-A3Relay behavior. Drop and reconnect, 80 ms pacing, no bans, round completes.
  • CF-A4Coordinator privacy. avoid refuses the role; rotate and allow are explicit and logged.
  • CF-A5G4 testnet. Chipnet round with Nito peers; the existing CashFusion pool is not used.
  • CF-A6Nito approval. The Nito client runs against the daemon and records written approval.
  • CF-A7Mainnet gate. Mainnet is rejected until G4 and the operator sign-off are recorded.

[source · daemons/cashshuffle/ACCEPTANCE.md, daemons/cashfusion/ACCEPTANCE.md]

10 · the response

Nito answered. Two items remain.

Nito answered the 11-item checklist on 2026-11-26. The wire, verification, round shape, fees, proving assets and 3-input builders are settled; the remaining client work is the store/UI wiring and the web-platform SHIELD→TRANSFER→UNSHIELD.

remaining Nito work

Store/UI wiring for submitRole2Action + the role-2 scan, and the web-platform chipnet SHIELD→TRANSFER→UNSHIELD. After the web acceptance, walletProverCompatible flips and the daemon-side A5/A6 can run.

[source · docs/DAEMONS-NITO-RESPONSE-2026-11-25.md; daemons/cashshuffle/OPEN-QUESTIONS.md]

11 · the questions

What people ask first.

Are the daemons live?

No. The daemon cores are implemented (M1–M4), but no daemon process is running, deployed, or funded. The page marks every surface as real, implemented, partial, or planned.

Why run a daemon at all?

The rounds are peer-to-peer, but they need a peer that is always online. A browser tab is not a reliable counterparty. The daemon holds a capped chipnet float, joins the relay pool, and coordinates when elected.

Does the daemon hold my keys?

No. Each round uses an ephemeral Nostr key. The BCH wallet seed is separate, lives in a mode-600 file owned by the service user outside the repository, and never touches a relay. The daemon never signs for another peer.

What is verify-before-sign?

The daemon checks the final transaction before producing a signature: its own output is present at the expected amount and address, the input set matches, and the fee matches the model. A malicious coordinator cannot make it sign a transaction that omits its output.

Why not just use the browser client?

The browser client is the user-facing peer. The daemon is the always-on liquidity peer. The Nito Cash client remains the final approval; the daemon does not replace it.

Is CashFusion live?

No. CashFusion is M6. Only the shared transport and coordinator policy are implemented; the six-phase round is planned, the measured constants are recorded, and G4 (mainnet opt-in beta) is not built.

12 · the sources

Read the record.

Every claim on this page has a file or a measured source behind it. The tree is the primary record.

the next step

The tree is public. The daemons are not.

Read the orchestration, the plans and the Nito response. The store/UI wiring and the web-platform acceptance are the remaining client work; the daemon runtime follows.