Tazor

USDT checkout on Whitechain: customers pay without gas, merchants refund, accountants export.

Tazor

Created At

ETHGlobal Mumbai

Project Description

Tazor is USDT checkout for businesses on Whitechain, told as one story: the customer pays without gas, the merchant refunds part of it, and the accountant gets the export.

  1. The customer pays without gas. A shop adds Tazor to its site in 15 lines: one script, one pay button and one event listener. The customer signs a single message (EIP-3009) from any wallet, or from a demo wallet inside the page, and holds no WBT. Tazor's relayer pays the gas. The signature commits to this merchant, this order and this amount, so nobody, including Tazor, can redirect or change it. It settles on Whitechain in about 4 seconds in the official USDT.
  2. The merchant refunds part of it. The merchant side is one more tag, <tazor-merchant-orders>. It shows orders read from Whitechain, one-click refunds and the CSV. A refund is one click and one signature from the merchant, also without gas. The contract sends a refund only to the customer who paid and never more than they paid. The customer can check it on a public receipt read from Whitechain.
  3. The accountant gets the export. Every payment and refund for the merchant comes straight from Whitechain, with dates, gross, refunds and net. It exports as CSV, plus Tally, Xero, QuickBooks and camt.054-style files. Because the ledger is the chain itself, the books can't disagree with the money.

Merchants get signed webhooks at each step (order.paid, order.ready, order.refunded, order.finality) and choose finality by amount. Small payments are ready to ship as soon as Whitechain confirms them. Big payments wait until Whitechain has posted them to Ethereum.

Also built and live on Whitechain Sepolia:

  • Subscriptions: permit-based pulls that can't run early or exceed the plan, cancellable by signature at any time. The relayer renews due ones on a daily schedule.
  • Pay from an exchange: every order has its own deposit address with an EIP-681 QR, so a plain transfer pays it and any overpayment is returned in the same transaction.
  • AI agents paying per request over x402 (eip155:1874), with a spend cap.
  • B2B invoices approved by WhiteBIT-verified people (WB Soul, simulated on testnet) using Face ID or fingerprint passkeys. Company roles live on ENSv2 and are proven onto Whitechain.
  • An Ethereum fallback: if Tazor's servers disappear, a signed payment still lands on Whitechain through the OptimismPortal (measured at 69 s).

Who it's for: Tazor serves businesses, and they serve their customers (B2B2C). A business starts in about a minute and gets a renews due ones on a daily schedule.

  • Pay from an exchange: every order has its own deposit address with an EIP-681 QR, so a plain transfer pays it and any overpayment is returned in the same transaction.
  • AI agents paying per request over x402 (eip155:1874), with a spend cap.
  • B2B invoices approved by WhiteBIT-verified people (WB Soul, simulated on testnet) using Face ID or fingerprint passkeys. Company roles live on ENSv2 and are proven onto Whitechain.
  • An Ethereum fallback: if Tazor's servers disappear, a signed payment still lands on Whitechain through the OptimismPortal (measured at 69 s).

Who it's for: Tazor serves businesses, and they serve their customers (B2B2C). A business starts in about a minute and gets snippet for its site, a hosted payment link and QR if it has no site, and its accountant export. The beachhead is cross-border SMEs, which today lose days and a 1–3% FX spread on every SWIFT payment. The first merchant is Healthsoft in India, a company I work with. It imports components from China and exports remote patient monitoring systems worldwide. Pricing is 0.5% per payment with gas included and no monthly fee.

Trust model: the contracts have no owner and no upgrade key, so Tazor can't take or redirect money. The relayer can only refuse to submit, and anyone can submit the same signed payment instead. Everything runs on Whitechain Sepolia with the official USDT, and the README links every transaction.

How it's Made

