About the project
Inspiration
Fitness goals are easy to announce but hard to verify. Creators and everyday goal-chasers often post ambitious challenges, but there is usually no real accountability, no live signal of public belief, and no structured way for supporters to participate.
GainsXchange was inspired by the idea of turning fitness progress into something interactive, measurable, and community-driven. Instead of just liking a post, supporters can back an outcome. Instead of vague promises, users create challenges with deadlines, proof requirements, and market odds.
What It Does
GainsXchange is a fitness prediction market for creators and people pursuing fitness goals.
Users can create public challenges, such as hitting a lift, completing a run, or reaching a transformation milestone. Other users can bet YES or NO on whether the challenge will be completed. As people place bets, the market odds update based on the pool sizes.
The platform uses a pari-mutuel betting model:
$$ T = Y + N $$
If YES wins, a user who bet amount (y) receives:
$$ Payout = y + \left(\frac{y}{Y} \times N\right) \times (1 - F) $$
where (Y) is the YES pool, (N) is the NO pool, and (F) is the fee rate.
For the demo, we also built simulated market activity so judges can see odds move live without needing many real users at once.
How We Built It
We built the frontend with Next.js, React, TailwindCSS, and Solana wallet support. The backend uses Node.js, Express, MongoDB Atlas, and WebSockets for live market updates.
MongoDB stores users, posts, challenges, proof submissions, comments, and cached market state. The long-term settlement layer is designed around Solana, where betting pools and payouts can be handled through program accounts and escrow.
For verification, we built an oracle-style evaluation pipeline that checks submitted proof against the challenge criteria. The system extracts structured signals like confidence, proof quality, effort level, and completion percentage, then uses a calibration model to decide whether the result is clear or should be flagged for manual review.
Challenges We Faced
The biggest challenge was handling subjectivity. Fitness progress is not always binary, and some goals are harder to verify than others. A blurry gym photo should not automatically trigger a payout, so we designed the system to flag uncertain cases for review instead of forcing every result into YES or NO.
Another challenge was syncing fast web app state with blockchain-style settlement. We used MongoDB as a fast read layer while designing Solana as the source of truth for escrow and payouts.
We also had to make the demo feel alive without a full user base, so we added simulated betting behavior to show how odds and pools would move in a real market.
What We Learned
We learned how prediction markets can create accountability around personal goals, but also how important verification and safety are when money is involved.
We also learned how to combine web2 speed with web3 trust: MongoDB and WebSockets make the app responsive, while Solana provides a path toward transparent settlement.
Most importantly, we learned that the product is not just about betting. It is about giving people a public reason to follow through, while letting communities participate in the journey.
What's Next
Next, we want to improve proof verification, add stronger creator profiles, support more challenge categories, and finish deeper Solana integration for escrow and payouts.
We also want to expand the social side of GainsXchange so users can build an audience around their progress, not just around the final result.
Built With
- css
- gemini
- javascript
- mongodb
- mongoose
- next.js
- node.js
- openai
- rust
- socket.io
- solana
- typescript
- xgboost
Log in or sign up for Devpost to join the conversation.