-
-
Rightful: one claim per verified PayPal account, AI triage a person decides, and a payout ledger PayPal keeps a copy of.
-
In a $2M settlement, Rightful cuts claim farms from $600,000 to $48,025 and lifts each real claimant from $400 to $631.91.
-
A guided tour walks you through the live app step by step: “Hey, nice to see you!” No sign-in needed.
-
The administrator’s console on a synthetic $2M settlement: held groups and where the money goes, scored against the truth.
-
The attack on a timeline (Bryntum Scheduler): groups sorted by the AI’s fraud probability, each claim when it was filed.
-
One group up close: who shares what (buildings, networks, inboxes) and the AI investigator’s memo, facts computed in code.
-
Every claim in one AG Grid table: search, filter, export, and jump from any claim to its group’s memo and decision.
-
An assistant files over MCP (live response): the claim stays unbound until its person signs in with PayPal. It can’t be paid.
-
The person checks the claim their assistant filed, then confirms it. Payment can only go to the PayPal account that signed in.
-
A real $1.00 sandbox payout’s receipt: the chain of proof from the payout to the ledger root, PayPal’s record and drand.
-
Verified in the browser: the ledger, PayPal’s records, drand’s BLS signature and the audit sample all check out.
-
PayPal’s own transaction history agrees with the ledger, read through the PayPal Server SDK generated by APIMatic.
-
How it works: the money path from a claim to a payout anyone can check.
Inspiration
When a class-action settlement or a mass refund opens, a fixed pool is split over every valid claim, so every fake claim is taken from a real person. Claim farms know it. Reuters reported a payment processor's count of more than 80 million settlement claims with signs of fraud in 2023, up over 19,000% since 2021; one settlement drew 6.5 million claims of which about 110,000 were valid, and in another, nearly 5,500 claims came from a single IP address. Administrators are left paying the fraud or freezing everyone while they investigate, and real claimants wait.
Settlements already pay people through PayPal. We wanted PayPal to be the identity check and the proof too: one verified account, one claim, paid only to that account, with a ledger anyone can check. And as AI assistants start doing people's paperwork, we wanted them to be able to file a claim for someone without ever being able to collect it.
What it does
Rightful is a claims and payouts service for settlement administrators and merchants running refund or recall programs.
- One claim per verified PayPal account. Claimants sign in with Log in with PayPal. Rightful reads the verified status and the payer ID, seals the payer ID (AES-256-GCM), and shows the program only a per-program pseudonym, so a second claim from the same account is refused and two programs cannot link the same person.
- Agents can file; only people get paid. An assistant can file over an MCP server or the JSON API (OpenAPI 3.1). It has no tool to confirm, decide or pay: the claim stays unbound until its person signs in with PayPal and says "yes, this is mine".
- Rings are held, not paid. A deterministic detector groups claims that share devices, inboxes, buildings, networks or a scripted story. An AI investigator answers three typed questions per group; every fact in its memo is computed in code, and a person decides. Held is not denied: a claimant can ask a person to look again.
- The ledger comes first, and PayPal keeps a copy. Before any money moves, every payout is sealed into a Merkle root that names a drand round still in the future. Every Payouts batch and payment note carries the ledger's digest.
- Paid to the account that signed in, by PayPal Payouts to
PAYPAL_ID, after a Balances check; every payout is then found in PayPal's Transaction Search history, and verified webhooks trigger a read-back. - Anyone can check it in their browser: the root, PayPal's records, drand's BLS signature and the audit sample nobody picked.
Each real claim gets an equal share of the pool, in integer cents:
$$\text{share} = \left\lfloor \frac{\text{pool}}{n_{\text{approved}}} \right\rfloor \qquad \frac{\$2{,}000{,}000}{5{,}000\ \text{(pay everyone)}} = \$400 \quad\longrightarrow\quad \left\lfloor\frac{\$2{,}000{,}000}{3{,}165}\right\rfloor = \$631.91$$
On our $2M demo program, paying every claim sends $600,000 to claim farms; with Rightful it is $48,025. Judges can run that whole program, decisions included, with no sign-in, and follow a guided tour at https://rightful-web.onrender.com/tour.
How we built it
- PayPal: Log in with PayPal (verified status, payer ID); Payouts v1 to
PAYPAL_IDwithsender_batch_idandPayPal-Request-Ididempotency, the ledger digest inemail_messageand every itemnote, and paged read-back; Transaction Search and Balances through the PayPal Server SDK generated by APIMatic, integrated with APIMatic's Context Plugin from a contract sheet; webhooks verified withverify-webhook-signature, stored once per event ID and only ever triggering a read-back. Sandbox only, enforced in the client. - AI: TypeSafe Jev answers typed questions (a probability, a pattern from a fixed list, a 0–4 strength) about a case file with stand-in labels: no names, emails, addresses, IPs or PayPal IDs reach the model. Answers are validated, recorded and replayed, so judges and CI need no key.
- Agents: an MCP server (Streamable HTTP) and an OpenAPI 3.1 contract generated from the same zod schemas; a test fails if either drifts.
- Integrity: Merkle inclusion proofs, drand quicknet with BLS verification in the browser, an audit sample ranked by \( \mathrm{HMAC}(\text{randomness}, \text{digest} \,|\, \text{leaf}) \), and the same ledger code bundled into the web app.
- App: TypeScript end to end, Hono, React + Vite, Postgres (PGlite locally), Bryntum Scheduler for the attack timeline, AG Grid for the every-claim table, deployed as one Render Blueprint (web service, static site, cron job, Postgres, secrets).
- Quality: 70 tests and evaluation gates run in CI and before every deploy.
Built by one developer working with AI coding assistants; every money and safety rule is in reviewed, tested code.
Challenges we ran into
- Making the AI unable to invent things. A memo a person acts on cannot contain a fact the claims don't support, so the model only answers typed questions, every answer is validated, and a fixed rule (not the model) turns answers into a recommendation.
- Not punishing families. Households share a laptop and a router; dorms share a network. The detector needs a strong core before weak links count, the investigator's main job turned out to be clearing innocent groups, and held claimants can tell a person what the signals miss.
- Proof outside our own database. A root we store ourselves proves little, so the digest goes into PayPal's own payout records, and we reconcile against PayPal's transaction history.
- Sandbox realities: Log in with PayPal refuses
localhostreturn URLs, and webhooks and transaction history lag by hours, so payouts are confirmed by reading them back.
Accomplishments that we're proud of
- An assistant can do all the paperwork and still has no way to be the payee.
- Every claimant can check, in their browser and in their own PayPal account, that their payout is in a ledger committed before money moved, and PayPal's history agrees.
- A judge can run a whole $2M program, from the attack to the audit, with no account and no key.
What we learned
The model is most useful when it is least trusted: typed answers, validated, recorded, replayable, and never the one who decides. And PayPal identity is a better anti-fraud primitive than most heuristics: one verified account, one claim, paid to that account.
Honest note: the fraud numbers come from our own synthetic generator, with rings and look-alike real claimants of several kinds; they measure the system against that generator, not real fraud. Real money paths run in the PayPal sandbox with $1 payouts; the $2M demo's payouts are simulated.
What's next for Rightful
- Pilots with claims administrators and merchant refund or recall programs.
- Re-offering undelivered payouts to their claimants, and purchase proof from PayPal's own records for merchant refunds.
- Multilingual claim pages and cross-program ring signals that share no identities.
Built With
- ag-grid
- apimatic
- bryntum
- drand
- github-actions
- hono
- log-in-with-paypal
- mcp
- merkle-tree
- node.js
- openapi
- paypal
- paypal-payouts
- paypal-transaction-search
- paypal-webhooks
- pglite
- postgresql
- react
- render
- typesafe
- typescript
- vite
- zod