Files
pezkuwi-sdk/tools/usdt-bridge/Cargo.toml
T
Satoshi Qazi Muhammed 45e4b26068 feat(usdt-bridge): migrate custody from single hot key to 3-of-5 multisig
The single-key custodial model (see prior commit's own doc comment:
"Custodial: A single keypair controls both sides") was replaced with
a 3-of-5 multisig spanning the Serok/SerokiMeclise/Xezinedar/Berdevk/
Noter tiki role-holders (full record in res/validators-tiki.md,
outside this repo). Discovered along the way: wUSDT's ~100M supply
had zero real USDT backing on Polkadot Asset Hub - Treasury_1 (the
actual asset owner, not the seed_path wallet this tool assumed) held
0 USDT/DOT there, with ~99M of the 100M supply sitting undistributed
in Treasury_1's own account. Migrated Pezkuwi Asset Hub custody in one
atomic batch (transfer 1M wUSDT to the multisig, set_team, then
transfer_ownership last) signed by Treasury_1 - tx
0xd5dc550c5cf04f323e5c1d9c13f2056acafc9f56404c657b9743c15ff3a3aacb,
verified on-chain.

listen_deposits/listen_withdrawals no longer sign and submit
mint/burn/transfer - no key this process holds has authority over the
multisig account. They now only detect on-chain events and record
status=pending_multisig_approval with the exact call parameters an
operator needs; actual approval happens through pwap-web's existing
multisig UI (shared/lib/multisig.ts, shared/lib/usdt.ts), not this
relayer. BridgeConfig gained custody_multisig_polkadot/_pezkuwi
fields.

Added pezkuwi-subxt/pezkuwi-subxt-signer alongside the existing
vanilla subxt dependency: vanilla subxt's codegen hardcodes the
`sp_runtime` module path and its default signed-extension handling
produced "bad signature" on submission against this chain's actual
metadata - pezkuwi-subxt (following vendor/pezkuwi-subxt's own
grant_noter_tiki.rs example: PezkuwiConfig, XCM v3, sudo_unchecked_weight)
is what actually signs and submits successfully. Also used to grant
the Xezinedar and Berdevk tiki roles (previously missing signatories
for the multisig) to two validators via a relay-chain sudo XCM Transact,
since the People chain has no local Sudo pallet.
2026-07-13 16:59:20 -07:00

63 lines
1.5 KiB
TOML

[workspace]
[package]
name = "usdt-bridge"
version = "0.1.0"
edition = "2021"
description = "Custodial USDT Bridge: Polkadot Asset Hub <-> Pezkuwi Asset Hub (USDT.p)"
authors = ["Dijital Kurdistan Tech Institute"]
license = "Apache-2.0"
[[bin]]
name = "usdt-bridge"
path = "src/main.rs"
[dependencies]
# Async runtime
tokio = { version = "1.36", features = ["full"] }
# Subxt for blockchain interaction
subxt = { version = "0.38" }
subxt-signer = { version = "0.38", features = ["sr25519", "subxt"] }
# Pezkuwi's own subxt fork - required for signing/submitting real transactions against
# Pezkuwi chains (vanilla subxt's default extrinsic params don't match this chain's actual
# signed-extension/hasher setup and produce "bad signature" errors on submission).
pezkuwi-subxt = "0.44.0"
pezkuwi-subxt-signer = { version = "0.44.0", features = ["sr25519"] }
# Crypto
sp-core = { version = "34.0.0", default-features = false }
sp-keyring = { version = "39.0.0" }
sp-runtime = { version = "39.0.5", default-features = false }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# CLI
clap = { version = "4.4", features = ["derive"] }
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Hex encoding
hex = "0.4"
# BIP39 mnemonic
bip39 = "2.0"
# Date/time
chrono = { version = "0.4", features = ["serde"] }
# Async streams
futures = "0.3"
# Error handling
anyhow = "1.0"
thiserror = "1.0"
# Simple file-based storage (no native compilation needed)
# Database tracking via JSON files for simplicity