A deposit scanner will see the same on-chain transaction more than once — after restarts, re-scans, and webhook replays. The fix is a database-enforced idempotency key, and picking the right one is less obvious than it looks.
Samiul
Deposits Idempotency Indexing Postgres Reorgs