PyPI

Decentralized bridge converting stablecoins to INR via UPI payments using Dutch auction pricing

Repo
PyPI banner

About

🎯 What This Project Does

ETH-FLOW BridgeOf PyUSD is a decentralized bridge protocol that enables users to convert blockchain stablecoins (like USDC, USDT, or PyUSD) directly into Indian Rupees (INR) through India's UPI (Unified Payments Interface) system. Think of it as a crypto-to-cash conversion service, but completely decentralized and automated.

The Core Problem It Solves

Traditional Challenge: Converting crypto to local fiat currency typically requires centralized exchanges, KYC processes, bank transfers, and high fees This Solution: Direct peer-to-peer conversion from stablecoins to INR via UPI payments, with fair pricing through Dutch auctions 🏗️ How The System Works The project uses a sophisticated three-party system:

1. Makers (Users wanting INR)

Hold stablecoins (USDC/PyUSD) and want Indian Rupees Create orders by scanning UPI QR codes or entering payment details Set price ranges for how much INR they want per stablecoin Their crypto gets locked in a smart contract as escrow 2. Resolvers (Payment Processors) Automated bots that have INR in bank accounts Monitor the system for profitable conversion opportunities Process actual UPI payments to users Earn money from the price spread and fees 3. Smart Contracts (The Trust Layer) Handle escrow of stablecoins Manage the Dutch auction process Ensure secure settlement between parties Deployed on Arbitrum Sepolia and Flow EVM testnets ⚖️ The Dutch Auction Mechanism This is where the project gets really clever: Example Transaction Flow: 1. User wants ₹1000 INR for their USDC 2. They set: Start Price = ₹85/USDC, End Price = ₹82/USDC 3. Auction starts at ₹85 and decreases over 5-10 seconds 4. Resolvers watch and wait for profitable price 5. First resolver to accept (say at ₹83/USDC) wins 6. Resolver pays ₹1000 to user's UPI 7. Resolver gets the USDC from the smart contract 8. Resolver profits from the spread

🛠️ Technical Architecture

The project is a full-stack DeFi application with multiple components:

Frontend (Next.js PWA)

Technology: Next.js 15, TypeScript, Tailwind CSS Features: QR code scanning for UPI payments Real-time auction monitoring Web3 wallet integration (RainbowKit/Wagmi) Mobile-first PWA design Live price charts and order tracking Backend (Node.js API) Technology: Express.js, MongoDB, Socket.IO Functions: REST API for order management Real-time WebSocket connections Dutch auction price calculation engine Order state management and monitoring

Smart Contracts (Solidity)

Main Contracts: OrderProtocol: Core logic for orders, auctions, and settlements MakerRegistry: Manages user registrations and UPI details ResolverRegistry: Handles resolver staking and authorization Security: OpenZeppelin standards, reentrancy protection, access controls Resolver Bots (Automated) Technology: Node.js with ethers.js Integration: RazorpayX API for UPI payments Functions: 24/7 monitoring of auctions Automated profitability calculations UPI payment processing Proof submission to smart contracts

💰 Economic Model

For Users (Makers) Get competitive exchange rates through auctions Direct UPI payments to their accounts No KYC or exchange account needed Transparent, smart contract-secured process For Resolvers Earn from price spreads (difference between acceptance price and market rate) Earn resolver fees Must stake 10 USDC as collateral Automated operation reduces manual work

User Order: 1000 USDC → ₹83,000 INR

Resolver accepts at ₹83/USDC = ₹83,000 Resolver pays user ₹83,000 via UPI Resolver receives 1000 USDC (worth ~₹84,000 at market rate) Resolver profit: ₹1,000 ($12) per transaction

🌐 Real-World Use Cases

Primary Users: Crypto investors in India who want to cash out without exchanges Freelancers/Remote workers receiving crypto payments DeFi users wanting quick fiat conversion Businesses accepting crypto but needing INR settlement Geographic Focus: Primary: India (UPI integration) Future: Expandable to other countries with digital payment systems 🚀 Current Status & Deployment Live Networks: Arbitrum Sepolia Testnet (primary deployment) Flow EVM Testnet (secondary deployment) Status: Fully functional testnet version Contract Addresses: OrderProtocol: 0xB39F0F6eD29B4502c199171E2d483fCe05E0f5b2 MakerRegistry: 0x40F05c21eE1ab02B1Ddc11D327253CEdeE5D7D55 ResolverRegistry: 0xAC49Bd1e5877EAB0529cB9E3beaAAAF3dF67DE9f

🔐 Security & Trust

Smart Contract Security: OpenZeppelin security patterns Comprehensive testing with Foundry Escrow mechanism prevents fraud Time-locked orders with dispute resolution Payment Security: RazorpayX integration (bank-grade security) Proof-based settlement system Multi-signature resolver authorization Real-time transaction monitoring 🎯 Innovation & Uniqueness What Makes This Special: First of its kind: Direct crypto-to-UPI bridge Dutch auction pricing: Fair market-driven rates Fully automated: Minimal human intervention needed Trustless: Smart contract-based escrow Mobile-first: PWA with QR scanning Real-time: Live auction monitoring

Technical Innovations:

Custom Dutch auction algorithm WebSocket-based real-time price discovery Automated UPI payment processing Cross-chain deployment ready PWA for mobile crypto payments 🚧 Current Limitations & Future Present Limitations: Testnet only (not mainnet ready) Manual resolver approval process Fixed INR conversion rates (no oracle integration) RazorpayX dependency (centralized payment processor) Planned Enhancements: Mainnet deployment on Arbitrum One Chainlink oracle integration for live rates Multi-currency support (EUR, GBP, etc.) Native mobile applications Cross-chain bridge expansion Decentralized governance token

🎯 Target Market & Impact

This project addresses the $100+ billion crypto-to-fiat conversion market in India, where:

UPI processes 10+ billion transactions monthly Crypto adoption is growing rapidly Traditional conversion methods are expensive/slow Regulatory clarity is improving Potential Impact:

Democratize crypto-to-fiat conversion

Reduce dependency on centralized exchanges Enable faster, cheaper INR settlements Create new income opportunities for resolvers Bridge traditional finance with DeFi

Prizes

  • Flow · Best Killer App on Flow · 2nd place

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.