shadowpaperDocsTrade ↗
Open AppTrade ↗
Under the hood

Deposits: CREATE2 proxy

Each wallet has a fixed deposit address, derived with CREATE2, whose only function is to forward USDT to the Exchange for that wallet.

Deposit address#

A user's deposit address is computed from the wallet address with CREATE2, using keccak256(wallet) as the salt. The address is known before any contract is deployed and never changes. The deposit page and the public API endpoint deposit-address both return it.

Proxy contract#

The deposit proxy is a minimal, non-upgradeable contract. It stores only two values, the owner wallet and the Exchange address, and supports two actions:

  • forward its entire USDT balance to the Exchange, credited to the owner wallet;
  • allow the owner wallet to recover any non-USDT token sent to the address by mistake.

Sweep#

A keeper monitors USDT transfers to deposit addresses. When an address holds at least 10 USDT, the keeper deploys the proxy (first deposit only) and sweeps the balance. In the same transaction the Exchange credits the user's trading balance and checks that its USDT holdings still cover every account.

Deployment and sweep are public functions. If the keeper is unavailable, the user or any third party can call them directly.

Example#

Alice's wallet maps to one deposit address. She sends USDT to it in two transfers.

StepAddress balanceRuleResult
Alice sends 6 USDT6 USDTBelow the 10 USDT sweep minimumFunds remain at the address
Alice sends 94 USDT100 USDTAt least 10 USDTKeeper deploys the proxy and sweeps
Sweep transaction0 USDTCredit in the same transactionTrading balance +100 USDT
6 USDT < 10 USDT          → no sweep
6 + 94 = 100 USDT ≥ 10    → sweep 100 USDT, credit 100 USDT

← Scroll sideways for long formulas

Deposits below the minimum are not lost; they are swept together with later transfers once the address balance reaches 10 USDT.

Design rationale#

The proxy design removes token approvals, two-step deposits and pending balances. USDT sent directly to the Exchange contract is not credited to any account and can only be recovered through the 24-hour timelock.

Warning
Send USDT (BEP-20) to the deposit address shown in the app. Do not send USDT directly to the Exchange contract.