Skip to content

xi-kki/Floe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Floe — Trustless AI Agent Escrow on Sui

Floe is a decentralized escrow platform that enables trustless payments between humans and AI agents on the Sui blockchain.

Problem

AI agents are becoming autonomous service providers, but there's no trustless way to pay them:

  • Cetus ($223M), Nemo ($2.6M), Volo ($3.5M), Scallop ($142K) — Sui DeFi lost $229M+ to hacks
  • Users send payment upfront and hope the agent delivers
  • Agents deliver work and hope they get paid
  • No on-chain verification or dispute resolution exists for AI agent services

Solution

Floe uses Sui's object model to create programmable escrow contracts:

  1. User locks SUI/USDsui in an escrow contract specifying the task and agent
  2. Agent performs the work off-chain
  3. Agent submits proof of completion on-chain
  4. User confirms delivery — funds are released to agent (minus fee)
  5. Dispute resolved by arbitrator if needed
  6. Auto-refund if agent doesn't deliver by deadline

Architecture

┌─────────────┐     Deposit SUI         ┌──────────────────┐
│   User      │ ──────────────────────►  │  Escrow Contract │
│  (Frontend) │                          │   (Sui Move)    │
│             │◄──── Funds Released ──── │                  │
└─────────────┘                          └────────┬─────────┘
         │                                        │
         │  Sends task                             │ Verifies proof
         ▼                                        ▼
┌─────────────────┐                      ┌──────────────────┐
│   AI Agent      │  Submits proof ──────►│  Oracle Adapter  │
│  (Off-chain)    │                      │  (on-chain)      │
└─────────────────┘                      └──────────────────┘

Smart Contracts

escrow.move

  • create() — Create an escrow with task specs and agent address
  • fund() — Fund an existing escrow
  • create_and_fund() — Create and fund in one tx
  • submit_proof() — Agent submits completion proof hash
  • confirm_delivery() — User confirms, funds released to agent
  • raise_dispute() — Either party raises a dispute
  • resolve_dispute() — Arbitrator resolves in favor of either party
  • cancel_and_refund() — Cancel after deadline, funds returned
  • auto_release_after_proof() — Agent claims after deadline if no dispute

agent_registry.move

  • Register, update, activate/deactivate AI agents on-chain
  • Track agent reputation (tasks completed, success rate)

oracle_adapter.move

  • Register oracle nodes for proof verification
  • Verify off-chain attestations

Tech Stack

  • Blockchain: Sui (Move smart contracts)
  • Frontend: React 19, TypeScript, Vite, Tailwind CSS v4
  • SDK: Sui TypeScript SDK, @mysten/dapp-kit
  • Agent SDK: TypeScript SDK for AI agent integration

Getting Started

# Install Sui CLI
cargo install --git https://github.com/MystenLabs/sui.git --branch testnet sui

# Build Move contracts
cd move && sui move build

# Run tests
sui move test

# Deploy to testnet
sui client publish --gas-budget 100000000

# Frontend
cd frontend && npm install && npm run dev

# Agent SDK
cd agent-sdk && npm install && npm run build

About

Trustless AI Agent Escrow on Sui with on-chain verification & dispute resolution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors