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.
| Step | Address balance | Rule | Result |
|---|---|---|---|
| Alice sends 6 USDT | 6 USDT | Below the 10 USDT sweep minimum | Funds remain at the address |
| Alice sends 94 USDT | 100 USDT | At least 10 USDT | Keeper deploys the proxy and sweeps |
| Sweep transaction | 0 USDT | Credit in the same transaction | Trading 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.