Back to All Projects

FORFEIT - Commitment Contracts with Real Money

Apps2026-02-17
View Code
FORFEIT - Commitment Contracts with Real Money
Next.js 16React 19TypeScriptSupabaseStripeTelegram Bot APIResendUpstash RedisVitest

FORFEIT — Put Skin in the Game

"Commitment contracts with real money. Stake cash on your goals — succeed and get it back (minus 10%), fail and it's gone."

Overview

FORFEIT is a consumer product built on one of the most robust findings in behavioral economics: loss aversion is ~2x stronger than gain seeking. Traditional to-do apps reward you for completing goals. FORFEIT punishes you for failing them. You stake real money (via Stripe); you either hit your deadline and get it back, or you forfeit it permanently.

The product is intentionally lean — a transactional loop that weighs as much as the dollars behind it.

🎯 The Loop

  1. Set a goal — Define what you'll accomplish and by when
  2. Stake money — Put $5 to $500 on the line via Stripe Checkout
  3. Pick a verification method — photo proof, referee, API integration, or honor system
  4. Track progress — Telegram bot sends escalating reminders: 48h → 24h → 6h → 1h before deadline
  5. Verify or forfeit — Hit the deadline + verify within a 48h window → refund. Miss it → the money is gone.

🧠 Why This Works (and Why It's Dangerous)

The psychology

Loss aversion makes a $50 loss feel like a $100 missed gain. Commitment devices (stickK, Beeminder) have decades of RCT evidence for goal completion. FORFEIT pushes this further with real money and no escape hatches.

The risk

You are asking people to risk real money for a product they've never used. Trust, verification integrity, and dispute resolution are existential concerns — not nice-to-haves.

🛠️ Tech Stack

Core

  • Next.js 16 App Router + React 19
  • TypeScript, Tailwind CSS v4, shadcn/ui (Radix primitives)
  • Supabase — Auth, Postgres (with RLS for stake privacy), Realtime for live commitment status

Money

  • Stripe PaymentIntents for stakes (not subscriptions — one-off holds)
  • Webhook-driven state machine with idempotency keys
  • Refunds on success automated via Stripe API
  • payment-success-poller for the 0–30s window before webhook confirmation lands

Notifications

  • Telegram Bot with escalating deadline reminders (48h, 24h, 6h, 1h)
  • Resend for email lifecycle events
  • PWA-ready for web push in a future iteration

Safety rails

  • Upstash Redis rate-limiting on commitment creation to prevent impulse-chaining
  • Zod schemas on every API boundary
  • Vitest + Testing Library + MSW for money-path integration tests

🏗️ Engineering Highlights

Webhook-driven state machine

Every commitment goes through pending → active → verifying → completed | forfeited. Transitions fire only from verified Stripe webhooks with replay protection, so clicking "pay" twice can't create two stakes. Money state is the source of truth, not optimistic UI.

Referee flow

Commitments can be verified by a third-party (coach, friend, accountability buddy) who receives a one-time magic link. They never create an account — they just see the goal, proof, and approve or reject. Designed for zero-onboarding friction on the critical dependency path.

Public accountability (opt-in)

Share your commitment to a public profile with OG-generated share cards. Social pressure is another (optional) layer on top of financial pressure. Currently read-only — cheers, comments, and follower feeds are on the roadmap.

OG image generation

Dynamic share cards rendered at the edge showing goal, stake amount, and deadline — makes every shared commitment a mini-landing page.

📊 Product Audit Insights

I wrote a full 360-degree product & business audit of FORFEIT (shipped in repo as BUSINESS_AUDIT.md) that catalogs 20+ known friction points: the cold-start-to-payment wall, the post-payment webhook dead zone, the referee email deliverability risk, the missing progress check-ins over multi-week commitments. Shipping the MVP is the easy part; getting the emotional arc right is the real roadmap.

💡 Why I Built This

Most habit apps are cheerleaders. They reward you for streaks and guilt you gently. FORFEIT is the opposite — it's a hostile environment where you agree, in advance, to punish yourself. It's not for everyone. But for the goals that actually matter (finish the thesis, ship the product, run the marathon), a cheerleader isn't enough.

Project Gallery

FORFEIT - Commitment Contracts with Real Money screenshot 1
FORFEIT - Commitment Contracts with Real Money screenshot 2