Stripe-linked score rewards

Protect the pool, reward growth

This plan ties score balances to real Stripe inflows while pacing redemptions so the account stays healthy. Buying, selling, and subscriptions all mint points through the same ledger with reserve floors, daily caps, and cooldowns that prevent drains.

Objectives

Map Stripe to score

Treat Stripe payments and subscriptions as on-ramps for minting points that reflect each member’s contribution.

Guard against drains

Use reserve floors, pacing caps, and cooldowns so no single request can empty the Stripe balance.

Enable buy and sell

Create a clear marketplace where people can purchase score or redeem it back into the pool with approvals.

Data model (Gun-first)

Stripe namespace
Store normalized events under gun.get('stripe').get('events') and customer metadata under gun.get('stripe').get('customers').
Score ledger
Write every award or redemption to gun.get('score').get('ledger') with event ids, customer ids, amounts, currencies, and rule versions.
Aggregates
Cache pool totals per currency at gun.get('score').get('totals') for quick UI reads.

Earning rules

One-time payments

Mint 10 points per net dollar (configurable) with currency multipliers and round down to avoid over-awarding.

Subscriptions

Add a recurring monthly bonus after invoice.payment_succeeded, capped to one bonus per period.

Referrals

Mirror 10% of the subscription bonus to the referrer when customer.referrerPub is present.

Redemption & anti-drain guardrails

Reserve floor

Lock 35% of the Stripe balance as untouchable reserve before any payout is approved.

Pacing caps

Limit daily unlocks to 10% of available funds or a fixed ceiling per currency, whichever is lower.

Cooldowns & approvals

Enforce 7-day waits between user withdrawals and require dual approvals for requests over $500 equivalent.

Buy, sell, and price score

Buying score

Checkout sessions tagged with userPub mint points from the payment amount and log to the ledger.

Selling score

Redemption requests sit in score/redemptions until reserve, pacing, and cooldown checks mark them approved.

Marketplace pricing

Publish live pointValue per currency at score/pricing, net of a 2–5% sustainability fee.

Stripe webhook handling

  1. Verify signatures with STRIPE_WEBHOOK_SECRET and deduplicate by event id.
  2. Update Stripe customer metadata and normalize payloads into stripe/events.
  3. Mint points using earning rules, write ledger entries, and refresh score/totals.
  4. Persist lastEventId on each Stripe customer node for replay protection.

Incentives to grow the pot

Growth multipliers Tiered referrals Rollover rewards

Publish weekly inflow growth bonuses, award larger referral shares as more active subscribers join, and grant compounding boosters for members who defer redemptions to keep the shared pool growing.

Next steps

  1. Ship the signed Stripe webhook route that writes normalized events into Gun.
  2. Implement the scoring service that updates the ledger plus score/totals with reserve and pacing checks.
  3. Expose pool totals and redemption eligibility inside points and rewards dashboards.
  4. Tag subscription creation flows with userPub metadata so monthly bonuses post automatically.