
Reel Deal
Relief fund for aquaculture farmers paid in JPYC upon trigger of specific environmental conditions
Demo
About
Reel Deal is a relief fund for aquaculture farmers in Japan. Scallop, oyster and hoya farmers in fishing towns like Kesennuma can lose a whole season's harvest when the sea gets too warm, or when toxin levels are too high and shipping is banned. To protect their income, Reel Deal lets anyone donate to the fund or buy from a seafood marketplace where part of every sale goes into the fund. When public data shows a heatwave or shipping ban has hit a farm, the fund automatically pays the farmer in JPYC.
How it's made
Contracts: Solidity, Foundry, OpenZeppelin v5 on Sepolia. Apps: Next.js 16 LINE mini-app (Drizzle + Postgres) on Railway, and an Astro + Solid.js + Storybook operator dashboard on AWS EC2. Data: Python FastAPI ingesting JAXA satellite sea-surface temperature and Miyagi prefecture toxin-ban notices, with PostGIS for aquaculture plots. ENS (v2): individual plot registries (umi.eth → karakuwa.umi.eth → p1213-001..015). Each season the farmer receives a non-transferable, expiring slot from the coop, and the pool reads it on-chain to know who to pay. World ID: IDKit v4 proofs. Selfie Check for level 1. It stops one person from claiming for too many plots. Caps are 3 vs 12 units per human, and only nullifiers go on-chain. JPYC (Ethereum Sepolia): donations in and payouts out of the ReliefPool. EIP-3009 gasless transfers mean farmers never need ETH. Curvegrid MultiBaas: indexes ReliefPool, HumanRegistry and JPYC events, powers the donor dashboard, and sends an HMAC-signed webhook that triggers the LINE payout message. Jev (TypeSafe AI via OpenRouter): a decision model used as a safety gate for payouts. Unsure triggers go to the co-op for human review, and it can never send money itself. It also routes farmers' LINE messages to fixed templates. Reown: AppKit + SIWE so anyone without LINE can connect their own wallet. LINE: LIFF + Messaging API. A wallet is created automatically when a farmer logs in, and payout notifications arrive as LINE messages. Farmer onboarding flow: add the co-op's LINE account → open the mini-app → LINE Login → wallet created automatically (one per LINE user) → request this season's slot for their plot → licence holder issues the non-transferable "2026" ENS slot to their wallet → verify with World ID (Selfie Check, optionally upgrade to level 2) → wallet bound in HumanRegistry → enrolled for payouts. Payout flow: Donors / marketplace sales → JPYC into ReliefPool → data pipeline sees a threshold crossed → Trigger signed 2-of-3 (pipeline, co-op, science) + Jev check → pool checks ENS slot + World ID → JPYC paid to farmer → MultiBaas webhook → LINE notification. Hacky bits: a fork-mode e2e (bun run e2e) replays the whole payout against a fork of live Sepolia in under a minute. Then we did it for real and paid a verified farmer ¥10,000 JPYC for the 2026 Karakuwa scallop shipping ban.