From c0a982b32c92fbc065004ac4b1952182b2f25adb Mon Sep 17 00:00:00 2001 From: Satoshi Qazi Muhammed Date: Tue, 14 Jul 2026 21:10:10 -0700 Subject: [PATCH] Fix min_deposit/min_withdraw mismatch: 10 USDT backend vs 1 USDT wallet UI wallet-android's Bridge screen has always advertised a 1 USDT minimum (MIN_USDT constant), but usdt-bridge's actual min_deposit/min_withdraw defaulted to 10 USDT since the tool's original scaffold commit - nobody had ever reconciled the two. Confirmed live: a real user swap of ~1 USDT landed correctly at the multisig custody address but was silently skipped by listen_deposits (amount < min_deposit), so the user never received wUSDT despite the wallet telling them 1 USDT was a valid amount. Backend now matches the value already promised to users, not the other way around - changing the wallet's displayed minimum after users have already relied on it would be the wrong direction to reconcile this in. --- tools/usdt-bridge/bridge_config.json | 4 ++-- tools/usdt-bridge/src/main.rs | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/usdt-bridge/bridge_config.json b/tools/usdt-bridge/bridge_config.json index 404f589a..02bad324 100644 --- a/tools/usdt-bridge/bridge_config.json +++ b/tools/usdt-bridge/bridge_config.json @@ -3,8 +3,8 @@ "pezkuwi_rpc": "wss://asset-hub-rpc.pezkuwichain.io", "polkadot_usdt_asset_id": 1984, "pezkuwi_wusdt_asset_id": 1000, - "min_deposit": 10000000, - "min_withdraw": 10000000, + "min_deposit": 1000000, + "min_withdraw": 1000000, "fee_basis_points": 10, "seed_path": "bridge_seed.json", "db_path": "bridge_db.json", diff --git a/tools/usdt-bridge/src/main.rs b/tools/usdt-bridge/src/main.rs index 5aa4b468..280a3d63 100644 --- a/tools/usdt-bridge/src/main.rs +++ b/tools/usdt-bridge/src/main.rs @@ -23,7 +23,9 @@ //! `Multisig.approveAsMulti`/`asMulti`, which is expected to happen through pwap-web's //! existing multisig UI (shared/lib/multisig.ts, shared/lib/usdt.ts, MultisigMembers.tsx), //! not this relayer. -//! - Minimum deposit/withdraw: 10 USDT +//! - Minimum deposit/withdraw: 1 USDT (matches wallet-android's advertised minimum - this was a +//! leftover scaffold default of 10 USDT that nobody had reconciled with the app's own 1 USDT +//! minimum until a real user swap below 10 but above 1 USDT was silently skipped) //! - Fees: Configurable (default 0.1%) use anyhow::{anyhow, Context, Result}; @@ -152,8 +154,8 @@ impl Default for BridgeConfig { pezkuwi_rpc: "wss://asset-hub-rpc.pezkuwichain.io".to_string(), polkadot_usdt_asset_id: 1984, pezkuwi_wusdt_asset_id: 1000, - min_deposit: 10_000_000, // 10 USDT (6 decimals) - min_withdraw: 10_000_000, + min_deposit: 1_000_000, // 1 USDT (6 decimals) - matches wallet-android's advertised minimum + min_withdraw: 1_000_000, fee_basis_points: 10, // 0.1% seed_path: PathBuf::from("bridge_seed.json"), db_path: PathBuf::from("bridge_db.json"),