Fira - Decentralized Freelance Contract Platform

Inspiration

One of the main challenges in freelance work is the lack of trust and transparency between clients and developers. Traditional platforms charge high fees, offer limited verification of work completion, and provide no automated dispute resolution. We wanted to create a trustless, AI-verified system where payments are automatically released upon milestone completion, with blockchain escrow ensuring security for both parties.

What it does

Fira is an AI-powered freelance contract platform that combines blockchain escrow with intelligent verification agents. Developers create contracts linked to GitHub repositories, break them into milestones, and receive SOL payments automatically when work is verified complete. Our multi-agent AI system reviews code changes, tests functionality, and provides verifiable proof of completion through screenshots and code analysis. Payments are held in Solana escrow and released programmatically with on-chain transaction records.

How we built it

Frontend Architecture

We built a modern React/Next.js frontend with TypeScript for type safety across our contract, milestone, and payment schemas. The UI features real-time GitHub issue synchronization, interactive milestone tracking, and seamless Solana wallet integration for viewing on-chain payment transactions.

Backend Infrastructure

Our FastAPI backend serves as the orchestration layer, handling:

  • GitHub webhook integration for automatic issue tracking
  • Supabase database for contract and milestone state management
  • Solana blockchain integration for escrow wallet management and payment execution
  • RESTful API endpoints for all frontend operations

AI Verification System

The core innovation is our dual-agent verification pipeline:

1. Parallel Issue Verification (Gemini)

  • Multiple Gemini agents spawn in parallel, each verifying individual GitHub issues
  • Agents use browser automation to autonomously navigate GitHub, inspect pull requests, and review code changes
  • Navigate through the live project using headless browsers to test functionality and interact with running applications
  • Execute code, run tests, and capture screenshots of actual behavior
  • Each verification produces evidence-backed claims with visual citations
  • Screenshots serve as immutable proof for multimodal reasoning, showing real browser interactions and GitHub UI

2. Meta-Verification Layer (Claude)

  • A Claude Opus agent reviews all Gemini decisions and evidence
  • Can selectively override individual issue approvals if reasoning is insufficient
  • Ensures high-confidence verification before milestone completion

Solana Payment Integration

  • Server-side escrow wallet with private key management
  • Memo-based transaction proof linking milestone_id + report_id
  • Devnet deployment with Solana Explorer integration for transaction transparency

ML Risk Engine

Our Bayesian risk pricing model treats freelance contracts as binary options, calculating fair market value based on:

  • Historical completion rates
  • Developer reputation metrics
  • Project complexity signals
  • Timeline risk factors

Challenges we ran into

Synchronizing state across six independent systems was the primary challenge. Our frontend, backend API, Supabase database, GitHub webhooks, ML model, and AI agents all needed to maintain the exact same source of truth. We implemented careful schema validation and event-driven updates to ensure consistency.

Time pressure was extreme - by the time we finished integrating the blockchain payment system with the AI verification pipeline, we had only hours left for testing and deployment. We had to prioritize ruthlessly and cut several planned features.

Accomplishments that we're proud of

  • Bayesian Risk Engine: A novel ML model that prices freelance contracts as binary options, providing fair market valuations based on completion probability
  • Multi-Agent Verification: Successfully coordinating parallel AI agents with a meta-verifier to achieve high-confidence automated code review
  • Full Solana Integration: Server-controlled escrow with memo-based proof and on-chain transaction records
  • Real-time GitHub Sync: Bidirectional synchronization between GitHub issues and our milestone tracking system

What we learned

Building a trustless verification system requires multiple layers of validation. A single AI agent, no matter how powerful, can miss edge cases or hallucinate completion. Our dual-layer approach with evidence requirements and meta-verification significantly improved accuracy.

Blockchain integration is simpler when you control the escrow wallet server-side rather than requiring client-side wallet signatures. This improved UX while maintaining security through backend key management.

The Bayesian approach to contract pricing revealed that freelance work can be modeled as derivatives - the contract value equals the expected payout discounted by completion risk, exactly like a binary option.

What's next for Fira

  • Mainnet Deployment: Move from Solana devnet to mainnet with production escrow wallets
  • Multi-Chain Support: Expand beyond Solana to Ethereum, Base, and other L2s
  • Reputation System: Build developer reputation scores based on verified completion history
  • Dispute Resolution: Add human-in-the-loop arbitration for contested verifications
  • Freelancer DAO: Token-gated governance for platform fee distribution and feature prioritization
  • Integration Marketplace: Support for Jira, Linear, GitLab beyond just GitHub

Built With

Share this project:

Updates