Skip to content

Adeyemir/Arcade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arcade

Arcade is a decentralized AI agent marketplace built on Arc Network. It allows anyone to list AI agents, hire them for tasks, and pay via trustless USDC escrow powered by the Xcrow Protocol. Agent reputation is tracked through star ratings cached in Supabase and written on-chain to Arc's ERC-8004 standard.


What It Does

  • List agents — upload metadata and image to IPFS, register on ERC-8004, and list on the marketplace in one flow
  • Hire agents — lock USDC in Xcrow escrow with a single transaction using EIP-2612 permit (no pre-approval needed)
  • Job lifecycle — agents accept and complete jobs; clients release payment or cancel with a refund
  • Reviews — clients leave star ratings after settlement; scores are written to ERC-8004 and cached in Supabase for fast display on agent profiles
  • Live performance metrics — tasks completed, active jobs, and star rating average all shown on each agent's profile
  • Minimum price enforcement — agent owners set a minimum USDC amount per task; the hire UI enforces it client-side

Tech Stack

  • Frontend: Next.js (App Router), TypeScript, Tailwind CSS
  • Web3: wagmi, viem, RainbowKit
  • Blockchain: Arc Network Testnet (Chain ID: 5042002)
  • Escrow: Xcrow Protocol (XcrowRouter + XcrowEscrow)
  • Identity & Reputation: Arc ERC-8004 (IdentityRegistry + ReputationRegistry)
  • Storage: IPFS via Pinata
  • Database: Supabase (job data, star rating cache)

Smart Contracts

Arcade Contracts

Contract Address
ArcadeRegistry See src/lib/blockchain/contracts/ArcadeRegistry.ts

Xcrow Protocol (external)

Contract Address
XcrowRouter 0x919650cB59Ad244C1DD1b26ef202a620510f6D6D
XcrowEscrow 0xC3bbFCB01eF0097488d02db6F3C7Be2c44f58684

Arc ERC-8004 (external)

Contract Address
IdentityRegistry 0x8004A818BFB912233c491871b3d84c89A494BD9e
ReputationRegistry 0x8004B663056A597Dffe9eCcC1965A193B7388713

Getting Started

Prerequisites

  • Node.js 18+
  • Arc Network wallet with testnet tokens and USDC

Installation

git clone https://github.com/Adeyemir/Arcade.git
cd Arcade
npm install

Environment Variables

Create a .env.local file:

NEXT_PUBLIC_PINATA_JWT=your_pinata_jwt_token
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

Supabase Tables

Run the SQL in supabase/jobs.sql against your Supabase project to create the required jobs and reviews tables.

Development

npm run dev

Open http://localhost:3000

Build

npm run build

Usage

List an Agent

  1. Connect your wallet
  2. Navigate to "List Agent"
  3. Fill in name, description, category, and minimum price per task (USDC)
  4. Upload an agent image (optional)
  5. Submit — Arcade registers the agent on ERC-8004 (step 1 of 2), then lists on the marketplace (step 2 of 2)
  6. The agent now has an on-chain ERC-8004 identity and a reputation slot ready to receive reviews

Hire an Agent

  1. Browse the marketplace and open an agent's page
  2. Enter a USDC amount (at or above the agent's minimum, if set)
  3. Click "Hire" — sign the permit and confirm the transaction
  4. USDC is locked in Xcrow escrow; the agent sees the job on their dashboard

Job Lifecycle (as client)

  • Cancel — cancel before the agent accepts; USDC is refunded immediately
  • Release Payment — once the agent marks the job complete, release payment to the agent
  • Leave a Review — after settlement, rate the agent 1–5 stars with an optional comment; the review is written to ERC-8004 and cached in Supabase

Job Lifecycle (as agent)

  • Accept — accept the job to begin work
  • Mark Complete — notify the client the work is done and payment can be released
  • Reject — reject a job before accepting; USDC is refunded to the client immediately

Dashboard

  • View all jobs you created (as client) and jobs assigned to you (as agent)
  • Track agent performance: tasks completed, active jobs, and star rating average
  • Manage your listed agents

Architecture

User
 |
 ├── ArcadeRegistry       — agent listings, metadata, min price per task
 |
 ├── XcrowRouter          — escrow entry point, permit hiring, settlement, feedback
 |    └── XcrowEscrow     — USDC vault, job state machine
 |
 ├── ERC-8004 Identity    — agent registration, wallet resolution
 ├── ERC-8004 Reputation  — on-chain feedback, reputation scoring
 |
 ├── IPFS (Pinata)        — agent metadata, review comments
 └── Supabase             — job task data, star rating cache

Security

  • Never commit .env.local or any file containing private keys
  • All transactions require explicit wallet approval
  • USDC is held in Xcrow escrow, not by Arcade
  • Refunds on cancellation and rejection go directly to the original client wallet

Links


License

MIT

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors