Add the Attention Bond layer to BaseMail: "from agents have email → email has a price."
- USDC escrow for attention bonds (Base Mainnet)
- Sender deposits bond → 7-day window → recipient replies (refund) or ignores (forfeit)
- Whitelist: exempted senders (zero bond)
- Protocol fee τ = 10%
attention_configtable: per-account attention price settingsattention_bondstable: bond escrow trackingwhitelisttable: sender whitelist per accountreputationtable: sender reputation scores (reply rates)qaf_scorestable: per-account QAF attention value cache
GET /api/attention/:handle— Get attention price for a recipientPUT /api/attention/config— Set your attention price (p₀, α, β, γ)GET /api/attention/qaf/:handle— Get QAF score for a recipientPOST /api/attention/bond— Submit bond tx_hash when sendingPOST /api/attention/reply/:email_id— Mark reply → trigger refundGET /api/attention/whitelist— List whitelistPOST /api/attention/whitelist— Add to whitelistDELETE /api/attention/whitelist/:address— Remove from whitelistGET /api/attention/stats— Dashboard: bonds received/refunded/forfeited, QAF score
POST /api/send— Add optionalattention_bond: { tx_hash, amount }fieldGET /api/inbox— Include bond status per email (bonded/refunded/forfeited)
AttentionBondEscrow {
// Core
deposit(recipient, emailId, amount) → escrow USDC
reply(emailId) → refund (1-τ) to sender, τ to protocol
forfeit(emailId) → after 7 days, transfer to recipient
// Config
setAttentionPrice(basePrice) → set p₀
setWhitelist(sender, status) → exempt/unexempt
// View
getBond(emailId) → bond details
getAttentionPrice(recipient) → current price
}- On each bond deposit, recalculate recipient's QAF: AV = (Σ√bᵢ)²
- Store in
qaf_scorestable - CO-QAF: when sender graph data available, apply α_ij discount
- p(t,s) = p₀ · (1 + α·D(t))^β · (1 - γ·R̄ₛ(t))
- D(t): message count in rolling 7-day window
- R̄ₛ(t): sender's historical reply rate with this recipient
- ✅ Smart contract (
AttentionBondEscrow.sol) - ✅ DB schema migration
- ✅ Attention config & whitelist APIs
- ✅ Bond deposit verification in send flow
- ✅ Reply/forfeit flow
- ✅ QAF calculation
- ✅ Dynamic pricing
- ✅ Stats dashboard API