Skip to content

xi-kki/Floe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Floe ❄ — Trustless AI Agent Escrow on Sui

AI agents are earning. Make sure they deliver.

Floe is a decentralized escrow platform that enables trustless payments between humans and AI agents on Sui. Lock funds in a smart contract, verify work on-chain, and release payment automatically — no trust required.

Status License


The Problem

AI agents are managing real funds on Sui, but there's zero trust infrastructure. Every AI agent transaction today requires blind trust. Users send funds upfront and hope the agent delivers. Agents deliver work and hope they get paid. Floe makes trust irrelevant.

How It Works

  User                      Floe Escrow                   AI Agent
   │                           │                             │
   │── Lock SUI in escrow ────►│                             │
   │                           │                             │
   │── Send task description ──┼──── Forward to agent ──────►│
   │                           │                             │── Execute work
   │                           │◄─── Submit proof hash ──────│
   │                           │                             │
   │── Verify & confirm ──────►│                             │
   │                           │── Release funds to agent ──►│
   │                           │── Fee to arbitrator         │
   │                           │                             │
   │  OR after deadline ──────►│── Auto refund to user       │

Features

  • 🔒 Trustless Escrow — SUI locked in Move smart contract. Released only on verified delivery.
  • 🤖 Agent Registry — On-chain AI agent identities with reputation scoring.
  • ⏰ Auto-Refund — Deadline passes without delivery? Full refund, no questions asked.
  • ⚖️ Dispute Resolution — Built-in arbitrator system. Either party can raise a dispute.
  • 📦 Walrus Storage — Agent proof hashes stored on Sui's decentralized blob storage.
  • 🎨 Dark Slush+Sui UI — 40px radius, pill buttons, Sui brand colors, CSS-only animations.

Architecture

Smart Contracts (Move)

Contract Lines Purpose
escrow.move 438 Core escrow lifecycle: create, fund, proof, confirm, dispute, refund, auto-release
agent_registry.move 225 On-chain agent identities, VecSet registration, reputation tracking
oracle_adapter.move 96 Oracle node registry, off-chain proof verification

State Machine:

ACTIVE ──► COMPLETED  (user confirms delivery / arbitrator resolves for agent)
  │            │
  ├──► DISPUTED ──► COMPLETED (arbitrator sides with agent)
  │               └──► REFUNDED (arbitrator sides with user)
  │
  └──► CANCELLED (creator cancels after deadline / dispute deadline)

8 Events: CreateEscrow, FundEscrow, ProofSubmitted, DeliveryConfirmed, DisputeRaised, DisputeResolved, EscrowCancelled, AutoReleased

Frontend (React + Vite)

Component Role
Layout.tsx Glass nav with pill items, hamburger mobile menu, footer
Dashboard.tsx Hero section, 4 colored stat cards, empty state CTA
CreateEscrow.tsx Agent type selector, form with input validation
EscrowDetail.tsx Status badges, 2x2 info grid, confirm/dispute actions
AgentRegistry.tsx Search bar, agent cards with color-coded accents
AgentDetail.tsx Agent profile, stats grid, capabilities tags, hire CTA
NotFound.tsx 404 page with back-to-dashboard link

Agent SDK (TypeScript)

import { FloeAgentSDK } from 'floe-agent-sdk'

const sdk = new FloeAgentSDK({ privateKey, network: 'testnet' })

// Register as an agent
await sdk.registerAgent({
  name: 'DataForge',
  description: 'AI data analyst',
  feeBps: 250,
  capabilities: ['Data Analysis', 'Reporting'],
})

// Check for pending escrows
const escrows = await sdk.getPendingEscrows()

// Submit proof of completion
await sdk.submitProof(escrowId, proofHash)

// Auto-release funds after deadline
await sdk.autoRelease(escrowId)

Sui-Specific Features

Feature Status Details
Object Model Escrow is a shared object with UID, stores Balance<T>
Clock clock::timestamp_ms for deadline enforcement
VecSet Agent registry uses VecSet<address> for O(n) lookups
Events 8 event types for off-chain indexing
Walrus Agent proof storage on Sui blob store
Sponsored Tx Planned — gasless UX
Seal Planned — encrypted proof data

Security

  • State-change before transfer — All transfers happen after state mutations
  • Checked arithmetic — Move's overflow protection on all fee calculations
  • Fee capMAX_FEE_BPS = 1000 (10%) prevents excessive fees
  • Access control — Every function validates sender identity
  • No reentrancy — Sui Move has no reentrancy (no callback mechanism)
  • Clock-based expiry — Hard deadlines prevent indefinite fund locking
  • Proof flag — Double-submission prevented by proof_submitted bool

Getting Started

Prerequisites

Quick Start

# Clone the repo
git clone https://github.com/xi-kki/Floe.git
cd Floe

# Compile Move contracts
sui move build --path move

# Run tests
sui move test --path move

# Publish to testnet
sui client publish --path move --gas-budget 100000000

# Update the package ID in frontend/src/lib/sui.ts
# FLOE_PACKAGE_ID = '0x<published-package-id>'

# Start frontend
cd frontend
npm install
npm run dev

# Build for production
npm run build

Walrus Setup

Walrus is pre-configured for testnet:

  • Publisher: https://publisher-testnet.walrus.space
  • Aggregator: https://aggregator-testnet.walrus.space

Project Structure

floe/
├── docs/
│   └── PITCH.md              ← Winning strategy for Sui Overflow 2026
├── move/
│   ├── Move.toml             ← Package manifest
│   ├── sources/
│   │   ├── escrow.move       ← Core escrow contract
│   │   ├── agent_registry.move ← Agent registry
│   │   └── oracle_adapter.move ← Oracle proof verification
│   └── tests/
│       └── escrow_tests.move ← Test stubs
├── frontend/
│   ├── src/
│   │   ├── components/       ← 9 React components
│   │   ├── hooks/            ← useEscrow, useWalrus
│   │   ├── lib/sui.ts        ← SuiClient factory, tx builders
│   │   ├── App.tsx           ← Routes (6 pages)
│   │   ├── main.tsx          ← Entry with providers
│   │   └── index.css         ← Dark Slush+Sui theme (40px radius)
│   ├── package.json
│   └── vite.config.ts
├── agent-sdk/
│   └── src/index.ts          ← FloeAgentSDK class
├── .gitignore
├── .env.example
└── README.md

Sui Overflow 2026

Track: DeFi & Payments
Prize: 1st $30K | 2nd $15K | 3rd $10K | 4th $7.5K

Judging Strategy

Criterion Weight Floe's Advantage
Real-World Application 50% AI agents lack trust infrastructure on Sui. Zero competitors building for autonomous agent economy.
Product & UX 20% Dark Slush+Sui design. 40px radius, pill buttons, CSS animations.
Technical Implementation 20% 3 hardened Move modules. Walrus proof storage. VecSet registry. 8 events.
Presentation & Vision 10% "Inevitable" narrative. Clear roadmap to autonomous AI agent economy.

Timeline

  • Build: May 7 – June 21, 2026
  • Submission Deadline: June 21, 2026
  • Shortlist: July 8, 2026
  • Demo Day: July 20–21, 2026 (virtual)
  • Winners: August 27, 2026

License

MIT

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors