TTT Architecture
Beta. These docs describe an active work-in-progress and will be revised as the system evolves.
TheTrueTrade Web3 is a non-custodial perpetual exchange. Your wallet stays in your control at all times. All collateral lives in an on-chain vault contract; the platform itself never holds your keys or funds.
The design pairs an off-chain matching engine (for speed) with on-chain settlement (for safety). Every trade is authorized by a wallet signature, and every withdrawal is gated by three independent signatures.
The platform currently runs on Arbitrum, with an active testnet on Arbitrum Sepolia. The exact vault address, chain IDs, and signing payloads are in the Technical Reference.
The three actors
- Your wallet — authorizes every action. It signs deposits, withdrawals, and the one-time login that provisions a trading session. It is the only thing that can move funds.
- The vault contract — on-chain custody and settlement. It holds collateral, processes deposits and withdrawals, and settles PnL. Neither the platform nor the matching engine can move funds out of it without your signature.
- The matching engine — an off-chain orderbook and risk engine that matches orders quickly. It never touches funds and holds no signing key on your behalf.
The matching engine and the vault talk to each other to settle PnL, but neither can move your funds without your signature.
Core ideas
- Wallet → vault. Deposits flow directly from your wallet into the on-chain vault. The platform cannot intercept them.
- Signed trades. Every order, cancel, and TP/SL update is signed before it reaches the matching engine.
- Multi-party withdrawals. Releasing funds from the vault requires three independent signatures — yours, the trade system's, and an external proofer validator's.
- Off-chain matching, on-chain settlement. The orderbook is off-chain for speed; balances and PnL settle into the vault on-chain.
High-level flow
- Connect a wallet through social login (Privy), MetaMask, or WalletConnect.
- Authorize in a single typed-data signature — this also provisions a short-lived delegated session signer.
- Deposit collateral into the vault.
- Trade with the delegated signer — no extra wallet popup per click.
- Withdraw when ready — the vault releases funds once all three required proofs are collected.
Continue with the Smart Contract Addresses and the Technical Reference.