diff options
| author | Adam Soltys <[email protected]> | 2026-08-22 08:04:06 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-22 08:04:06 -0700 |
| commit | 38bfeeecdafb678d2a495c2865d1ff4dd6255ac9 (patch) | |
| tree | dc2b9849e0c8c0825f820e60ab815bb10c7131ef /lib/api.ts | |
| parent | 51b9f1a267a682a86e528bef424b245c63e5cb19 (diff) | |
| download | coinos-server-38bfeeecdafb678d2a495c2865d1ff4dd6255ac9.tar.gz coinos-server-38bfeeecdafb678d2a495c2865d1ff4dd6255ac9.zip | |
confirm: never re-credit receive outputs on wallet-funded txs
A transaction our own wallet contributed inputs to carries a "send" detail;
every receive output on it is then our own change or an internal move, never
an external deposit. Crediting such an output mints phantom balance against
funds already in custody — the misclassification an external report flagged in
the on-chain send path (wallet ownership is not account ownership).
Guard the credit at the settlement layer, which is the correct boundary and
covers both bitcoin and liquid uniformly: if the tx has any send detail, skip
every receive output (log a tripwire for amounts >= 300 sats so continued
probing is visible). Rejecting these at send time instead would break
legitimate withdrawals, whose change routinely lands on a reused deposit
address that resolves to an invoice.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XiwgmQKwKnRxUmVDd4xSf7
Diffstat (limited to 'lib/api.ts')
0 files changed, 0 insertions, 0 deletions
