Inspiration

P2P crypto trading has a trust problem: someone has to go first. Sellers risk sending crypto without getting paid. Buyers risk paying without receiving crypto. Bank receipts can be faked with photo editing. Existing platforms either hold your funds (risky) or use slow manual reviews.

We built APPEN to solve this using blockchain security + AI speed.

What it does

APPEN is a non-custodial P2P escrow platform that uses AI to verify payments instantly.

How it works:

  1. Seller creates offer and locks crypto in smart contract (Base Sepolia)
  2. Buyer accepts, sends fiat payment, uploads receipt
  3. AI (GPT-4o Vision) reads receipt and extracts: amount, date, transaction ID, bank details
  4. Risk engine calculates trust score (0-100) based on:
    • Amount match (35%)
    • Timestamp freshness (20%)
    • KYC tier (15%)
    • User reputation (20%)
    • AI confidence (10%)

Automated decisions:

  • Score ≥ 80: Instant release
  • Score 50-79: 30-minute challenge window
  • Score < 50: Human review

Key features:

  • No custody - funds stay in smart contract
  • KYC tiers with progressive limits ($500 → $50,000)
  • On-chain reputation system
  • Dispute resolution with 48-hour SLA
  • Real-time trade updates

How we built it

Smart Contracts:

  • Built with Solidity using OpenZeppelin libraries
  • 8-state trade lifecycle with safety checks
  • Deployed to Base Sepolia and Polygon Mumbai
  • Role-based access control for resolvers

Backend:

  • Next.js API routes with TypeScript
  • SIWE authentication with JWT sessions
  • Prisma + PostgreSQL for database
  • Redis for caching
  • OpenAI GPT-4o Vision for OCR
  • Risk scoring algorithm with fraud detection

Frontend:

  • Next.js 15 with App Router
  • Web3 integration (wagmi, viem, RainbowKit)
  • Tailwind CSS + Framer Motion animations
  • React Three Fiber for 3D landing page
  • Server-Sent Events for real-time updates

Demo Mode:

  • Works without testnet funds or API keys
  • Mocks blockchain calls and AI responses
  • Perfect for hackathon judging

Challenges we ran into

  1. OCR Accuracy: Bank receipts vary wildly by country and bank. We solved this by using GPT-4o Vision with confidence scores and routing uncertain cases to human review.

  2. Risk Scoring: Finding the right balance between false positives and false negatives. We tuned weights based on fraud prevention principles and added fraud flag detection.

  3. Smart Contract Complexity:Managing 8 states with proper access controls. We implemented strict state transitions, conflict-of-interest checks, and comprehensive testing.

  4. Real-time Updates: Used Server-Sent Events instead of WebSockets for simplicity while still providing live updates.

  5. Demo Mode: Built comprehensive mocks so judges can test without external dependencies

    Accomplishments that we're proud of

  6. Working full-stack app- complete frontend, backend, and smart contracts

  7. AI integration ready - GPT-4o Vision code implemented (works with API key)

  8. Smart risk scoring - 6-factor weighted algorithm with fraud detection

  9. Smart contract design - 8-state escrow with OpenZeppelin security patterns

  10. Database-based reputation- tracks user history and dispute rates

  11. Polished UX - animations, real-time updates, responsive design

    What we learned

    AI is production-ready - GPT-4o Vision handles OCR remarkably well with proper prompting

  12. Security is paramount - Use battle-tested libraries like OpenZeppelin

  13. State machines need care - Clear diagrams and strict validation prevent bugs

  14. Demo mode is essential - Makes projects accessible to judges

  15. UX matters - Technical excellence needs intuitive, delightful interfaces

  16. Blockchain + AI is powerful - Combining trustless execution with pattern recognition unlocks new possibilities

    What's next for Appen

    Short-term (3 months):

  17. Mainnet deployment with security audit

  18. Enhanced OCR for more languages and formats

  19. More payment rails (Venmo, PayPal, Zelle)

  20. Mobile app with camera integration

Medium-term (6-12 months):

  • Resolver staking with economic incentives
  • Multi-currency support (EUR, GBP, INR, NGN, KES, PHP)
  • Advanced fraud detection with ML
  • Governance token for community voting

Long-term (1-2 years):

  • Cross-chain support (Ethereum, Arbitrum, Optimism)
  • Institutional features (OTC desk, API, white-label)
  • Global expansion with local payment partners
  • Open-source ecosystem (SDK, plugins, reputation API)

Vision: Make APPEN the trust layer for the global P2P economy. Anyone can trade with anyone, anywhere, without needing to trust them personally.

Built With

  • aws-s3-sdk
  • docker-compose
  • framer-motion
  • gpt-4o-mini)
  • hardhat
  • jose-(jwt)
  • next.js-15
  • openai-api-(gpt-4o
  • openzeppelin-contracts
  • postgresql
  • prisma-orm
  • rainbowkit
  • react-19
  • react-three-fiber
  • recharts
  • redis
  • siwe
  • solidity
  • tailwind-css
  • typechain
  • typescript
  • viem
  • wagmi-v2
Share this project:

Updates