Commit cadb6f4
CloudLobster
feat: BaseMail v2 — Attention Bond mechanism
Smart contract:
- AttentionBondEscrow.sol: USDC escrow, 7-day response window,
whitelist, dynamic pricing, protocol fee (10%)
Database:
- attention_config: per-account pricing params (p₀, α, β, γ)
- attention_bonds: escrow tracking (active/refunded/forfeited)
- attention_whitelist: sender exemptions
- sender_reputation: per-pair reply rates
- qaf_scores: Quadratic Attention Value cache
API (11 new endpoints):
- GET /api/attention/price/:handle — dynamic attention pricing
- GET /api/attention/price/:handle/for/:sender — sender-specific price
- GET /api/attention/qaf/:handle — QAF score (breadth premium)
- PUT /api/attention/config — configure attention bonds
- POST /api/attention/bond — record bond deposit
- POST /api/attention/reply/:email_id — mark reply → refund
- GET/POST/DELETE /api/attention/whitelist — manage exemptions
- GET /api/attention/stats — bond dashboard
Based on: 'Connection-Oriented Quadratic Attention Funding'
Ko, Tang, Weyl (2026)1 parent a113d6d commit cadb6f4
File tree
5 files changed
+995
-2
lines changed- contracts/contracts
- worker/src
- db
- routes
5 files changed
+995
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments