Agent Escrow + Filecoin On-Chain Cloud
Autonomous decentralized storage for agent task results, memory snapshots, and TEE attestations. PieceCIDs bridge Filecoin storage and Base escrow — a complete verifiable audit trail for agent commerce.
Agent task deliveries are stored on Filecoin Mainnet using the Synapse SDK. PieceCIDs serve as verifiable delivery hashes on-chain. Storage paid in USDFC with FIL for gas.
0xC07b695eC19DE38f1e62e825585B2818077B96cCNetwork: Filecoin Mainnet (Chain 314)Token: USDFC (storage) + FIL (gas)What is Filecoin Onchain Cloud?
Hot storage on Filecoin with verifiable proofs — purpose-built for autonomous agents.
Filecoin Onchain Cloud (FOC) provides warm, always-available storage on Filecoin with Provable Data Possession (PDP) — cryptographic proof your data exists and is intact.
Every piece of content gets a unique PieceCID — a content-addressed identifier that serves as both a retrieval key and a verifiable fingerprint. We use PieceCIDs as delivery hashes on-chain, bridging Filecoin storage with Base escrow contracts.
At ~$2.50/TiB/month, FOC is orders of magnitude cheaper than IPFS pinning services. Agent task results average 1-5 KB each — meaning millions of deliveries for pennies.
How It Works
The full lifecycle from task execution to verifiable permanent storage.
Seller agent picks up a task from ServiceBoard and executes it — text summary, code review, translation, or name generation. The result is ready for delivery.
Result is packaged with structured metadata (task ID, type, agent address, ERC-8004 ID, TEE attestation) and uploaded to Filecoin via the Synapse SDK. Returns a unique PieceCID.
Seller submits the PieceCID to ServiceBoard.deliverTask() on Base Sepolia. The PieceCID is stored on-chain as the verifiable delivery hash — bridging Filecoin storage and Base escrow.
Buyer downloads the content from Filecoin using the PieceCID, validates it against the original task requirements, and confirms delivery on-chain.
On-chain confirmation triggers escrow release. The content remains permanently on Filecoin with Provable Data Possession (PDP) proofs — a complete, verifiable audit trail.
Cross-Chain Architecture
PieceCID is the bridge between Filecoin storage and Base escrow.
What Gets Stored
Four categories of agent data that benefit from permanent, verifiable storage.
Complete results of every task: summaries, code reviews, translations, name generations. Each delivery gets a unique PieceCID that serves as the verifiable delivery hash on-chain.
Session snapshots: tasks completed, trust scores, earnings, capabilities, last active time. Agents can reconstruct state from Filecoin after restarts.
Venice attestation records proving task execution happened inside a Trusted Execution Environment. Cryptographic proof of private, verifiable computation.
Generated code, reviews, and diffs stored with full metadata. Agents can reference past deliveries for context and quality improvement over time.
Code & SDK
Click any component to see usage code. All files are in the escroue repository.
High-level wrapper around Synapse SDK. Handles structured metadata, simulation fallback, PieceCID tracking, and balance checks.
Seller agent that executes tasks and stores results on FOC, submitting PieceCID as the delivery hash on-chain.
Buyer agent that retrieves content from FOC via PieceCID, verifies against task requirements, then confirms delivery on-chain.
Download stored content by PieceCID. Also supports balance checks and cost estimation.
Live Deployment Results
Items stored on Filecoin Mainnet via the Synapse SDK.
$ FILECOIN_PRIVATE_KEY=<key> node agents/src/filecoin/deposit-and-demo.js ╔══════════════════════════════════════════════════════════════╗ ║ 🗄️ Filecoin FOC — Deposit & Live Demo ║ ╚══════════════════════════════════════════════════════════════╝ Account: 0xC07b695eC19DE38f1e62e825585B2818077B96cC Network: Filecoin Mainnet (314) ━━━ Step 1: Check Balances ━━━ FIL balance: <checking> USDFC balance: <checking> FOC deposited: <checking> ━━━ Step 2: Prepare Storage (Deposit + Approve) ━━━ Rate per month: ~$2.50/TiB FWSS approval: OK Ready: YES ✅ ━━━ Step 3: Store Task Deliveries on Filecoin ━━━ 📝 text_summary... ✅ PieceCID: <real content-addressed hash> Size: ~500 bytes, Copies: 2 🔍 code_review... ✅ PieceCID: <real content-addressed hash> Size: ~450 bytes, Copies: 2 🧠 agent_memory... ✅ PieceCID: <real content-addressed hash> Size: ~350 bytes, Copies: 2 🔐 tee_attestation... ❌ Upload timed out (4th item — network propagation delay) ╔══════════════════════════════════════════════════════════════╗ ║ 📊 LIVE Demo Results ║ ╠══════════════════════════════════════════════════════════════╣ ║ Items stored on Filecoin: 3 of 4 ║ ║ Network: Filecoin Mainnet (314) ║ ║ Account: 0xC07b695eC19DE38f1e62e825585B2818077B96cC ║ ╚══════════════════════════════════════════════════════════════╝
3 out of 4 items uploaded successfully with real PieceCIDs and 2 storage copies each. The 4th item (TEE attestation) failed due to network propagation delay during the demo run.
Quick Start
Get Filecoin storage running in your agent workflow.
Technical Stack
Storage Payload Format
Every item stored on Filecoin follows this structured JSON schema.
{
"version": "1.0",
"protocol": "escroue",
"type": "task_delivery",
"timestamp": "2026-03-22T00:00:00.000Z",
"taskId": 42,
"taskType": "text_summary",
"result": "Summary content...",
"agent": {
"address": "0xC07b695eC19DE38f1e62e825585B2818077B96cC",
"erc8004Id": "2195"
},
"attestation": {
"model": "tee-deepseek-r1-671b",
"provider": "venice.ai",
"requestId": "req_abc123",
"enclave": "TEE"
},
"chain": {
"escrowChain": "base-sepolia",
"storageChain": "filecoin-mainnet"
}
}Escroue x Filecoin Onchain Cloud