Inspiration
Around hour nine our team stopped arguing about our project and started arguing about whether a GPT wrapper was going to win Hack the North. Nobody changed their mind. Everybody was certain. It was the most engaged we had been all night.
That argument needed a price. So we built a prediction market for the hackathon itself, then looked down at the badge Hack the North handed us. It is shaped like a Game Boy, it has a D-pad and A and B buttons, and it runs Lua. Putting a market only in a browser tab felt like a waste of that.
What it does
Goosey is a live play-money prediction market for Hack the North. Every hacker gets 1,000 feathers and trades YES or NO on questions about the weekend.
- Will a GPT wrapper win Hack the North?
- Will there be a reported goose attack?
- Will Jesus Christ return at Hack the North?
Prices move with order flow, markets resolve against written rules, winners get paid, the leaderboard updates.
It runs on three screens. Laptop, phone, and the badge on your lanyard. The badge app is not a status display, it is a full trading client themed as a Game Boy: green monochrome palette, compact two-card market list, real four-hour sparklines, whole-percent probabilities, live volume and close times, and a header showing your linked handle next to your actual balance. Same account, same ledger, same money as the web app. Walk up to someone, show them the screen, and take the other side of their opinion from a device clipped to your chest.
Live at https://getgoosey.vercel.app/
How we built it
Next.js 16, React 19, TypeScript, Prisma, Recharts, Vitest, Playwright. Plus a Rust program on Solana and a Lua client on the badge.
Two trading engines. Thin markets price through an LMSR automated market maker, because a question with four interested traders has no counterparty and a traditional book leaves all four staring at nothing. Deeper markets run a real central limit order book: one canonical YES price book where buying NO is a sell at the complement, deterministic price-time matching, fills at the resting maker's price, and GTC, IOC, FOK and post-only. A single bid and ask can mean four different things depending on intent, including minting or burning a fully collateralized YES and NO pair. The matcher is a pure function that reads no clocks and touches no database, which is the only reason we could test it against randomized order flow at 3am.
Integer money. Every value is an integer count of milli-feathers. One contract pays 100,000 of them. No floating point touches money anywhere. Every mutation is a balanced double-entry journal posting, and npm run reconcile walks the journal against every account and market aggregate. Resolution needs three different admins: one creates the market, a second proposes the outcome, a third approves it. Settlement runs in resumable batches under a lease so a worker dying mid-payout cannot double-pay anyone.
On Solana. We wrote and deployed an Anchor program, goosey-exchange, with an SPL feather mint, program-derived mint authority, per-market vaults, 256 market-local seats, and enrollment that binds a wallet to an identity digest with per-wallet and campaign-wide claim caps.
The part we did not plan for
Saturday afternoon, a price moved in a way no news justified.
A hacker had noticed that our probabilities respond to order flow and that order flow was cheap. They ran a master account that took a side, then twenty follower accounts that copied the same trade to walk the price, then sold the master position into the probability their own sockpuppets had manufactured. Nineteen accounts. Handles like test11 through test20, which is how we caught it.
It was a good attack. An automated market maker has no counterparty to refuse a trade, so twenty coordinated accounts move a price exactly as well as twenty real opinions. We fixed it live, in three parts.
Shut the door. Registration now requires a single-use, expiring invitation consumed in the same transaction as account creation, issued one per eligible participant, which ties an account to a human holding a physical badge instead of to an email anyone can mint. The welcome grant posts once per account through a unique journal entry, only after email verification.
Unwind it. We replayed the market's entire LMSR history with the bot trades removed so every legitimate position and cost basis stayed consistent. The catch: we had changed the quote arithmetic mid-hackathon, so replaying old trades through new math would have moved real fills by one milli-feather. The replay reproduces the exact arithmetic deployed at the moment each trade executed, anchored to two immutable trade IDs. One milli-feather is a rounding error. Quietly rewriting somebody's fill is not.
See it next time. Cursor-paginated admin audit logs filterable by actor, action and time, with CSV export neutralized against spreadsheet formula injection, and HMACed rate limit keys that fail closed.
The double-entry ledger read like over-engineering until it was the thing that let us surgically remove nineteen accounts from a live market without touching anyone else's trades.
What we learned
A market with fake stakes still attracts real adversaries. Somebody built a twenty-account sybil ring for imaginary currency because the leaderboard was real to them. Identity, audit logs and a reversible ledger are not polish you add later, they are what makes a market a market.
Constraints beat freedom. Designing inside 320 by 240 pixels forced decisions we then copied back into the phone and desktop layouts.
What's next
Move the exchange lifecycle fully on chain, open market creation to the community with verification the community can audit, and take the badge client wireless.
For now: will a goose attack someone before Sunday, will the wrappers prevail, and who finishes the weekend with the most feathers.
🪿 https://getgoosey.vercel.app/
Built with: Next.js, React, TypeScript, Rust, Anchor, Solana, Lua, Python, Prisma, PostgreSQL, Zod, Recharts, Vitest, Playwright
GitHub: https://github.com/aryan-cs/goosey
Will Goosey from UofT win it all and dab on stage? Stay tuned to find out!
Independent project, not affiliated with the University of Waterloo, Hack the North, or Kalshi. Feathers have no cash value.
Built With
- lua
- python
- react
- solana
- typescript
Log in or sign up for Devpost to join the conversation.