aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/analytics.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-07 23:00:33 -0700
committerAdam Soltys <[email protected]>2026-08-07 23:29:27 -0700
commitbfba77d22a85ffb021a8a0299326c3833c2cafaf (patch)
treea7177b143c12c56b30913c8c77a0a53bfd59b020 /scripts/analytics.ts
parent8e7ffe3e33e36396fa7d2c17486e1707a2da4f43 (diff)
downloadcoinos-server-bfba77d22a85ffb021a8a0299326c3833c2cafaf.tar.gz
coinos-server-bfba77d22a85ffb021a8a0299326c3833c2cafaf.zip
ecash: serialize the shared cash-key read-modify-write (S13)
The house Cashu holdings live as one token under redis `cash`. claim() and mint() decoded the current proofs, swapped at the mint, then wrote back — with no lock. Two concurrent claims read the same proofs and the later write clobbered the earlier, so already-swapped proofs vanished from the token while both users stayed credited (an insolvency leak, triggerable via the unauthenticated /ecash/:id callback). Wrap both read-swap-write sequences in an in-process mutex. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Diffstat (limited to 'scripts/analytics.ts')
0 files changed, 0 insertions, 0 deletions