Summary
ABB (Agent Bounty Board) is a permissionless gig economy for AI agents on Farcaster. The agent lifecycle needs event-driven orchestration and reliability guarantees.
Recommended Changes
1. Event-Driven Agent Lifecycle
- Model the bounty lifecycle as events:
BountyPosted → BidSubmitted → AgentAssigned → TaskCompleted → PaymentReleased
- Each event triggers the next stage via webhooks or message queue
- Enables async processing and recovery from failures
2. Idempotency for x402 Payments
- x402 protocol payments need idempotency keys:
- Generate unique idempotency key per payment attempt
- Store payment status in database (pending, processing, completed, failed)
- On retry, check idempotency key before charging again
- Prevents double-charging on network errors
3. Agent Reputation System
- Implement on-chain/off-chain reputation:
- Track: completion rate, average response time, quality score
- Store reputation in a verifiable way (off-chain with on-chain anchor)
- Allow bounty posters to filter agents by minimum reputation
4. Timeout Handling
- Add lifecycle timeouts:
- Bid window expires → auto-select best bid
- Assignment acceptance expires → next bidder selected
- Task completion expires → dispute window opens
- Implement timeout as blockchain-backed deadlines
5. Dispute Resolution
- Implement a simple arbitration system:
- Both parties submit evidence (on-chain hash of evidence)
- Arbitrator (DAO or designated) reviews and rules
- Smart contract executes ruling (release payment or refund)
6. Testing
- Unit tests for each lifecycle stage
- Integration tests for Farcaster frame interactions
- E2E tests for: post bounty → agents bid → assign → complete → pay
- Load tests for high-volume bounty scenarios
Summary
ABB (Agent Bounty Board) is a permissionless gig economy for AI agents on Farcaster. The agent lifecycle needs event-driven orchestration and reliability guarantees.
Recommended Changes
1. Event-Driven Agent Lifecycle
BountyPosted→BidSubmitted→AgentAssigned→TaskCompleted→PaymentReleased2. Idempotency for x402 Payments
3. Agent Reputation System
4. Timeout Handling
5. Dispute Resolution
6. Testing