Inspiration
A pattern keeps showing up in crypto: people hold what pays them, and they hold it longer when they're paid in something they believe in. Tokens that share fees with their holders, especially in an asset those holders already want, keep attracting loyal communities.
Prediction markets work the other way. You buy a position, then you wait weeks or months, and nothing is paid out until resolution. There's no reason to hold and no reward for conviction.
At the same time, tokenized stocks now trade on Solana next to AMM pools and live price oracles, and together those are enough to build this. So we asked: what if backing a side of a prediction market paid you in the stock you believe in? That became Versus.
What it does
Versus lets traders back there position on one tokenized stock against another on Solana and earn yield paid in the stock they back.
A duel is a head-to-head question with a date on it: "Will Apple be worth more than Nvidia on December 31, 2026?"
- Every side is fully backed by USDC. 1 USDC mints 1 YES plus 1 NO, so a winning token always redeems for exactly $1.
- Each side trades against its own stock. YES trades against AAPLx and NO trades against NVDAx, on Meteora pools that collect fees only in the stock token.
- Holders get paid in that stock. Fees are paid out to each side's holders a few times a day. If you back Apple, you earn Apple.
- Pyth settles it. On the resolution date, the program reads Pyth's Apple and Nvidia prices, computes each market cap, and picks the winner. If you lose, you keep the stock you were paid.
- Anyone can create a duel from three templates: market cap comparison, "A outperforms B", and "A above a price".
How we used Solana
Versus only works on Solana, because everything it's built from already lives there. The tokenized stocks (xStocks, Token-2022) are Solana tokens, trading runs through Meteora DAMM v2 pools on Solana, and prices come from Pyth, verified on-chain on Solana. Our Anchor program, duel, connects them. Each market is a PDA that acts as the mint authority for the YES and NO tokens and is the only signer on the USDC vault, so no private key can move the collateral and USDC can only leave when outcome tokens are burned. Outcome tokens are plain SPL tokens, so any wallet can hold them and any DEX or aggregator can route them. Each side's pool collects fees only in the stock token, which is how backing Apple pays you in Apple with no extra swap. Solana transactions can hold several instructions, so a position is two swaps in one atomic transaction (USDC → AAPLx → YES) with one signature: it either fully succeeds or fully fails. At settlement, the program checks that the Pyth account is fully verified, has the right feed ID and is less than six hours old, and it never reads our own pool prices, so no one can rig the result by pumping a thin pool. The biggest reason is cost. Near-zero fees let us pay holders small amounts of stock several times a day, up to 12 holders per transaction, with every payout capped at what the vault holds. On most other chains, gas would eat the payout.
How we built it
- An Anchor program on Solana called
duel. It handles mint, merge, resolve, redeem and reward payouts, and nothing else. The trading, the pricing and the stock tokens all come from existing Solana protocols, so there's very little of our own code to audit. - Meteora DAMM v2 pools with quote-only fees. That's what lets Apple pay out in Apple stocks with no swap on the payout side.
- Pyth equity feeds for settlement, read on-chain through the Pyth receiver SDK.
- xStocks, which are tokenized stocks (Token-2022), used as the quote asset for each side.
- A TypeScript SDK that turns each prediction side that one may hold into one signature: USDC → AAPLx → YES, done as two swaps in a single transaction.
- A rewards crank that collects pool fees, snapshots who holds each side, and pays them their share on-chain in batches.
- A Next.js 15 web app with a live odds board, a panel that previews the fee and the new odds before you sign, a payout ledger, and a built-in test wallet that needs no extension.
Challenges we ran into
- No oracle publishes market cap. We store shares outstanding in each market and multiply them by the live Pyth price when the market resolves.
- Stock prices stop when the market closes. Pyth equity feeds only update during market hours, so we built in a staleness window and a manual fallback that's only allowed after a public grace period.
- Infrastructure kept moving under us. One of Pyth's on-chain price feed shards went stale mid-hackathon, and Hermes, Pyth's price service, started requiring an API key.
- xStocks don't exist on devnet. We built mock mints and a registry that maps each mock to its real mainnet mint, so going to mainnet needs no program changes.
- Devnet airdrops were rate-limited, so we tested everything end to end on a local validator running copies of Meteora and Pyth cloned from mainnet.
- Solana transaction size limits. Payouts are sent in batches of 12 holders, and the program checks that each batch never pays out more than the vault holds.
Accomplishments that we're proud of
- The core idea works: betting on Apple really does pay you in Apple.
- A one-signature position with two swaps in one transaction, in a UI that shows the fee and the new odds before you sign.
- Collateral and rewards never touch. The USDC backing every payout stays in its own vault, separate from the pools. A stock token being paused can halt trading, but it can't touch the $1 redemption.
- 39 mocha and 10 unit tests passing. The whole flow (choose a side, sell, crank, resolve, redeem) works end to end on a local chain.
- Settlement never uses our own pool prices. It reads outside oracles only, so no one can pump a thin pool to rig the outcome.
What we learned
- Building on existing protocols is a superpower. Meteora, Pyth and xStocks did the heavy lifting. Our job was connecting them.
- Holding a position has to be rewarding before resolution, or people won't hold. Paying yield in the asset people believe in changes how it feels to hold.
- Settlement design matters more than anything. Long resolution dates, outside oracles, and a public dispute window close off the manipulation seen in 5-minute prediction markets.
- Token-2022 is powerful but has sharp edges. Features like Pausable and Permanent Delegate on xStocks have to be disclosed, and the design has to plan around them.
What's next for Versus
- Mainnet launch with real xStocks and USDC.
- Moving more on-chain: LP positions owned by the program, and on-chain reward tracking weighted by how long you hold, replacing today's off-chain snapshots.
- A backup ladder of oracles: Pyth's 24/7 index feeds, then Switchboard, then a timelocked override.
- Fee split enforced on-chain between holders, creators and the platform.
- More matchups: TSLA vs F, SPY vs GLD, BTC vs ETH, SOL vs HYPE.
- A "de-noised" odds number shown next to the raw one, so traders can see through hype.
- Onboarding real traders and scoping an audit.
Built With
- rust
- solana
- typescript




Log in or sign up for Devpost to join the conversation.