Inspiration

Prediction markets give good prices, but they're awkward to bet with friends on. If you want out early, you need a buyer in the order book. On thin markets there often isn't one, or the spread costs you a lot. If you bet a friend privately, nothing settles until the result is in, and someone has to hold the money.

I started this hackathon building something else: an escrow vault that paid out on a signed verdict. While building it I noticed that the interesting part wasn't the final verdict. It was the price on the way there. If two people share one pot and the market price says what each side is worth, then either of them can leave at any moment, with nobody on the other side of the trade. That idea turned into HonorCat.

How it works

Each side's share of the pot is simply the market's price. If the market says 56% and the pot holds $2, the YES side is worth $1.12 and the NO side $0.88. As the price moves, the two shares move with it, and they always add up to the whole pot. Either player can leave at the current price, or both can wait for Gemini's final result.

Perps add leverage. Instead of the full range from 0% to 100%, the two players pick a short range around the current price, called a rope, with a post at each end. Say the price is 50% and the posts are at 40% and 60%. Each player puts in only what they could lose within that range. Because the range is short, a small price move changes each side's share a lot: here, a 10-point move up doubles the YES side's money. If the price stays past a post for 30 seconds, the rope ends and the side on the other end takes the pot.

Nobody borrows anything. Both players put in their worst case before the rope starts, so the pot always holds exactly what it can pay. There are no margin calls, no liquidations and no debt.

How I built it

  • Contracts (Solidity, Foundry) on Arc. Pots, ropes, perps and groups all hold USDC, which on Arc is also the gas token. Funding a pot or paying it out is a single transaction, and every transaction carries an Arc Memo saying why it happened.
  • Prices. Three independent samplers read Gemini's order book and each signs its own 30-second average price. A contract on Arc checks the signatures and takes the middle value. An exit is priced over the 30 seconds after you ask, so nobody can use a stale price from their screen.
  • Onboarding. Players sign in with a passkey (Face ID or fingerprint) that controls a smart account. A Circle wallet sends their transactions and pays the gas, so a new player never sees a seed phrase.
  • Live updates. QuickNode Streams pushes contract events to the app within seconds, with a backup poller in case it misses any. A worker on Render runs two samplers and the relay loop. The third sampler runs on a separate machine.
  • App. Next.js on Vercel, built phone-first and installable as an app, with Neon Postgres for storage.

Challenges

  • Price manipulation. With leverage, someone might try to push a thin market a few points just to win a pot. To make that a losing trade, a pot can never be bigger than a quarter of the contracts Gemini has on offer close to the current price. Moving the price would then cost more in trading than the pot could ever pay out.
  • Price jumps past a post. If the price jumps far past a post, the rope still pays out at the post, which slightly favours one side when the price is near 0% or 100%. I measured this with a backtest and kept it small: ropes end at least 2 hours before the market closes (when most big jumps happen), posts are at least 5 points from the price, and leverage is capped.
  • Thin markets. When Gemini's spread is too wide, the samplers don't give a price at all. Exits then wait and the funds stay safe. A wrong price would be much worse than a short delay.
  • Making it simple for a newcomer. Passkeys, gasless transactions, fees shown in cents and plain receipts ("You left at 74.5% and received $7.40") took as much work as the contracts did. I measured the result: a new player on a phone can go from landing to being paid out in under two minutes.

What I learned

  • Requiring both sides to put in their worst case up front removes most of the hard problems. Without debt, a whole class of risks never comes up.
  • Writing down honestly what still has to be trusted made the design better. The three samplers are still trusted and haven't put up any money they could lose, so making them stake something is next.
  • Arc's sub-second finality and USDC gas are what make 30-second price windows and one-minute group batches practical.

Built With

Share this project:

Updates

Submission history