Inspiration

In Nigerian cities, a phone snatching often does not end with the snatch. Victims are held on the spot and forced to unlock their banking and crypto apps and send money while the attacker watches. A normal wallet has no answer for that moment. Whatever the attacker can see, the attacker can take, and unlocking under duress and losing everything are the same event.

ShroudVeil is built for that exact moment. It comes from the builder's work across real-world money, DeFi systems and security: the problems ordinary people in Nigeria actually face when their money lives on a phone.

What it does

ShroudVeil is a Bitcoin wallet with two PINs and a pre-signed escape plan.

  • The normal PIN opens the real wallet: an on-chain vault plus a Lightning balance.
  • The duress PIN opens a decoy wallet instead. The decoy holds a small, believable balance (5,000 sats in the demo) and looks exactly like the real thing. Nothing on screen hints that a real wallet exists.
  • Before anything goes wrong, the owner arms the sweep. The app builds and signs a transaction that sends the entire vault to a recovery address, locks it in time with an nLockTime, and holds it unbroadcast. Signing happens calmly, in advance, while the owner is safe.
  • Entering the duress PIN silently fires that held transaction. The attacker walks away with a small wallet. The real funds are already moving to the recovery address, and the time lock means nobody, including the owner, can reverse it in the moment.
  • If the phone is simply gone and no PIN is ever typed, a dead-man's switch covers it. The app publishes signed check-in events to Nostr relays. A watcher process verifies the newest check-in against a safety window. If check-ins stop, the watcher broadcasts the same pre-signed sweep on its own. No phone, no tap, no permission. If the relays are merely unreachable, the watcher holds: a network outage is not proof of death.

How it works

  • Keys and transactions: bitcoinjs-lib. The sweep is a PSBT built and signed in advance, with the signature validated locally before it is held. Its nLockTime is enforced by the Bitcoin network itself: broadcast attempts before the locktime are rejected as non-final, and the state machine records those rejections and keeps retrying until the same signed transaction confirms. The demo shows this happening.
  • Lightning: two wallets on a self-hosted LNbits instance, one for the real wallet and one for the decoy. The decoy receives its 5,000 sats through a real, settled invoice payment from the main wallet.
  • Check-ins: Nostr events (kind 30078, tagged shroudveil-checkin) published to four public relays, with any one success counting. The watcher is a separate process that reads the newest event, verifies its Schnorr signature, computes its age, and logs every decision it makes: HOLD, FIRE, or UNKNOWN (relays unreachable, so it holds).
  • Sweep state machine: UNARMED, ARMED, TRIGGERED, SWEPT, persisted to disk so the state survives restarts.
  • The app itself is one mobile-first page built for low bandwidth and mid-range phones: a PIN pad, one wallet template that serves both the real and the decoy view, and a watcher status screen with demo controls so judges can run both stories from the page.

What is real and what is test

Stated plainly, because judges should not have to guess:

  • The cryptography is real: key generation, PSBT construction, advance signing, signature validation, network-enforced time locks, and Schnorr-signed Nostr events verified by an independent watcher.
  • The money is test money. The hosted demo runs on the public Bitcoin signet network, and the vault holds a funded 50,000-sat signet coin, so judges can follow the vault and the sweep on a public explorer. The Lightning side runs on LNbits with its FakeWallet backend, so Lightning payments settle for real inside the instance and are worth nothing outside it.
  • Signet mode runs through the mempool.space Esplora API. The status page links the sweep transaction on a public explorer once it confirms.
  • Demo keys are generated fresh into a local file on every boot of the hosted demo. They protect nothing of value and must never be funded with real bitcoin.
  • The main Lightning wallet's initial demo funding uses a documented ledger step inside the setup script, possible only because the demo operates its own LNbits instance. It is documented in the repo rather than hidden.

Try it

Open the live demo. First load can take about a minute while the free host wakes. The vault already holds a funded 50,000-sat signet coin, so skip the Fund button: it only works on the local test setup and errors on the live demo. Unlock with the normal PIN, 2468. Tap Check in. Open Watcher status and arm the sweep. Lock the app, then unlock with the duress PIN, 9753, and watch the decoy open while the sweep fires. Or arm the sweep, stop checking in, and watch the watcher fire it alone after the safety window.

What comes next

  • User-set safety windows (hours, not the demo's 120 seconds) and more than one recovery address.
  • Support for external Lightning wallets over Nostr Wallet Connect, so the decoy and main balances can live in wallets the user already has.
  • A recovery flow that guides a user who has lost everything except the recovery wallet through checking and consolidating swept funds.

Built With

Share this project:

Updates

Submission history