Contracts (Solidity 0.8.28, Foundry, OpenZeppelin 5.5), all source-verified on Whitechain's Blockscout:

  • TazorCheckout is built on the track USDT's EIP-3009 receiveWithAuthorization. The authorization's nonce is a hash of the merchant, order reference, amount and deadline, so a relayer can't redirect a signed payment.
    • We use receive... rather than transfer..., so only the checkout contract can submit it, which blocks front-running.
    • Refunds are merchant-signed 3009 authorizations. The contract forwards them only to the stored payer and caps the total at the amount paid.
    • Subscriptions take cycle 1 through 3009, then pull later cycles under an EIP-2612 permit. They can't be charged early or above the plan, and they cancel with an EIP-712 signature.
    • The contract publishes its signing domain through ERC-5267.
  • TazorDepositCheckout gives every order its own counterfactual deposit address, an EIP-1167 clone deployed with CREATE2.
    • A plain transfer from an exchange or a "send-only" wallet pays the order.
    • Anyone can settle it. The order amount goes to the merchant, and any extra goes back to the customer in the same transaction.
  • B2B layer:
    • OpenZeppelin ERC-7579 company accounts with a single PolicyHook.
    • ERC-1271 approver accounts that verify passkeys (WebAuthn) through an ERC-7913 verifier on Whitechain's P-256 precompile.
    • Payment and mandate modules that check WB Soul verification, the ENS role, an instant revocation list, two-approver thresholds and limits.
    • No owner key and no upgrade key anywhere.
  • Tests: 320+ Foundry tests. They include 20 fork tests against the real Whitechain Sepolia USDT that try the attacks: a redirected signature, a changed amount, double pay, over-refund, a forged refund, a stranger cancelling, changed plan terms. A Whitechain mainnet fork test impersonates WhiteBIT's operator to revoke a real WB Soul.

Relayer (Node and TypeScript with viem, on Vercel):

  • It's optional; anyone can submit the same signed payment.
  • It runs every check before spending gas: signature, payer balance, unused nonce, a validity window of at most 1 h, and an eth_call simulation.
  • It limits requests per IP, payer, merchant and order, and enforces a daily WBT budget and a balance floor.
  • It sends Stripe-style HMAC-signed webhooks (order.paid, order.ready, order.refunded, order.finality). Missed webhooks are rebuilt from chain logs and re-signed.
  • It runs a daily cron for subscription renewals.
  • It's also our own x402 facilitator for eip155:1874 (/supported, /verify, /settle).

SDK (@tazor/pay, viem):

  • Framework-free web components: <tazor-pay-button> and <tazor-merchant-orders>.
  • Order watching, EIP-681 payment QR codes, webhook verification and an x402 client.
  • The demo shop integrates it in 15 lines.
  • ERC-7730 clear-signing files describe every message a user signs. A test keeps them byte-identical to what the SDK signs.

App: a Next.js static export with no server code. The merchant console, receipts, a customer portal and reports all read Whitechain directly through the CORS-open Blockscout API.

Partner technologies:

  • Whitechain:
    • The official USDT's EIP-3009 and permit functions, with their bytes-signature versions that accept ERC-1271 smart-wallet signatures, make gasless pay and refund possible.
    • The P-256 precompile verifies Face ID passkeys on-chain for about 3.5k gas.
    • The L1Block predeploy and EIP-2935 let us prove ENSv2 roles from Ethereum onto Whitechain.
    • The OptimismPortal gives a fallback when Tazor's servers are down. A payment checked on Ethereum by our EnsGate contract landed on Whitechain in 69 s.
  • WB Soul: WhiteBIT's identity registry gates B2B approvers. It's simulated on testnet with a mirror that has the same interface.
  • ENSv2 (Sepolia): each company is a sub-registry such as acme.taz0r.eth, and its APPROVER, ADMIN and AGENT roles authorise payments.

Hacky bits:

  • USDT's signing domain: the track USDT exposes no version() or eip712Domain(). We recovered its EIP-712 domain ("Tether USD", "1", chain 1874) by brute-forcing it against DOMAIN_SEPARATOR().
  • Proving Sepolia blocks: Sepolia's Glamsterdam upgrade added two header fields. We patched Unruggable Gateways' RLP header encoder to append blockAccessListHash and slotNumber, which made Sepolia block hashes match and ENS storage proofs verify on Whitechain.
  • Whitechain RPC quirks: eth_getProof at latest fails on the testnet RPC, so we prove at a hex latest - 5. The RPC rejects decimal block numbers, and log queries are capped at 10k blocks, so we read in 9,000-block chunks.
  • Passkey signatures: about half of WebAuthn signatures are high-s, which OpenZeppelin rejects. We convert DER to low-s (r, s) in the browser, and 100 out of 100 signatures verified on the precompile.
  • Wallet warning: MetaMask's scanner flagged our Ethereum-fallback portal deposit, so we route that step through a public explorer's write-contract page instead.
background image mobile

Join the mailing list

Get the latest news and updates