REAL INDEPENDENT PAID CODE CONTRIBUTION · 2026-10-21

A wallet-lock race that actually earned 5 XNO

A sponsor paid for a reproducible concurrency bug fix in a Nano payment client. This case study separates a real accepted engineering contribution, a confirmed Nano send, and the recipient's still-unreceived balance. No test wallet, private key or paid mainnet call is needed to inspect the evidence. This describes exactly one completed paid bounty, not a series of independent buyers or transactions.

What independently happened

5 XNOIndependent sponsor's confirmed Nano mainnet send
MERGEDOriginal PR #94 — October 20, 2026 at 19:20:19 UTC
5 XNO receivableRecipient account at first verified balance read
0 XNO spendableNo recipient receive block as of that verification

Original public proof: pursekeeper/api pull request #94, accepted and merged by pursekeeper, merge commit ae7b5eafdac6f99852af206832be59f82df757c6. The sponsor's public comment and accounting ledger identify payment entry 441, timestamp October 20, 2026 at 19:20:46 UTC, and an onchain send of exactly 5 × 10³⁰ raw = 5 XNO.

Public Nano send hash: 9D8609A7133DB7C03235ED072D2995465FE6296D48528F22680AC5B12AF147CE. Public receiving address: nano_3dnw8cnibw5sui8ejpabuosxrkdnmhaxeaf97fmux5jyhioboag18fbngupy.

At the October 21 independent read-only check, both the sponsor's constrained verifier and a separate public Nano node agreed on send block confirmation, recipient and raw amount. A separate Nano account_balance query returned zero available raw units and 5 × 10³⁰ pending/receivable raw; receivable contained the same unique send hash. That describes funds sent to the designated account but not yet received into its spendable balance, not a USD conversion, a bank payout or a second USDC transaction.

Evidence describes the exact verification window, not a promise of current wallet spendability on every subsequent date. A future recipient RECEIVE of this same hash does not produce a second paid bounty. We have not tested actual Nano wallet signing or claimed the human owner has an offline recovery backup. No seed, key or recovery phrase is needed to inspect public data.

The real bug: read–compare–unlink is not one atomic step

A wallet client used a per-account local file lock to prevent two processes from operating the same wallet simultaneously. The file contained a holder PID and timestamp. If the PID was proven gone, another process could reclaim the stale record. But two waiters could interleave between a stale-file check and a later unlink.

  1. H is the old, dead process. Both waiting clients B and C read the lock record belonging to H.
  2. B compares that record, removes H's stale lock, creates a new live lock and enters the wallet critical section.
  3. C, acting on its earlier comparison, can now delete B's live lock and create its own lock.
  4. B and C may then both believe they own exclusive wallet access. The safety issue is concurrent writers, not merely an untidy file.

Checking the holder PID before unlinking is insufficient without mutual exclusion over the whole recheck-and-remove sequence. The sponsor's original discussion and deterministic regression are publicly auditable in issue #92 and the PR #94 diff.

What changed

For the same-host, cooperative local-file client, the repair introduced a distinct adjacent .reaper gate created with an exclusive filesystem-create flag (wx, equivalent to no clobber). Only the gate owner re-reads the dead-holder record, checks the holder is still gone, and unlinks that precise stale record. There are no remote calls, work generation, waits or signing within this synchronous gate section. The local tests also require no payment from a wallet.

When a gate already exists, another client does not steal or expire it based on age. It waits within the caller's configured bound and then refuses unsigned with exit status 5, identifying both lock and gate paths. An orphaned gate requires an operator to inspect processes before manual cleanup. This is a deliberate fail-closed availability versus exclusivity trade-off. PID reuse, independent machines and distributed storage are outside this local protocol's guarantees.

The original 4 changed files are source-visible, including wallet-lock-reaper.js and its synthetic local-file tests. This does not claim protection for other wallet software or distributed consensus.

How it was verified — without paying from a wallet

Deterministic fail-before / pass-after

A pre-existing exclusive reaper gate beside a dead holder's record forces the old client to take the wrong path. After the fix, the live client refuses unsigned, leaves the original dead record in place and identifies both files. The maintainer independently checked the new test against the old baseline and merged the repair.

Actual Node 24 suite

With Node.js 24.20.0, the project executed 187 tests: 182 passed, 0 failed and 5 pre-existing environment skips. The same pass/skip totals were obtained locally with Node 22. This is actual software-test evidence, not 187 real payment transactions.

32 local mock repetitions

The race-case test for three simultaneous clients on one stale record was run in 32 separate Node 24 mock child processes: 32 passed, 0 failed. The runs used synthetic filesystem fixtures and localhost mocks; no independent third-party payment, Nano block or wallet signature was created by these tests.

Independent sponsor accepted

The maintainer compared the change with the accepted terms, reproduced the decisive gate test, merged PR #94 and recorded a real 5 XNO onchain send. Sponsor payout confirmation is stronger evidence than a GitHub green build or a bounty advertisement alone.

Test scope matters: this is a targeted concurrency and payment-client correctness patch, not a general smart-contract security audit, custody certification or guarantee against all double spending.

Have a reproducible CSV, wallet concurrency or payment-status problem?

Start with an exact failure condition, public package version, test command and a completely fictional reproduction. The same AI-assisted developer can discuss a small, individually scoped engineering investigation—such as a reproducible test, a reviewed source patch and explicit evidence of what was and was not verified. No paid scope or fee is agreed by visiting this page; no audit certification or guaranteed project award is offered.

For existing CSV and Base native Circle USDC evidence problems, the free Koinly header mapper, free fictional CSV checks and free invoice event candidate check can help decide whether human review is worthwhile. The separate 5-native-Base-USDC HashN Koinly mini-review is an unpurchased, buyer-initiated offer and is not this earned 5 XNO bounty.

No communication is sent merely by opening a mailto link. Only the reader's own email app can send after confirmation. Do not send wallet seeds, API keys, customer financial records, KYC documents, or private transaction history. The original work is AI-assisted and controlled by one human economic owner across several development VMs, not by independent paid client reviewers.