Inspiration

Freelancers lose $71 billion annually to payment disputes. Traditional escrow services charge 5-20% fees and take days to process. We saw an opportunity to use blockchain and AI to create instant, trustless payments at just 1% fees.

What it does

PayFlow lets freelancers generate professional invoices in 30 seconds using AI (just describe your project in plain English). Clients pay into a smart contract escrow using MNEE stablecoin. Funds are locked until work is approved, then released instantly—99% to freelancer, 1% platform fee.

How we built it

  • Frontend: React 19 + TypeScript + Vite + RainbowKit for wallet connection
  • Backend: Node.js + Express + Prisma ORM + PostgreSQL (Neon)
  • Blockchain: Solidity smart contracts on Ethereum Sepolia, using MNEE ERC20 token
  • AI: Google Gemini for natural language invoice generation
  • Security: OpenZeppelin contracts, SIWE authentication, Zod validation

Challenges we ran into

  • Synchronizing blockchain state with database (solved with two-phase commit)
  • Preventing invoice ID mismatches between chain and database
  • Rate limiting issues during rapid development testing
  • Wallet connection edge cases across different browsers

Accomplishments that we're proud of

  • Full end-to-end payment flow working on Sepolia testnet
  • AI generates structured invoices from plain English in under 3 seconds
  • Smart contract verified on Etherscan with zero security warnings
  • 1% fee vs 20% industry standard—passing savings to users

What we learned

  • Wagmi v3 + Viem is significantly better than ethers.js for React apps
  • Always verify blockchain transactions before updating database
  • Structured AI outputs (JSON schema) prevent hallucinations
  • User experience matters as much as technical implementation

What's next for PayFlow

  • Mainnet deployment with real MNEE tokens
  • Multi-chain support (Arbitrum, Base) for lower gas fees
  • Dispute resolution via Kleros decentralized arbitration
  • Mobile app for on-the-go invoice management
  • Recurring invoice templates

Built With

Share this project:

Updates