Overview
AdSwap is a lightweight attention-market: readers can pay e.g. $0.05 to remove ads on a page for 8 hours, while publishers get paid through transparent, monthly settlements. The extension mints a short-lived JWT "pass" that the publisher snippet verifies client-side, so the site can decisively skip GPT/Prebid calls — no flicker, no hacky ad-blocking.
Key idea: don’t break ads — buy them out. Readers get calmer pages; publishers earn more than baseline at modest adoption.
Core Components
- Browser extension (MV3): Detects partner sites, shows a chip (e.g., “Remove ads for $0.05 · 8h”), handles wallet balance, mints a JWT when paid, immediately collapses ad containers to prevent flicker, and stores the token as both a first-party cookie and
localStorage
fallback. - AdSwap API: Registry of partner sites and pricing, user wallets/top-ups, token minting/introspection, receipts, and monthly payouts.
- Publisher snippet: One-line script that verifies tokens (via JWK), then officially disables the ad stack (no GPT/Prebid calls) and collapses containers using publisher-declared selectors.
- Payouts: Monthly settlement via Stripe Connect/ACH with transparent revenue share; dashboards for redemptions, RPM deltas, selector health, and leakage alerts.
Reader Flow (Page → Pay → Ad‑free)
- Extension checks
GET /v1/registry?domain=
for price, duration, selectors. - If partner and the reader has balance, show the chip.
- On click,
POST /v1/passes { domain, scope, duration, price }
debits wallet and mints a JWT pass with claims:iss
,sub
,aud
,scope
,exp
,jti
,features
. - Store token as a cookie (best for SSR) and
localStorage
; inject CSS to hide selectors immediately; reload once so the site renders ad‑light from first paint. - Publisher snippet sees the token and short‑circuits ad requests entirely. A MutationObserver collapses stragglers.
Publisher Flow (≈30 minutes)
- Onboard: verify domain (DNS TXT or
/.well-known/ad-swap.txt
). - Configure policy: default price (e.g., $0.05), duration (8h), sitewide pass (e.g., $1/day), CSS selectors (or enable auto‑discover).
- Connect payouts (Stripe) or provide a Web Monetization pointer.
- Install the snippet:
<script async src="https://cdn.adswap.dev/p.js" data-domain="example.com"></script>
The script fetches the publisher JWK, validates passes, skips GPT/Prebid calls, collapses containers, and emits an “entitlement used” beacon for analytics.
Tokens & Safety
- Compact JWT,
aud
bound to the eTLD+1 (optionally page‑scoped), short TTL (e.g., 8h), non‑replayable viajti
. - Verification happens client‑side with cached JWKs — no origin round‑trip needed.
- Anti‑leak: domain‑bound tokens, short TTL; optional device binding via a salted extension key.
API Sketch
GET /v1/registry?domain=example.com
POST /v1/wallet/topup { amount_cents, method: 'stripe' }
GET /v1/wallet
POST /v1/passes { domain, scope: 'page'|'site' }
POST /v1/publishers
POST /v1/publishers/:id/selectors
GET /v1/publishers/:id/payouts
Why It Works (Economics)
Assuming $5 RPM baseline ($0.005 per pageview): if ~5% convert at $0.05, publishers earn ~$2.50 from AdSwap + ~$4.75 from the remaining 95% ad‑supported views — totaling ~$7.25 per 1k pageviews. Readers get distraction‑free pages; publishers earn more than baseline.
UX Details That Matter
- Chip states: “Remove ads $0.05” → “Ad‑free for 8h ✅” → countdown → “Extend”.
- Site pass upsell after repeat purchases (e.g., “$1 for the rest of the day?”).
- Privacy‑first: pseudonymous user IDs, no raw URLs (salted hashes), partner‑only by default.
TLDR
I designed a micro‑payments rail that turns ad slots into opt‑out entitlements. The extension mints domain‑bound JWT passes, the publisher snippet validates them to skip ad calls from the start, and Stripe Connect handles transparent payouts. It’s a pragmatic bridge between user experience and publisher revenue!