Inspiration

When we started college with our friends, we kept daring each other to do things. They weren't wild stunts, just everyday, relatable stuff. Who could pull more all-nighters? Who would actually work out more? Who actually went to class? And when someone swore "I'm not going out this weekend," would they really stay in?

Those little bets kept us accountable and made the grind of college more fun. But they lived in group chats, got forgotten in a day, and nobody ever paid up. We wanted to give that energy a real social home with real stakes: a place where your friend group can challenge each other, prove they followed through, and settle it fairly.

What it does

Ante lets friends stake USDC on each other's habits. You create a circle with your friends and open a bet, either head-to-head or a pool of up to ten people. Everyone posts photo proof in the app during the period. When the period ends, a result is reported, and then the circle gets a dispute window: if someone thinks a result is wrong, the group votes, and a strict majority can uphold or overturn it. Winners then claim their share of the stake directly from the program.

There's no house edge and no platform fee. It's just you, your friends, and your follow-through.

How we built it

  • Smart contract: a Solana program written in Rust with Anchor. It handles escrow, disputes, and claims, and runs on devnet for this prototype.
  • Testing: LiteSVM for fast local program tests that never touch a cluster.
  • Backend: a Node.js API with PostgreSQL and Prisma, which handles bets, circles, photo checks, and dispute voting.
  • Auth: Sign-In With Solana-style messages, verified with tweetnacl.
  • Mobile app: Expo (React Native), mobile-first with a web preview. It supports Phantom, Solflare, and Backpack wallets through Wallet Adapter and Mobile Wallet Adapter.
  • Privacy: photos stay off-chain, and the on-chain result only stores a hash.

We used a claim model for payouts: instead of the program pushing funds out, each winner withdraws their own share. That kept the on-chain logic simpler and safer.

Challenges we ran into

Splitting money fairly down to the last unit. USDC has 6 decimals, so every payout has to be a whole number of base units. If a pool of ( S ) base units is split among ( w ) winners, each winner gets

$$ \left\lfloor \frac{S}{w} \right\rfloor $$

which leaves a remainder of ( r = S \bmod w ) units. We couldn't just lose that dust or let the program round it in someone's favor. We decided the earliest ( r ) participants each receive one extra base unit, so the total paid out always equals the total staked, exactly.

Our test environment rejected our own program. LiteSVM 0.10 refused the SBPF v3 binary that anchor build produces by default, so our tests failed even though the code was fine. We spent a while convinced our escrow logic was broken before tracking down the real cause. In the end we built an SBPF v2 binary just for tests (ANCHOR_BUILD_SBF_ARCH=v2 anchor test) and kept v3 for devnet deploys.

Making disputes trustworthy. A betting app between friends only works if everyone trusts the result. We designed the dispute flow so only circle members outside the bet (or assigned judges) can vote, and a strict majority is required. If no majority forms, everyone gets refunded instead of someone winning on a technicality.

What we learned

We learned how to design on-chain programs where every unit of money has to be accounted for, and how important it is to think through edge cases like remainders, ties, and missing votes before writing code. We also learned that "social" features are really about trust: fairness rules mattered just as much as the tech. And we learned that sometimes a failing test isn't a bug in your code but a mismatch in your tooling.

What's next

We want to add more goal categories beyond habits, group-wide challenges, and better photo verification. Before any real-money launch, we'd also get a legal review, since staking on outcomes can be regulated.

Built With

Share this project:

Updates

Submission history