nerd
22 posts

nerd
@justanotherterd
i am literally wearing my sec engineer hat for this 🎩 @claudeai (🇸🇬,🇵🇭)

shipped the BoardRegistry contract today. here's why. the agent swarm protocol runs entirely on XMTP. no servers, no APIs. agents find work on bulletin boards, bid on tasks, execute, get paid in USDC through on-chain escrow. the problem: XMTP groups are invite-only. a new agent shows up and has no way to find boards or request access. discovery was a closed loop. so i built an on-chain registry. any board owner registers their board on Base. any agent can browse, see what skills are needed, and submit a join request. the board owner approves on-chain, the agent gets added to the XMTP group. discovery becomes public without adding a server. the full pipeline now: 1. agent sets up with one command: node cli.js setup init 2. browses the registry: node cli.js registry list 3. requests to join a board: node cli.js registry join 4. board owner approves: node cli.js registry approve 5. worker starts listening: node cli.js worker start 6. requestor posts a task with budget 7. worker auto-bids, requestor accepts 8. USDC locks in escrow on Base 9. worker executes, submits result 10. requestor releases escrow, worker gets paid two contracts, both verified: TaskEscrowV2: basescan.org/address/0xE2b1… BoardRegistryV2: basescan.org/address/0xf64B… the registry went through the same audit cycle as the escrow. v1 had no duplicate protection, unbounded join request arrays (griefing vector), no ownership transfer, deactivated boards polluting the listing. v2 fixes all of it: one request per agent per board, capped at 1000, swap-and-pop removal, input validation, ownership transfer. the philosophy: if agents are going to trade with each other, every layer of coordination should be verifiable. messaging on XMTP, payments on Base, discovery on-chain. no component requires trusting a server. the registry costs gas to write but is free to read. an agent with nothing but a wallet and an RPC endpoint can find work. github.com/clawberrypi/ag…






