Skip to content

Pricing v2: looking is free, trading pays, chat is earned or brought - #823

Open
nategeier wants to merge 8 commits into
mainfrom
feat/pricing-v2
Open

nategeier wants to merge 8 commits into
mainfrom
feat/pricing-v2

Conversation

@nategeier

Copy link
Copy Markdown
Member

Pricing v2 — the take rate is the business; a plan prices house answers and nothing else

Nate: "a cheaper version that helps users learn the platform but doesn't get us killed in inference… keep Stripe subscriptions or focus on the transaction fee… maybe let users add their own inference key", then "ok go for what you think we need to do." Memo with the reasoning and the as-built table: ~/yeetful/PRICING-v2-chart-first.md.

The model

Free Charts, watchlists, alerts, technicals, every trade, DCA, guardian and job: unlimited, forever. 10 house answers a day.
Every trade refills your chat A verified Uniswap swap banks 1 answer per 2¢ of fee. $100 → 10, $1,000 → 100, $1 → 0. Banked answers never expire.
Plus, $9/mo or $79/yr 600 answers a month on top, markets AI without the hourly limit.
Pack, $10 once 1,000 answers, never expire (Stripe).
Your own API key, $0 Every house answer and market brief runs on it. Unlimited, their bill, not ours.
Growth $99 / Scale $499 Retired from sale. Zero subscribers ever. The ids stay valid so no row can strand.

Fees are unchanged (0.20% organic, 0.50% link).

What it closes

Found in the 09-16 audit of what actually burns inference:

  • The free allowance was keyed to the wallet, and a wallet is free to mint. 250 answers per burner. The taste now lives on day windows keyed to the connection AND the wallet; a fresh empty wallet gets a guest's 5.
  • One 2,000-turn fuse gated everyone, so a bot that filled it walled every real user. Now the free lane has its own fuse. A flood exhausts the taste and nothing a person earned or paid for.
  • Three house-model doors were unmetered: the auto-router, the governance turn, and /api/servers/[slug]/lint (no auth at all). One gateHouseAnswer() now fronts all chat doors; a fresh lint needs a session and draws on a fuse.
  • The chat body's walletAddress named whose credits to burn. Plan and bank answers are now spent only for a PROVEN owner (SIWE session or embed key). An unproven wallet with a bank is told to sign in.
  • The signed beacon's valueUsd / buildPath / feeBps are the browser's word. A real $1 swap could have claimed $1M. The grant re-derives both from the chain: to must be one of our Uniswap routers, and the notional is min(claimed, what the receipt shows the signer moved). 250 per receipt, 500 per wallet per day.
  • Markets AI: per-surface daily fuses, IP fence 60 → 30/h, Plus and BYOK lift it.

Measured, not guessed

inference_calls records tokens and priced cost per model call. First numbers from the harness run: 13 house calls, $0.006 total — $0.0003–0.0014 an answer against the $0.03 every allowance had been sized on. Plus went 300 → 600 on that; the maxed-plan rule is pinned at 1.5¢ (10× measured). The planner prompt now leads with its stable half (rules + endpoint menu) and is sent as a cached system block.

Decisions for you (each is a small revert)

  1. Plus at 600 answers. Measured cost would support far more. I held it at 10× headroom until real traffic has a week in inference_calls.
  2. CoW, Hyperliquid and cross-chain fills do not earn answers. No single receipt carries our fee for them. /pricing says so.
  3. BYOK holds users' keys (AES-256-GCM under BYOK_KEY_SECRET, never returned, never logged). The alternative was client-held keys, which breaks embeds and links.
  4. Link caps are gone (3/25/∞ by plan). A wallet nobody has seen trade keeps 10 live; one verified trade lifts it for good.
  5. Not built: the USDC-from-wallet pack (moves real money to the treasury — needs its own design and your yes) and embed hosts earning the creator half.
  6. The planner prompt was REORDERED (menu first). Routing evals were not re-run; they cost real inference. npm run eval:routing before or after merge is your call.

Owner steps

  • BYOK_KEY_SECRET (32+ chars) on Vercel Production. BYOK is OFF and says so until it is set.
  • Optional: STRIPE_PRODUCT_PLUS, STRIPE_PRODUCT_PACK. Without them Stripe creates the product inline at checkout.
  • Archive the Growth and Scale products in Stripe.
  • One real $9 Plus checkout and one $10 pack, to prove the webhook grants.
  • Harness recipe adds TASTE_GUEST_DAILY=1 to the server env (keeps the taste pin to one model call).

DDL

Additive, RUN on TEST and PROD: credit_ledger.pool + grant_key (unique), inference_calls, inference_keys. File: prisma/ddl/2026-09-18-pricing-v2.sql.

