ChainCred

Gasless USDT checkout for small shops, with loyalty points that work across every shop.

ChainCred

Created At

ETHGlobal Mumbai

Project Description

ChainCred is a USDT checkout and shared loyalty network for small** businesses, built on Whitechain.

The problem: card payments cost shops about 2–3% per sale, and each shop’s loyalty programme stays locked inside that one shop. Paying with crypto is worse for customers, because they need gas tokens just to make a payment.

How payments work: a customer pays in USDT with one wallet signature. ChainCred submits the transaction and pays the network fee, so the customer never needs WBT for gas. The money settles onchain straight into the merchant’s own wallet, and ChainCred never holds funds. Each payment gets a verifiable receipt on Whitechain. ChainCred charges 1% per sale with a 0.05 USDT minimum, which is less than half of a typical card fee. Refunds, subscriptions and installment plans are also supported onchain.

Universal loyalty points: customers earn points at any ChainCred shop and can spend them at any other. Merchants run their own campaigns from a no-code console. Earn campaigns give points for spending, for example “10 points for every 100 USDT” or “50 bonus points on orders over 500 USDT”. Spend offers let customers use points for discounts, for example “100 points for 5 USDT off” or “15% off”. Each campaign can have a budget, dates, a minimum order and a per-customer limit. Points are recorded on Arkiv, with automatic expiry and per-shop ownership, so no shop can edit another shop’s points. Refunds reverse the points automatically.

For merchants: signing up takes about two minutes and one wallet signature, and the shop is registered onchain. After that, connecting the wallet opens the merchant console, with no passwords or API keys. From the console, merchants create invoices, manage campaigns and see how points bring in new customers. New shops appear in a public shop directory.

For developers: one command (npx usepaykit init) sets up the SDK and configures AI coding agents such as Claude Code and Cursor. There are also React checkout components, a Node SDK, signed webhooks and an MCP server for agents.

For customers: an installable mobile wallet app (PWA and Android APK) with QR scanning, fingerprint or face unlock, and one place to see every invoice, receipt and point balance across shops.

Who we start with: small and artistic businesses such as cafés, bookshops and makers, because their communities are close-knit. Every shop that joins brings its customers to all the others. Our two demo stores, a tea house and a bookshop, show this today: points earned at one can be spent at the other.

How it's Made

ChainCred is a gasless USDT checkout solution for online shops on Whitechain, with a shared loyalty points system that works across every participating shop.

We built our smart contracts using Solidity, Hardhat and OpenZeppelin, and verified them on the Whitechain explorer. Our PaymentRouterV2 contract handles the entire payment process in a single transaction. It transfers the buyer's USDT directly to the merchant's wallet, sends a 1% fee to FeeTreasury and applies any available loyalty points discount. Each merchant signs their price quotes using EIP-712, ensuring that payment amounts cannot be modified after issuance. Buyers approve payments through MetaMask, while our relayer handles transaction execution and gas fees, eliminating the need for buyers to hold native tokens. MerchantRegistry stores merchant payout wallets and signing keys. Refunds and subscriptions also use the same signed-terms mechanism.

Our backend is built with Node.js, Express, ethers v6 and Neon PostgreSQL, and is deployed on Vercel. It handles invoice creation, payment quotes and relayer operations. A blockchain watcher monitors router events and converts them into payment receipts, invoice updates and signed webhooks for merchants. API keys and webhook secrets are encrypted in the database.

We use Arkiv to power our cross-merchant loyalty points system. Each batch of points is owned by the merchant that issued it and signed using the merchant's registered Whitechain signing key, making its origin independently verifiable. Points automatically expire after 180 days through Arkiv's built-in expiry mechanism. Its indexed queries allow us to quickly retrieve wallet balances and rewards that customers can afford. The wallet page reads loyalty points directly from Arkiv and displays their expiry dates.

The frontend is built using React and Vite and is also available as a Progressive Web App (PWA). It includes a customer wallet, shop listings and a merchant console. Our two demo stores integrate checkout directly into their websites through the ChainCred SDK, allowing customers to complete payments without leaving the shop. The SDK is published on npm and can be installed using a single command. It also provides an AGENTS.md file and an MCP server, allowing AI coding agents to integrate checkout with a single prompt.

To keep checkout fast, we use PostgreSQL as the primary operational database and synchronise changes to Arkiv through a background outbox system. This avoids making customers wait for blockchain data writes during checkout. The wallet page compares the database records with Arkiv to verify consistency. We also validate every loyalty points record against the merchant's registered signing key on Whitechain, preventing unauthorised or fake points from being accepted.

Loyalty discounts are applied within the same Whitechain transaction as the payment, ensuring that points cannot be spent without the corresponding payment succeeding. Arkiv queries also have a six-second timeout and fallback mechanism to keep the application responsive during network delays. Finally, the landing page and application run under a single domain, with existing payment links retaining their details when redirected.

background image mobile

Join the mailing list

Get the latest news and updates