What inspired me
Insurance makes households choose between fast and right. Parametric insurance is fast: a storm hits, a data feed crosses a threshold, and money moves. But the threshold isn't the house. A flood can wreck a home while the gauge down the road stays under the trigger, or the gauge can trip while the home is fine. Traditional claims get the house right, but the family waits weeks for an adjuster, a report, and a check.
ProofPay keeps the speed and fixes the trigger. The payout math lives on Solana, so the amount is set before anyone argues about it. The trigger is a licensed adjuster who actually walked the property. When their report meets the policy terms, USDC leaves the vault in seconds, or is held for review on large claims.
A person confirms the damage. Code pays the claim.
What I learned
Program-derived addresses remove the key from the equation. A PDA is an account a program can sign for without anyone holding a private key. ProofPay's vault authority is a PDA, so no key sits on a laptop waiting to be stolen. Funds move only when the program's rules pass.
The chain is the source of truth. The Storm Ready discount takes 20% off the premium only if the wallet's on-chain badge says it was earned. A checkbox in the browser is not a credential. Sign-in follows the same rule: Phantom signs a message, the server verifies the signature, and the session lives in an httpOnly cookie. There's no password, and the server never trusts what the page claims.
Knowing what not to put on-chain matters just as much. Damage photos never leave the adjuster's browser. The chain stores only a hash, which is enough to prove later exactly which evidence a claim relied on, without publishing someone's home to a public ledger.
How I built it
ProofPay is one Anchor program (proofpay) and one Next.js app.
The program
The program holds the config, adjuster licenses, policies, claims, a mock USDC vault, and the Storm Ready badge. Coverage comes from a catalog of four policies. Storm Shield is the demo policy: flood and wind, a $500 deductible, and a $15,000 cap.
$$ \text{payout} = \min(\text{damage} - 500,\ 15{,}000) $$
Any payout over $10,000 is held for review instead of paid instantly.
The app
- Landing page that introduces the product
- Separate sign-in for customers and adjusters
- Claims desk where households file and track claims
- Field desk where adjusters submit inspection reports
- Coverage shop with a streaming assistant that can only recommend policies from the catalog. Checkout accepts a Visa test card or USDC, and the server then opens the policy for that wallet.
- Storm Ready, two short scenarios (Flash Flood and Hurricane Warning). Completing one earns the wallet a badge. Completing both with a score of [X] or higher cuts the premium 20%. The deductible stays the same.
Challenges I ran into
The local chain
The program was loaded into the validator [at genesis with --bpf-program], which made it non-upgradeable. Every program change meant wiping the ledger and reseeding. Program and mint addresses had to stay stable across those resets, or the frontend and the chain drifted apart. [I fixed this by reusing fixed keypairs for the program ID and mints.]
The browser
Wallet-adapter, Anchor, and Next.js disagree about what can run on the server. The client had to use Anchor's browser build, or the page crashed during server rendering.
Sign-in had a similar trap. A Secure cookie is correct over HTTPS but silently dropped on http://127.0.0.1, so the demo lost every session. The fix was to set Secure only when serving over HTTPS.
The product itself
An early training module was a 3D flood drill. It fought the headless browser, and more importantly, it was the wrong demo. Storm Ready replaced it: five cards per scenario, a timer, a score written on-chain, and advice drawn from public preparedness guidance rather than safety tips invented by a model.
Two kinds of users
Customer and adjuster sign-in started as one page switched by a query string. They needed to be separate rooms. /login is for households. /login/adjuster verifies that the wallet holds an active adjuster license before opening the field desk.
Built With
- anchor
- grok
- next.js
- phantom
- react
- rust
- solana
- spl
- stripe
- tailwindcs
- typescript
- usdc
Log in or sign up for Devpost to join the conversation.