ADDRESS CHECK

Checking a deposit address

A seller sends USDT to an address the platform shows. No contract exists there before activation: the address is derived from the trade's terms, and only the escrow for exactly those terms can ever be created at it. You can check this before depositing, using the chain instead of trusting us.

The data

WhatFrom where
Deposit addressThe trade page (escrow address).
Packed terms: six 32-byte words, 0x hexThe trade page. The terms exactly as the contracts take them.
Terms hashThe trade page: keccak256 of the six words, the CREATE2 salt.
Amounts, deadlinesThe trade page: deposit, fee, refund fee, funding deadline, pay window (amounts in 6 decimals).
Factory, implementation, init code hashThe table below. Fixed: the factory accepts its implementation once and has no upgrade path.
Arbiter, fee receiverIn the terms themselves (step 3).

Contract deployment

This environment's contracts, as the API returns them.

Loading…

Nothing in the terms is secret

sellerKey and buyerKey are 20-byte key addresses, not keys. Activation publishes the whole of the terms on chain anyway (the Initialized event, and the calldata of every escrow call).

How to check (Tronscan)

1. The factory runs the expected implementation

Open the factory on Tronscan → Contract → Read Contract: implementation() and initCodeHash() must be the values in the table above.

2. The deposit address belongs to these terms

Same page: predictAddress(t), with the six packed words as t (a JSON array: ["0x…","0x…",…]). The result must be the deposit address on the trade page. Tronscan shows it as a T… address or as 20-byte hex; the offline script converts either way.

3. The terms say what was agreed

Open the implementation (TradeEscrow) → Read Contract → unpack(t) with the same six words. It returns the terms in readable form:

FieldCheck
buyerPayoutThe buyer's payout address on the trade page.
sellerRefundThe seller's refund address on the trade page.
sellerKey, buyerKeyYours is the key address of the signing key you chose for the trade (keys page).
amountThe deposit amount.
feeThe trade fee; the buyer receives amount − fee.
refundFeeBps, refundFeeFixed0 and the refund fee (kept only if the deposit is short, the trade is activated late, or the arbiter refunds the seller with the fee).
payWindowThe pay window in seconds.
fundingDeadlineThe funding deadline, as unix seconds.
excessMinAt release, an overpayment of at least this goes back to sellerRefund, a smaller one to feeReceiver with the fee.
arbiterThe platform's arbiter for this trade. The only thing it can do: end a Paid or Disputed trade, either to buyerPayout (with or without fee) or to sellerRefund (with or without refundFeeFixed).
feeReceiverWhere fees go: at most fee when the buyer is paid (with an overpayment under excessMin), at most refundFeeFixed when the seller is refunded with a fee; never more.

The contract has no function that takes a destination or an amount: whatever happens, the money can only reach buyerPayout, sellerRefund, or at most the agreed fee (plus an overpayment under excessMin) at feeReceiver.

Some views show addresses as 20-byte hex; the script below converts them.

If any check fails: do not deposit, and contact support. Contact →

Without Tronscan: offline

Steps 2 and 3 with no node at all. You need Node.js and npm install ethers@6. Save the script as verify.mjs, fill in the four values and run node verify.mjs.

import { concat, dataSlice, decodeBase58, encodeBase58, keccak256, sha256, toBeHex } from "ethers";

// From the trade (GET /trades/{id}, the `terms` object):
const packedTerms = ["0x…", "0x…", "0x…", "0x…", "0x…", "0x…"];
const shownAddress = "T…";
// From the contracts table:
const factory = "T…";
const initCodeHash = "0x…";

// T-address <-> 20 bytes: Base58Check of 0x41 ++ address ++ 4-byte checksum.
const hex20 = (t) => dataSlice(toBeHex(decodeBase58(t), 25), 1, 21);
const toBase58 = (h20) => {
  const payload = concat(["0x41", h20]);
  return encodeBase58(concat([payload, dataSlice(sha256(sha256(payload)), 0, 4)]));
};

// The deposit address: TRON CREATE2 (0x41 where Ethereum uses 0xff).
const salt = keccak256(concat(packedTerms)); // = terms.terms_hash
const escrow = toBase58(dataSlice(keccak256(concat(["0x41", hex20(factory), salt, initCodeHash])), 12));
console.log("terms hash:", salt);
console.log("computed  :", escrow);
console.log(escrow === shownAddress ? "MATCH" : "MISMATCH: do not deposit");

// What the terms say (same layout as TradeEscrow.unpack).
const w = packedTerms.map(BigInt);
const bits = (x, shift, n) => (x >> BigInt(shift)) & ((1n << BigInt(n)) - 1n);
const key = (x) => toBeHex(bits(x, 0, 160), 20);
console.log({
  tradeId: toBeHex(bits(w[3], 160, 96), 12),
  sellerKey: key(w[0]),
  buyerKey: key(w[1]),
  buyerPayout: toBase58(key(w[2])),
  sellerRefund: toBase58(key(w[3])),
  arbiter: toBase58(key(w[4])),
  feeReceiver: toBase58(key(w[5])),
  amount: bits(w[0], 160, 64).toString(),
  fee: bits(w[1], 160, 64).toString(),
  refundFeeFixed: bits(w[2], 160, 64).toString(),
  refundFeeBps: Number(bits(w[2], 224, 16)),
  payWindowSec: Number(bits(w[0], 224, 32)),
  fundingDeadline: new Date(Number(bits(w[1], 224, 32)) * 1000).toISOString(),
  // At release an overpayment of at least this goes back to the seller, a smaller one to
  // the fee receiver with the fee.
  excessMin: bits(w[4], 160, 64).toString(),
});

Worked example: a real mainnet trade

Lab trade M1, escrow TYZeQT7E8QKWgftia8obaWyeCHdTB2abCu on mainnet. Use it to try the steps and the script (with the mainnet factory and init code hash).

[
 "0x00000e1000000000009896806d780282fc9d0668e4f3b97d01e87024010bc062",
 "0x6ad09f2800000000003e8fa045cea6936004e48b591a7071338f505fc49ee3f3",
 "0x0000006400000000003d0900907f09e8dae3d6239cc2a322299ee6085589b8b9",
 "0x7619b0a72a694a457271066d253f1b66232937fb4450f687709308c2bcd7768a",
 "0x000000000000000000000000c198c33919888ccaf95745c071e8b4de1961c713",
 "0x000000000000000000000000c198c33919888ccaf95745c071e8b4de1961c713"
]

Expected: terms hash 0xe48e8e222792b893c63dd13df530471e04b715ffb176bea7e7d8117e8b1248fb; the script, the factory's predictAddress and the backend all give TYZeQT7E8QKWgftia8obaWyeCHdTB2abCu; unpack gives buyer payout TP9EVVC1hJvFdv5Gdsdsz4muaCATEKKdEp, seller refund TDN9buiyr23Bd6JhpMXct63KS7oxhWhCZx, amount 10 USDT, fee 4.10 USDT. (This lab trade predates the fixed refund fee, hence refundFeeBps 100.)