๐Ÿ’ก Inspiration

The gig economy is broken. Freelancers lose sleep worrying if they'll actually get paid, while clients hesitate to fund upfront without seeing results. Traditional platforms like Upwork or Fiverr fix this but charge extortionate fees (up to 20%) and act as centralized gatekeepers.

We wanted to build the financial infrastructure that makes "Code = Money" a literal reality. We were inspired by the idea of Programmable Moneyโ€”where a stablecoin (MNEE) doesn't just sit in a wallet but reacts to real-world events. If the code is merged, the money should move. No emails, no invoices, no middlemen.

โš™๏ธ What it does

Trustless Gig Escrow is a decentralized financial automation platform that links GitHub activity directly to blockchain payments.

  1. The Agreement: A client creates a "Gig" by locking MNEE (a USD-backed stablecoin) into a smart contract. This creates an on-chain bounty linked to a specific GitHub Repository and Pull Request ID.
  2. The Work: The freelancer writes code and opens a Pull Request on GitHub.
  3. The Trigger: Once the repository maintainer merges the PR, the "Verify" function can be called.
  4. The Payout: Our smart contract uses Chainlink Functions to query the GitHub API. It cryptographically verifies that the PR is merged and instantly releases the MNEE to the freelancer.

It is a completely closed loop: The client cannot "un-fund" the gig once work is verified, and the freelancer cannot claim funds without shipping code.

๐Ÿ”ง How we built it

We architected the system to be modular, secure, and mainnet-ready.

  • Smart Contracts (Foundry): We built the core GigEscrow.sol using Foundry. It features a "Commit-Reveal" style pattern where funds are locked via transferFrom and released via Oracle callbacks. We implemented a 24-hour safety lock to protect freelancers from malicious cancellations.
  • The Oracle (Chainlink Functions): This was the hardest part. We wrote a custom JavaScript source code that runs on the Chainlink Decentralized Oracle Network (DON). It fetches the live status of a GitHub PR, ensuring we don't rely on centralized backends.
  • The Token (MNEE): We optimized the contract for the MNEE Stablecoin, leveraging its ERC-20 standard compliance. For the hackathon, we deployed a custom MockMNEE on Sepolia to simulate the full payment flow.
  • Frontend (Next.js & Framer Motion): We ditched the boring "SaaS look" for a Cyberpunk/Terminal aesthetic. We used Wagmi and Viem for blockchain interactions and built a custom "Terminal Logger" component that visualizes every step of the transaction (Approval -> Deposit -> Oracle Request -> Payout) in real-time.

๐Ÿš€ Mainnet Deployment Guide

For this hackathon submission, we used a Mock MNEE Token on Sepolia Testnet to simulate the payment flow.

To deploy this project on Ethereum Mainnet using the official MNEE Stablecoin, follow these simple steps:

  1. Locate the Official MNEE Contract: The official MNEE token address on Ethereum Mainnet is: 0x8ccedbae4916b79da7f3f612efb2eb93a2bfd6cf
  2. Update Configuration: Modify your .env file to point to the live Mainnet address instead of the Mock address: bash # .env MNEE_TOKEN_ADDRESS=0x8ccedbae4916b79da7f3f612efb2eb93a2bfd6cf

๐Ÿšง Challenges we ran into

  • The Async Oracle Problem: Blockchain transactions are usually instant, but Chainlink Functions take 30-60 seconds to fulfill. Handling this "pending" state in the UI without confusing the user was tough. We built an optimistic UI update system and event listeners (WorkVerificationRequested) to keep the user informed.
  • Gas Limit Panics: During testing, we kept hitting "Gas Limit" errors when cancelling gigs. We realized our smart contract had a strict 24-hour timelock that we were testing too early. We had to implement flexible time-locks for the demo environment.
  • The "Approve" Pattern: Ensuring the UX for ERC-20 approvals (Approving MNEE before depositing) felt smooth was a challenge. We built a reactive button component that detects allowance limits and guides the user through the two-step process automatically.

๐Ÿ† Accomplishments that we're proud of

  • True Decentralization: There is no backend database. The entire state of every gig lives on Ethereum.
  • Real-World Integration: We successfully connected a Solidity Smart Contract to the GitHub API. Seeing the "Confetti" pop on the screen the exact moment a real PR was merged on GitHub was a magical moment.
  • The UI Vibe: We built a frontend that developers actually want to use. The "Neon/Terminal" aesthetic feels native to the people writing the code.

๐Ÿง  What we learned

  • MNEE Utility: We learned how stablecoins like MNEE are superior for B2B payments because they remove volatility risk from the escrow period.
  • Oracle Power: We gained deep experience with Chainlink Functions. We learned that "Real World Assets" (RWA) aren't just real estateโ€”code commits are real-world assets too.
  • Foundry vs. Hardhat: Switching to Foundry gave us much faster test loops and better debugging traces when our contract reverts occurred.

๐Ÿš€ What's next for Trustless Gig Escrow

  • Gasless Relayers: Implementing EIP-2612 (Permit) so freelancers can claim their MNEE without needing any ETH for gas.
  • Dispute Resolution: Integrating a decentralized court (like Kleros) for cases where a client refuses to merge valid code.
  • Multi-Chain: Deploying the factory contract to other L2s to minimize costs further.

Built With

Share this project:

Updates