How we built it
- Contract: Pot.sol (Solidity, OpenZeppelin ReentrancyGuard, Arc Foundry). One contract holds many pots. 21 numbered tests from the product brief plus fuzzed invariants: money is never created or lost, and a released pot pays exactly its total. Source verified on Blockscout.
- Wallets: each email maps to a Circle developer-controlled wallet on Arc, created on first use. A treasury wallet tops up gas. Because USDC is both the payment and the gas token on Arc, members only ever hold one asset.
- Live updates: A QuickNode Stream filtered to our contract delivers events to a webhook that writes them to Supabase in an idempotent projection. Supabase Realtime moves every open browser's progress bar. The contract stays the source of truth, and the database can be rebuilt from the chain.
- App: Next.js, TypeScript, Tailwind and shadcn/ui on Vercel, with close to 800 automated tests.
- Process: We split the work into four lanes (contract, wallet, events and data, UI), each in its own git worktree, built with Claude Code and Codex agents. The product decisions and the approved design spec, with its numbered amendments, are committed in the repo.
## Challenges we ran into
- Arc's native USDC uses 18 decimals while its ERC-20 interface reports 6. We pinned the behavior with a test so that $300 in records $300.
- Circle's gas estimation hides revert reasons, so the server simulates every call with viem first to surface the contract's real error.
- Our first live Stream delivery was rejected because our copy of QuickNode's payload format differed from the real one, and QuickNode stopped the Stream after repeated rejections. We fixed the route to accept both shapes and restarted it.
- Email links break when opened in a different browser, so sign-in uses a code typed into the page, with the link as a fallback.
- Hiding crypto without hiding the guarantees: the interface avoids wallet vocabulary but still shows the objection window, the receipt, and what each plan is waiting for.
## Accomplishments that we're proud of
- A full pot lifecycle ran live through the deployed app, with all seven events delivered by the Stream and no replay or manual posting: created, three payments, locked, payout requested, released.
- Three independent contract reviews (a model reviewer, an adversarial Codex review and a separate Cursor security review). The Cursor review found no way for anyone to take funds from a pot, and we documented every finding, including the one we chose not to fix.
- A public, no-login demo with seven sample plans covering every state, so anyone can explore without a wallet or an account.
## What we learned
- Keep the chain as the source of truth and treat the database as a cache you can rebuild. Idempotent event handling made Stream retries and replays safe.
- Simulating a transaction before sending it makes every failure readable.
- On Arc, USDC as the gas token removes most of the onboarding friction for people who don't hold crypto.
- Trust should be something users can read on the screen, not something buried in terms.
## What's next for Pot
- Remove the custody caveat. Today our backend holds signing authority for each member wallet. The contract stops an organizer from taking money early or skipping the objection window, but it does not protect against us. Passkey-based wallets would fix that.
- A v2 contract that closes the limitations we documented: a deadline cap, seat swaps after others have paid, and a stuck payout when the organizer is a smart contract.
- Reminders and notifications, so members don't have to remember to check.
- An independent audit before any real money.
Built With
- arc
- blockscout
- circle-developer-controlled-wallets
- claude-code
- codex
- foundry
- github
- google-oauth
- next.js
- openzeppelin
- postgresql
- quicknode-streams
- react
- shadcn/ui
- solidity
- supabase
- tailwind-css
- typescript
- usdc
- vercel
- viem
- vitest
- zod