Uniform

Checkout where customers pay from any chain and merchants always get USDT on Whitechain.

Uniform

Created At

ETHGlobal Mumbai

Project Description

Uniform is a stablecoin checkout for businesses on Whitechain. A merchant adds one script to their site and always gets paid in USDT on Whitechain. The customer pays with whatever they already hold, on the chain they already use.

There are three ways to pay:

Direct: the customer has USDT on Whitechain. They sign one message and the USDT goes straight to the merchant. They pay no gas. Cross-chain: the customer pays USDC, EURC or ETH on Base Sepolia or Ethereum Sepolia. Their tokens are locked on their chain. A liquidity provider pays the merchant USDT on Whitechain. One secret then completes both sides. This is an atomic swap: either both sides happen, or the customer gets their exact tokens back. Split: part from each chain, all or nothing. Nobody in the middle can take the money. Every lock waits for the same secret, and every lock has a time limit after which it refunds.

Merchants get a dashboard with receipts, refunds, signed webhooks and CSV export. Anyone can become a liquidity provider on the Earn page. They set their own fee, and each payment goes to the cheapest provider who can cover it. Their USDT stays in their own wallet until a payment uses it.

How it's Made

Contracts (Solidity, Foundry):

DirectPay: gasless USDT payments using EIP-3009 receiveWithAuthorization. The authorization's nonce commits to the order, merchant, amount and payer, so no one can redirect or resize a payment. SourceLock: holds the customer's tokens on Base or Ethereum Sepolia under a hashlock and an expiry. It never swaps, so a failed payment refunds the same token with no swap fee. The provider swaps to USDC on Uniswap only after a payment succeeds. DestinationLock: holds the provider's USDT for the merchant on Whitechain. It uses the same hashlock with an earlier expiry, so the provider always has time to collect. PayoutPool: a 1inch Aqua app. Providers "ship" a strategy that gives an allowance instead of depositing funds. A fill pulls USDT from the provider's wallet straight into a DestinationLock. The strategy hash fixes who may fill and the per-order cap. Server (Rust, axum, sqlx, Postgres):

Order Desk: the API. It creates orders, quotes cross-chain payments and picks the cheapest provider. Relayer: submits the customer's signed messages and pays the gas, within a daily gas budget per merchant. Notifier: sends webhooks signed with HMAC-SHA256. Matchmaker: watches all chains. It fills locks for providers and collects their tokens after a payment. Web (Next.js, Privy, viem):

A pay page and an embeddable widget, a merchant dashboard, receipts and the Earn page. Privy gives customers an embedded wallet behind an email login. Partner tech:

Whitechain: the settlement chain. Every merchant is paid there. 1inch Aqua: lets providers lend liquidity without giving up custody. Uniswap: converts what providers collect into USDC. Notable hacks:

The swap secret is derived from the customer's own EIP-712 signature: it's the keccak256 of that signature. The customer can rebuild it at any time, so it is never stored. Each DestinationLock id includes the provider's address, so a stranger can't block a provider's fill by opening a lock first. The pay page checks every message against the known contract addresses before asking the customer to sign.

background image mobile

Join the mailing list

Get the latest news and updates