WhiteFinance

WhiteFinance: prize-USDT checkout, invoice financing & gasless payments on Whitechain.

WhiteFinance

Created At

ETHGlobal Mumbai

Project Description

WhiteFinance is business finance on Whitechain Sepolia: merchants take prize USDT payments, sellers and buyers finance invoices onchain, and customers can pay gaslessly with EIP-3009.

Operate: A registered merchant creates a payment intent on PaymentProcessor. The customer opens hosted checkout, pays with wallet gas (approve + pay) or signs an exact USDT authorization for the relayer. Settlement and refunds are onchain events—status is SETTLED only after chain/API verification, never from UI optimism or localStorage.

Tokenize: Sellers create invoices; buyers confirm them. Seller financing advances face-minus-discount to the seller; the buyer later repays face to the investor. Buyer financing lets an investor pay part of the invoice to the seller; the buyer owes principal + fee to the investor and still owes the remainder to the seller—no double-counting.

Scale: EIP-3009 receiveWithAuthorization via a separate relayer that holds WBT and never the customer key. Email/social embedded wallets stay off (unsupported on Whitechain). Only prize USDT 0xcedfB561…55a7—never USDT.e.

Built for Whitechain’s Operate / Tokenize / Scale tracks as real USDT settlement rails, not a demo transfer button.

https://www.loom.com/share/f9a3cc4e0b9f4e5c91ad40ea2ee5f133

How it's Made

Contracts (Foundry): BusinessRegistry, PaymentProcessor, InvoiceRegistry, SellerFinancing, BuyerFinancing, EscrowVault on Whitechain Sepolia (chain id 1874), wired only to prize USDT.

Backend: Next.js App Router API routes—no database. Chain is source of truth: intent/invoice/financing reads, prepared calldata, payment verify, bounded event scans, webhook HMAC helpers.

Relayer: Separate Node worker (apps/relayer) with RELAYER_PRIVATE_KEY. Quotes exact EIP-712 ReceiveWithAuthorization, submits settleWithAuthorization, rate limits / pause / amount caps. Next.js proxies quote/submit and never holds the gas key. Gasless never silently falls back to gasful.

Frontend: Next.js 14, Tailwind/shadcn, wagmi + viem + Reown AppKit (whitechainSepolia, email/social disabled). Live merchant checkout, refunds, invoices, and financing flows; SonarGrid landing with Whitechain-style sky-blue theme. Deployed on Vercel (apps/web).

Partner stack: Whitechain RPC/explorer/faucet (WBT), prize USDT EIP-3009, Reown for wallet connect on 1874.

Notable: Intent IDs from onchain events only; soft ≠ final confirmation; USDT.e hard-blocked; accounting helpers keep factoring/buyer-financing invariants honest.

background image mobile

Join the mailing list

Get the latest news and updates