RupeeRail

Bridging India’s QR Payment network (UPI) with on chain stablecoins payments for humans & AI agents.

RupeeRail

Created At

ETHGlobal Mumbai

Winner of

Arc

Arc - Best Mobile Web Consumer Agent Using the Marketplace Discovery API

Project Description

RupeeRail lets anyone holding stablecoins pay any of the millions of UPI merchants in India by scanning their ordinary QR code. The payer never needs gas, an Indian bank account or knowledge of the chain, and the merchant receives rupees through UPI without ever touching crypto.

The payer scans a QR in the RupeeRail web app, sees the rupee amount, the merchant name and the stablecoin cost, and signs two messages in their wallet: a payment intent and a token permit. The RupeeRail paymaster submits them to an escrow vault on Arc (USDC) or Whitechain (USDT) and pays the gas. Once the vault locks the funds, RupeeRail pays the merchant in rupees over UPI within seconds.

The vault then holds the stablecoins through a dispute window in which the payer can object with a single signature, still paying no gas. Undisputed payments release automatically into a liquidity pool. A payment the operator never completes can be reclaimed by anyone back to the payer, and a dispute the arbiter leaves unresolved always refunds the payer, so the payer's protection lives in code rather than in the operator's goodwill.

The same pool also runs the other direction: users can buy stablecoins with rupees through Razorpay, and the vault pays them from the pool under an onchain daily cap. RupeeRail also lets software pay. In the RupeeRail Chrome extension a person creates long-lived AI agents, such as a Chef that knows their diet and delivery address, each with its own Circle smart wallet and budget. The person types a request like "something light for dinner", and the agent browses the store in their own browser, builds the order, selects UPI at checkout and pays the QR with no human step. Its budget is an onchain allowance to the vault, so neither a hostile web page nor the model itself can make it overspend, and the panel reports whether the merchant was actually paid. UPI details never go onchain: the vault only stores a salted hash of the QR.

How it's Made

The core is ScanPayVault, a Solidity escrow contract developed entirely in Arc Studio. Studio's agent wrote the contract from a description of the escrow, dispute rules and trust model, generated a Foundry suite of unit, fuzz, invariant and fork tests against the real Arc USDC and Whitechain USDT, ran a security review, applied its fixes (gasless relayed disputes and a dispute timeout that always refunds the payer) and deployed the Arc testnet vault from its own account.

The files were pulled into the repo with arc-studio pull, and a manifest of hashes proves the contracts are unedited Studio output. Studio also built a frontend feature in its sandbox: the EURC to USDC swap card, with its sizing logic and tests, previewed live inside Studio. The same bytecode is deployed on Whitechain Sepolia with viem and on Arc mainnet, funded by bridging USDC from Base with Circle CCTP v2 and the Circle Forwarding Service.

The vault uses OpenZeppelin's SignatureChecker, so both ordinary wallets and ERC-1271 smart accounts can sign the EIP-712 payment intent, which the backend's quote signer co-signs so nobody can choose their own exchange rate. The backend is Python with FastAPI, web3.py and SQLite: it prices quotes from the CoinDCX order book, relays every transaction as a paymaster after verifying signatures and simulating the call, listens for vault events, completes payments as the settler and runs keepers for the vault's permissionless release, reclaim and dispute-timeout functions. The web app is a React, Vite and MUI PWA that talks to wallets through plain EIP-1193 and EIP-6963 with no web3 library, and loads Circle Swap Kit only when a payer needs to swap EURC for USDC on Arc.

The onramp uses Razorpay payment links and webhooks, and the vault pays out only after the backend confirms the payment with Razorpay directly. The agents are a Chrome side-panel extension and a Python state machine: a vision model through an OpenAI-compatible API chooses page actions and clicks with real input through chrome.debugger, but code alone decides when checkout is reached and verifies the quote before the agent's Circle wallet signs through the Circle CLI.

Everything is served from one Azure VM behind Caddy.

background image mobile

Join the mailing list

Get the latest news and updates

RupeeRail | ETHGlobal