Files
pezkuwi-sdk/tools/usdt-bridge
Satoshi Qazi Muhammed 82543bdfab usdt-bridge: record over-cap swaps, throttle backfill, gate routine Telegram noise
Same silent-loss pattern as the previous connect-failure fix, found while
auditing further: amount > max_single_tx (both deposit and withdrawal)
warned and Telegram-alerted but never called db.add_deposit/add_withdrawal
- "not auto-recorded" was literally in the log line. Now always recorded
(pending_multisig_approval_amount_exceeds_cap), same as every other
manual-review path.

Backfill throttle: catching up many blocks after real downtime fires a
tight burst of RPC calls that can trip a metered/shared endpoint's rate
limit hard enough to poison the whole connection - observed live. A 150ms
pause between backfilled blocks avoids it.

Telegram notification threshold: at real user volume, a message for every
small successful auto-pay would bury the ones that need a human (failures,
over-cap, reserve problems, anything falling to manual 3-of-5) under
noise. Added notify_threshold (default 500 USDT) gating ONLY the routine
"auto-paid successfully" message on both legs - everything else keeps
notifying unconditionally regardless of amount. Also found and fixed a
real asymmetry: the withdrawal leg's "awaiting multisig approval" case
never notified Telegram at all (the deposit leg always did) - a
withdrawal needing manual review must always page someone.
2026-07-16 12:39:13 -07:00
..