An AI-native egocentric capture marketplace powered by stablecoins and the x402 protocol.
Built for the Arbitrum Open House Singapore Buildathon.
The /agent-demo route demonstrates a complete x402 v2 payment cycle across Robinhood Chain Testnet and Arbitrum Sepolia:
- An unpaid resource request receives a machine-readable HTTP 402 Payment Required response.
- A deterministic server-side agent validates the payment against strict spending policies.
- The agent signs an EIP-3009
transferWithAuthorizationauthorization using EIP-712 typed data for test stablecoins. - The agent retries the protected resource with the x402 payment signature.
- The x402 facilitator verifies and settles the payment on-chain.
- Only after confirmed settlement does the server issue a short-lived signed URL for the protected robotics dataset.
Dual-rail architecture: The autonomous-agent demo uses x402 with test stablecoins on Robinhood Chain Testnet and Arbitrum Sepolia. The human checkout flow uses direct mUSDG transfers through ZeroDev embedded wallets on Arbitrum Sepolia.
π Full runbook: x402-server/docs/AGENT_DEMO_RUNBOOK.md
- Real x402 Agent Demo
- Problem
- Solution
- Key Features
- Architecture
- How It Works: The x402 Flow
- Tech Stack
- Smart Contracts
- Getting Started
- Project Structure
- Sponsors and Integrations
- Team
- ETHSKILLS Integration
- Security Notes
- Current Demo Status
- License
Traditional data marketplaces require human intervention for discovery, purchasing, verification, and delivery. This creates friction and prevents autonomous systems from operating at machine speed.
AI agents, robotics teams, and decentralized applications lack a unified mechanism to:
- Discover robotics training data programmatically.
- Purchase digital resources without manual approval workflows.
- Execute micropayments using machine-readable payment requirements.
- Verify settlement before accessing protected content.
- Reward human contributors for capturing valuable real-world actions.
As a result, valuable human dexterity data remains difficult to source while billions of smartphones remain underutilized as capture devices.
DigiRobotics connects human contributors, robotics teams, datasets, and autonomous agents through two purpose-built payment rails:
-
Agentic Commerce
A real x402 v2exactpayment flow using test stablecoins on Robinhood Chain Testnet and Arbitrum Sepolia. A server-side agent discovers a dataset, validates its payment requirements, signs an EIP-3009 authorization, and unlocks the resource after confirmed settlement. -
Human Checkout
A Thirdweb and ZeroDev embedded-wallet experience using direct mUSDG transfers on Arbitrum Sepolia, with no seed phrases required.
Together, these rails create a marketplace where humans can capture and monetize robotics training data while autonomous agents discover, verify, purchase, and consume it.
- β Native x402 payments: HTTP 402 responses with EIP-3009 and EIP-712 payment authorizations.
- β Deterministic discovery: Programmatic dataset discovery and selection without requiring an LLM.
- β Strict spending policy: Validation of network, token, host, recipient, amount, timeout, and one-payment-per-run limits.
- β Settlement evidence: Facilitator response, on-chain transaction receipt, and seller balance-delta verification.
- β Protected delivery: Dataset access is never issued before successful settlement.
- β Idempotent execution: Reconnecting or refreshing cannot trigger duplicate payments.
- β Zero-friction onboarding: Embedded wallets without seed phrases.
- β Egocentric capture: Contributors can upload first-person robotics training videos.
- β Stablecoin rewards: Contributors can receive USDG or PYUSD after validation.
- β Telegram ingestion: Videos can be submitted through the DigiRobotics Telegram bot.
- β Campaign discovery: Contributors can find capture tasks requested by robotics teams.
- β Curated training data: Discover video datasets organized by task, environment, and quality.
- β Custom data requests: Request audiovisual, software, hardware, or specialized capture campaigns.
- β Agent-ready resources: Allow autonomous buyers to discover and purchase protected datasets.
- β Programmatic delivery: Retrieve purchased resources through protected API endpoints.
- β Full TypeScript stack: Shared types across the frontend and backend.
- β Foundry-based contracts: Solidity testing, deployment, fuzzing, and invariant testing.
- β Modular architecture: Clear separation between the frontend, agent runtime, payment policy, protected resources, contracts, and storage.
- β Fail-closed configuration: Missing payment or wallet configuration does not expose protected content.
flowchart LR
A["Next.js<br/>/agent-demo"]
B["Express Run API<br/>and SSE"]
C["Discovery and<br/>Policy Engine"]
D["Server-Side<br/>x402 Buyer"]
E{"Protected Dataset<br/>Resource"}
F["x402<br/>Facilitator"]
G[("Robinhood Chain Testnet<br/>and Arbitrum Sepolia<br/>Test Stablecoins")]
H[("Protected Dataset<br/>Storage")]
A -->|"Create run"| B
B -->|"Search and evaluate"| C
C -->|"Approved candidate"| D
D -->|"1. Unpaid GET"| E
E -->|"2. HTTP 402 requirements"| D
D -->|"3. PAYMENT-SIGNATURE"| E
E -->|"4. Verify and settle"| F
F -->|"5. Settle on-chain"| G
G -->|"6. Settlement receipt"| E
H -->|"Protected resource"| E
E -->|"7. Five-minute signed URL"| D
D -->|"8. Run result"| B
B -->|"9. Live SSE events"| A
classDef frontend fill:#161c29,stroke:#84cc16,stroke-width:2px,color:#ffffff
classDef backend fill:#1a1f2e,stroke:#a0a0a0,stroke-width:1px,color:#ffffff
classDef agent fill:#1a1f2e,stroke:#84cc16,stroke-width:2px,color:#ffffff
classDef facilitator fill:#16372a,stroke:#84cc16,stroke-width:2px,color:#ffffff
classDef chain fill:#2d3748,stroke:#ffffff,stroke-width:2px,color:#ffffff
classDef storage fill:#161c29,stroke:#a0a0a0,stroke-width:1px,color:#ffffff
class A frontend
class B,C backend
class D agent
class E,F facilitator
class G chain
class H storage
flowchart LR
A["Next.js Marketplace"]
B["Thirdweb Authentication"]
C["ZeroDev Embedded Wallet"]
D["Direct mUSDG Transfer"]
E[("Arbitrum Sepolia")]
F["Human Checkout Confirmation"]
A --> B
B --> C
C --> D
D --> E
E --> F
classDef frontend fill:#161c29,stroke:#84cc16,stroke-width:2px,color:#ffffff
classDef wallet fill:#1a1f2e,stroke:#84cc16,stroke-width:2px,color:#ffffff
classDef chain fill:#2d3748,stroke:#ffffff,stroke-width:2px,color:#ffffff
class A frontend
class B,C,D wallet
class E,F chain
The run API validates:
- Agent wallet balance.
- Supported network and token.
- Allowed resource host.
- Allowed payment recipient.
- Maximum payment amount.
- Facilitator availability.
- Dataset configuration.
The agent searches the configured dataset registry and evaluates compatible resources using deterministic selection logic.
The agent requests the protected resource without a payment signature:
GET /x402/datasets/:id/contentThe resource server responds with:
HTTP/1.1 402 Payment RequiredThe response contains machine-readable x402 payment requirements.
Before signing, the agent validates:
- Network.
- Asset address.
- Payment scheme.
- Atomic amount.
- Payment recipient.
- Resource URL.
- Host allowlist.
- Spending limit.
- Request timeout.
- Run idempotency.
The server-side agent wallet signs an EIP-3009 authorization using EIP-712 typed data.
No agent private key is exposed to the browser.
The agent retries the protected resource with the x402 payment signature.
The facilitator verifies the authorization and settles the payment on Robinhood Chain Testnet or Arbitrum Sepolia, depending on the selected resource and configured payment rail.
After settlement, the backend verifies:
- Facilitator success response.
- On-chain transaction receipt.
- Successful receipt status.
- Expected seller balance delta.
- Correct asset.
- Correct amount.
- Correct payment recipient.
The backend then issues a short-lived signed dataset URL.
The frontend receives genuine backend events through Server-Sent Events and displays:
- Selected dataset.
- Network and asset.
- Payment amount.
- Transaction hash.
- Explorer link.
- Settlement result.
- Dataset unlock status.
| Layer | Technologies |
|---|---|
| Smart contracts | Foundry, Solidity 0.8.20, EIP-712, EIP-3009, ERC-8004 |
| Backend | Node.js, Express.js, TypeScript, x402 v2 |
| Frontend | Next.js 16, React 19, Tailwind CSS 4 |
| Web3 | Viem, Wagmi v2 |
| Account abstraction | ZeroDev SDK, ERC-4337 session keys |
| Authentication | Thirdweb |
| Storage | Pinata and IPFS |
| RPC infrastructure | QuickNode |
| Analytics | Dune Analytics |
| CI/CD | GitHub Actions |
| Network | Component | Purpose |
|---|---|---|
| Arbitrum Sepolia | MockUSDG (mUSDG) |
Human marketplace checkout asset |
| Arbitrum Sepolia | ZeroDev smart account | Embedded account experience and session keys |
| Arbitrum Sepolia | Thirdweb authentication | User authentication and onboarding |
| Arbitrum Sepolia | Test stablecoin payment rail | Testnet x402 and direct payment experimentation |
| Robinhood Chain Testnet | Test USDG or PYUSD | Agentic x402 payment asset |
| Robinhood Chain Testnet | Server-side agent wallet | Signs bounded EIP-3009 payment authorizations |
| Robinhood Chain Testnet and Arbitrum Sepolia | x402 facilitator integration | Payment verification and settlement |
| Mainnet β planned | Production USDG and PYUSD | Production settlement for robotics data purchases |
| Contract | Purpose | Networks |
|---|---|---|
AgentRegistry |
ERC-8004 agent identity management | Arbitrum Sepolia, Robinhood Chain Testnet |
RoboticsMarketplace |
Dataset listing and purchase logic | Arbitrum Sepolia, Robinhood Chain Testnet |
AssetVault |
Escrow and IPFS delivery | Arbitrum Sepolia, Robinhood Chain Testnet |
- Node.js: 20.9 or later
- npm: Compatible with the installed Node.js version
- Foundry: Installation guide
- Git: 2.x or later
git clone https://github.com/DigiPaga/digi-robotics.git
cd digi-roboticscd x402-server
npm install
cp .env.example .envConfigure the required backend environment variables in:
x402-server/.env
Do not commit real wallet keys, bot tokens, or API credentials.
cd ../web
npm install
cp .env.example .env.localConfigure the frontend API URL and other public environment variables in:
web/.env.local
Never expose agent private keys through NEXT_PUBLIC_* variables.
cd ../contracts
forge install
forge build
forge testOpen a terminal:
cd x402-server
npm run devThe backend runs at:
http://localhost:3001
Open a second terminal:
cd web
npm run devThe frontend runs at:
http://localhost:3000
http://localhost:3000/agent-demo
An unpaid request should return HTTP 402:
curl -i http://localhost:3001/x402/datasets/engine-assembly-pov/contentExpected response status:
HTTP/1.1 402 Payment RequiredFor the complete funding, configuration, and verification procedure, see:
x402-server/docs/AGENT_DEMO_RUNBOOK.md
digi-robotics/
βββ contracts/ # Solidity contracts and Foundry tests
β βββ src/
β βββ script/
β βββ test/
βββ docs/ # Project documentation
βββ web/ # Next.js frontend
β βββ public/
β β βββ pitch-deck/
β βββ src/
β βββ app/
β β βββ agent-demo/
β βββ components/
β βββ lib/
βββ x402-server/ # Express backend and agent runtime
β βββ docs/
β β βββ AGENT_DEMO_RUNBOOK.md
β βββ src/
β β βββ agent/
β β βββ config/
β β βββ data/
β β βββ routes/
β β βββ telegramBot.ts
β β βββ server.ts
β βββ uploads/
βββ LICENSE
βββ README.md
DigiRobotics uses infrastructure and tooling from the following ecosystem partners:
| Sponsor or Integration | Contribution |
|---|---|
| Arbitrum | L2 infrastructure and Buildathon host |
| Robinhood Chain | Testnet infrastructure and payment experimentation |
| Paxos | USDG and PYUSD stablecoin ecosystem |
| ZeroDev | ERC-4337 account abstraction |
| Thirdweb | Authentication and wallet onboarding |
| QuickNode | High-performance RPC infrastructure |
| Pinata | IPFS storage and controlled dataset delivery |
| Dune Analytics | On-chain marketplace analytics |
Built by the DigiPaga team for the Arbitrum Open House Singapore Buildathon.
- Oscar (@ozkite) _ Product Design & Development
- Otto (@ottodevs) _ Product Deployments & Integrations
- DigiAgent (@digiagent) _ Research & Technical Assistance
This project follows ETHSKILLS guidance for production-oriented Ethereum development, with additional consideration for L2 execution and sequencer behavior.
- β Security-first development: Contracts and backend flows are reviewed and tested against common vulnerabilities, including reentrancy and access-control failures.
- β Spending constraints: Autonomous payments are restricted by explicit asset, network, recipient, host, amount, and timeout policies.
- β Gas awareness: Storage and computation patterns are designed with L2 execution in mind.
- β Testing: Foundry unit, fuzz, and invariant tests are used where applicable.
- β Typed transactions: EIP-712 typed data is used for payment authorization.
- β Secret isolation: Agent signing credentials remain on the backend.
- β Documentation: Contracts and critical flows include NatSpec and implementation documentation.
- Foundry: Contract compilation, testing, fuzzing, and deployment.
- OpenZeppelin: Standard contract implementations and security primitives.
- ZeroDev: ERC-4337 smart accounts and session-key infrastructure.
- Viem: Typed EVM reads, writes, and receipt verification.
- x402: Machine-readable HTTP payment requirements and settlement.
- Pinata: IPFS storage and controlled dataset delivery.
- Never commit
.envor.env.localfiles. - Never expose agent wallet keys to the frontend.
- Never unlock protected content after transaction submission alone.
- Always verify settlement and receipt status before fulfillment.
- Restrict autonomous spending through explicit allowlists and maximum amounts.
- Rotate credentials that have been exposed during development.
- Use testnet assets only for the public demonstration.
| Capability | Status |
|---|---|
| Marketplace interface | β Available |
| Human mUSDG checkout | β Testnet demo β Arbitrum Sepolia |
| x402 protected resource | β Available |
| Deterministic agent buyer | β Available |
| HTTP 402 challenge | β Available |
| EIP-3009 authorization | β Available |
| Facilitator settlement | β Robinhood Chain Testnet and Arbitrum Sepolia |
| Signed dataset delivery | β Available |
| Telegram capture ingestion | π§ͺ Prototype |
| Production stablecoin settlement | π§ Planned |
| Mainnet deployment | π§ Planned |
This project is released under the MIT License.
Built with β€οΈ for the future of autonomous commerce.
Arbitrum Open House Singapore Buildathon
Submission date: October 4, 2026 Β· Prize pool: $115,000 USD
