PayLoad — sell your coding agent's wait time
A per-impression attention market on agent idle time. Advertisers pay to appear
in your Claude Code status line while it thinks; developers earn USDC
nanopayments on Arc per qualified impression; an AI matching agent decides
which ad shows, what it clears at, and whether the attention is even real.
Built for the Lepton Agents Hackathon (Circle × Arc).
Attention that was too small and too fleeting to sell — a 4-second glance at a loading spinner — becomes sellable for the first time, because settlement can finally be a fraction of a cent, cleared in under half a second. That is the Lepton thesis: make the smallest unit sellable.
What's in this repo
payload/
├── web/ # Next.js 16 app: landing site + dashboards + all backend APIs
│ ├── src/app/ # landing (/), /dashboard/advertiser, /dashboard/developer
│ ├── src/app/api/ # serve (x402), impression, simulate, account, pair, onchain…
│ └── src/lib/ # matching agent, settlement, onchain (viem/Arc), chain, x402, sqlite
├── contracts/ # Foundry: PayLoadEscrow.sol (advertiser budgets + revenue split) + deploy
├── plugin/ # Claude Code plugin marketplace (the client)
│ └── payload/ # statusLine ad-client + impression/dwell hooks + pairing (link.json)
├── prd.md # the full product thesis
└── DEMO.md # the <3-min Loom script
Three surfaces, one loop:
- The plugin renders a context-matched ad in your status line while Claude Code works.
- The matching agent (in
web) reads your live coding context, runs a second-price auction, and verifies the session is a real human.
- Settlement debits the advertiser's on-chain escrow and credits your wallet in batched USDC on Arc.
Quickstart (local, zero keys)
cd web
pnpm install
pnpm dev # http://localhost:3000
Open:
- / — the landing site, with a live status-line demo and a real payments ticker.
- /dashboard/advertiser — sign in (email + role, password-less), create/fund
campaigns, manage ads, watch spend.
- /dashboard/earn — sign in, then live balance, earnings chart, impression feed,
controls, plugin install steps, and your pairing code.
Signing in is zero-config: /api/auth creates an account by email + role on
first use and each account gets a real Circle Programmable Wallet on Arc if
CIRCLE_API_KEY/CIRCLE_ENTITY_SECRET/CIRCLE_WALLET_SET_ID are set (falls back to
a placeholder address otherwise). Both dashboards run a first-time NextStep.js
onboarding tour, replayable via "Take the tour."
Everything works with no API keys: the settlement layer runs a faithful
Arc-testnet simulation (real auction, real ledger backed by SQLite, minted tx
hashes, sub-second finality). Configure the platform key + escrow to flip it
to real testnet USDC — see below. State persists in web/.payload/payload.db.
Install the Claude Code plugin
# in Claude Code (use the full HTTPS URL — GitHub's owner/repo shorthand
# always clones over SSH, which fails without SSH keys configured)
/plugin marketplace add https://github.com/fabianferno/payload.git
/plugin install payload@payload-market
/payload:payload # wires the status line (plugin skills are namespaced)
/reload-plugins
Testing from a local clone instead? /plugin marketplace add /path/to/payload
(the repo root) skips GitHub entirely.
Then just code. Ads rotate in your status line; every qualified turn settles a
nanopayment. Full plugin docs: plugin/README.md.
Going live (real testnet USDC on Arc)
Real wallets (Privy), a real on-chain escrow contract, and real batched USDC
settlement — verifiable on testnet.arcscan.app. Four steps:
1. Configure web/.env.local (see web/.env.example):