Gates

  • tsc clean, npm run build clean.
  • test:api 3142 passed / 2 failed, both on main already: the known router select red, and arc (live) whose pin went stale when Arc's WETH pool got liquidity (A quote is not a price unless the pool can absorb it #820 fixes it). ~45 new pins.
  • HTTP, live: a stamped-IP stranger is served then refused with the doors out; the auto-router answers the same gate; the meter wrote its row.
  • Playwright + Chrome, DPR 2: /pricing dark/light 1440 + 375, /dashboard/plan signed in (mock EIP-6963 + real SIWE) dark 1440 + light 375. 0 horizontal overflow, 0 page errors.

🤖 Generated with Claude Code

nategeier and others added 8 commits September 18, 2026 16:04
…ry model surface

- lib/inference-meter: every direct model call records its real token usage
  and priced cost to inference_calls (fire-and-forget). Turn cost was an
  estimate in a comment until now.
- lib/house-model: ONE Anthropic caller for the chat route + the lint grader.
  The planner prompt now leads with its stable half (rules + endpoint menu)
  and PROMPT_CACHE_BREAK; the house caller sends that half as a cached system
  block (cache reads bill at 0.1x input).
- lib/inference-context: a request-scoped key (AsyncLocalStorage), so a BYOK
  key reaches every call site in the 7k-line chat route. A refused BYOK key
  never falls back to the house key, and never becomes a house-paid x402 call.
- lib/inference-fuse: daily fuses per surface. The free taste lane gets its
  own fuse so a flood can only exhaust the taste, never paid/earned answers.
- markets AI: per-surface daily fuses, IP fence 60 -> 30/h, Plus + BYOK lift.
- /api/servers/[slug]/lint: a FRESH run needs a session and draws on a fuse
  (it was unauthenticated: ~144 runs/day per service, several calls each).
- lib/byok: AES-256-GCM sealed Anthropic keys under BYOK_KEY_SECRET, proven
  with the free count_tokens endpoint before they are stored.
- DDL (additive): credit_ledger.pool/grant_key, inference_calls, inference_keys.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e gate for every house door

- lib/plans: Free + Plus ($9/mo, $79/yr, 300 answers). Growth/Scale retired
  from sale (0 subscribers ever); their ids stay valid so no row can strand.
  TASTE caps, EARN_CENTS_PER_ANSWER, ANSWER_PACK live here.
- lib/billing: the free allowance moves OFF the wallet (free to mint) onto
  day windows keyed to connection + wallet; a fresh empty wallet gets a
  guest's taste. PLAN and BANK draw only for a PROVEN owner (session or embed
  key) — the body's walletAddress could name whose credits to burn before.
  Separate taste/paid fuses: a flood exhausts the free lane and nothing else.
- chat route: one gateHouseAnswer() in front of the manual choke point AND
  the auto-router and governance turns (both unmetered before).
- lib/answer-gate-copy: refusals name what still works and every door out.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A VERIFIED signed receipt banks answers from the fee it paid: 1 per 2 cents
of net fee, no floor (a $1 sybil swap earns 0, a $100 swap earns 10).

The beacon's valueUsd / buildPath / feeBps are the browser's word, so the
grant re-derives both halves from the chain: the tx's `to` must be one of
OUR fee-carrying routers (a send or an approval claiming a swap's build path
earns nothing), and the notional is min(claimed, what the receipt shows the
signer moved). 250 per receipt, 500 per wallet per day, idempotent on the
turn id, never for an internal run, never for an attested (non-EVM) verdict.
Keyed embed turns bank to the HOST, whose pool their visitors chat on.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ecome an abuse fence

- checkout: { plan: 'plus', interval } (month $9 / year $79) or { pack: true }
  ($10 one-time, 1,000 answers). Retired plans are refused. With no Stripe
  product id set, Stripe creates the product inline, so nothing blocks on a
  dashboard step.
- webhook: a PAID pack session grants once (grant key = the session id);
  a store error 500s so Stripe redelivers.
- /api/billing/ai-key: session-only save/prefs/delete for a bring-your-own
  Anthropic key. Proven with the free count_tokens endpoint, sealed, fenced,
  never returned again.
- intent links: the 3/25/unlimited plan caps are gone (links are the growth
  loop). A wallet nobody has seen trade keeps 10 live; one verified trade, a
  paid plan or an admin wallet mints without limit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…odel

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ealing, prompt caching, the three gated doors

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… stays on /pricing, two pins corrected

inference_calls' first measurements put a house answer at $0.0003-0.0014,
not the $0.03 estimate. The maxed-plan rule is now held at 1.5c an answer
(10x measured), which sizes Plus at 600 for $9.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website Ready Ready Preview Sep 18, 2026 3:39pm UTC

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant