PROJECT GUIDE

How LimitProbe tests NWC spending limits

LimitProbe is a black-box Nostr Wallet Connect spending-limit stress tester for AI-agent Lightning wallets. It checks whether a wallet’s spending limit still holds when two individually affordable payments arrive together.

01 · OVERVIEW

The question behind the test

“If an autonomous agent is given a Bitcoin wallet with a spending limit, can that limit still be trusted when multiple payments hit it at nearly the same time?”

LimitProbe tests that behavior from outside the wallet. Alby Hub is the system under test; the project observes its NWC requests, responses, budget reports, and invoice lookups without treating a successful payment response as settlement proof.

02 · WHY THIS MATTERS

A limit needs to hold under concurrency

AI agents can initiate payments autonomously, so a wallet spending limit is an important boundary on what an agent can spend. A single-payment check only shows how the wallet handled one request. It does not establish what happens when several valid requests reach the limit at once.

Concurrent requests can exercise budget accounting at the same time. LimitProbe applies that pressure and checks the final receiver-side settlement. The project tests this boundary; it does not claim that a specific wallet vulnerability exists.

03 · THE TEST

Two affordable requests exceed the combined budget

Starting spending limit1,000 sats
Attempt A700 sats
Attempt B700 sats
Combined requested principal1,400 sats

Each invoice is individually within the configured limit, while both together exceed it. Safe behavior means independently confirmed settled principal remains at or below the spendable budget captured before dispatch. Fees are recorded separately from principal.

04 · HOW IT WORKS

One barrier, then independent checks

  1. Constrain the wallet. Configure the NWC connection with the test spending budget and read the starting budget.
  2. Prepare receiver invoices. Create two distinct Lightning invoices on the receiver LND node.
  3. Release both attempts together. Prepare both NWC pay_invoice requests behind one synchronization barrier, then dispatch concurrently.
  4. Reconcile the outcome. Capture NWC replies and lookup_invoice results, independently query Bob’s LND invoice state, and read the final budget.
  5. Evaluate and report. Calculate settled principal against the verified starting budget, preserve timing/provenance, and generate redacted JSON evidence.
Test path · local Bitcoin regtest environment
NWC request path
LimitProbeNWC clientNostr relaylocal message pathAlby Hubwallet under testAlice LNDpayer
Lightning settlement
Alice LNDpayerLightningpayment networkBob LNDreceiver ground truth

05 · EVIDENCE MODEL

Payment replies are only one part of the evidence

LimitProbe combines the payer’s NWC payment responses, NWC invoice lookups, Bob LND receiver observations, before-and-after budget snapshots, and timestamp/run binding. It does not infer settlement from a payer response alone. Missing or contradictory evidence is preserved rather than treated as success.

PASS
Required evidence is complete and independently confirms settled principal did not exceed the starting spendable budget.
FAIL
Independent receiver evidence proves settled principal exceeded the starting spendable budget.
INCONCLUSIVE
Evidence is missing, unresolved, contradictory, or otherwise insufficient to prove PASS or FAIL.

06 · VERIFIED LIVE RUN

One committed NWC + Lightning PASS

This result is from the committed report for run 5519e35b-96c5-4e25-8bbc-668d41dea845, using controlled Bitcoin regtest infrastructure.

VERIFIED LIVE TESTPASS
Starting budget
1,000 sats
Concurrent attempts
700 + 700 sats
Dispatch delta
1.312 ms
Attempt A
SETTLED · 700 sats
Attempt B
QUOTA_EXCEEDED · unpaid
Settled principal
700 sats
Budget remaining
300 sats
Evidence
Complete · invariant held

07 · TWO DIFFERENT EXPERIENCES

Sandbox simulation vs. verified live test

SANDBOX TEST

Try it in your browser

  • Simulated, fast, and interactive
  • Generates fresh sandbox evidence
  • Does not call NWC, Alby Hub, or Lightning
VERIFIED LIVE TEST

Inspect the committed run

  • Real NWC and Lightning payments on regtest
  • Used Alby Hub, a local Nostr relay, Alice and Bob LND
  • Receiver settlement was independently reconciled

A sandbox PASS describes the simulation only. It is not a new wallet or Lightning execution and does not replace the separately linked verified live evidence.

08 · TECHNOLOGY

Technology Integration

Nostr Wallet Connect (NWC)
The wallet-control interface used to request payments, inspect capabilities, look up invoices, and read budget evidence.
Nostr relay
Carries NWC messages between the LimitProbe client and Alby Hub in the local test setup.
Alby Hub
The black-box wallet under test; LimitProbe observes its externally visible NWC behavior.
Lightning and LND
Lightning carries the test payments. Alice LND is the payer node and Bob LND provides receiver-side invoice ground truth.
Bitcoin regtest
A local test network for the live run, using controlled test funds rather than mainnet bitcoin.

09 · SECURITY AND TRUST

Keep claims tied to evidence

  • The wallet is treated as a black box; Bob’s receiver records supply independent settlement evidence.
  • Public evidence is redacted. The committed report does not include the private NWC connection URI or invoice strings.
  • The evaluator preserves PASS, FAIL, and INCONCLUSIVE outcomes; incomplete or contradictory evidence cannot be promoted to PASS.
  • Each payment attempt is dispatched once; payment retries are not used to fill gaps in evidence.

10 · CURRENT SCOPE

What this dashboard does—and does not—run

  • Run Sandbox Test is a browser-side simulation only.
  • The verified live execution used a controlled local Bitcoin regtest setup.
  • The dashboard does not currently expose arbitrary public-user NWC wallet testing or a bring-your-own-wallet connection.
  • A live test requires suitable NWC, payer, receiver, and Lightning infrastructure.

11 · FUTURE WORK

Possible next steps

Bring-your-own NWC testing, isolated hosted test environments, configurable budgets and payment patterns, and additional concurrency scenarios are directions for future work. They are not features of the current dashboard.