Inspiration
Options are one of the main tools real traders use to take risk and hedge it, but normal people only see them through legacy broker apps. They only trade during market hours, are region locked, and feel like a black box. At the same time, synthetic equities like xNVDA already trade on Solana 24/7. We wanted to bring a simple options primitive to that world and show what a real on chain derivatives layer can look like.
What xStock Options does
xStock Options is a covered call options protocol on Solana built on xStocks. Holders of synthetic NVIDIA (xNVDA) can lock their tokens into a vault, set a strike, expiry, and premium, and list a covered call. Buyers pay the premium in USDC and get the right to exercise before expiry. If they exercise, they pay the strike and receive the xNVDA from the vault. If the option expires or never sells, the seller can reclaim their collateral.
Everything happens end to end on chain and is enforced by our Anchor program.
How we built it
On the backend we wrote an Anchor program with a single CoveredCall account that stores seller, buyer, strike, premium, expiry, amount, and flags for listed, exercised, and cancelled. The program creates a PDA vault for each option, moves xNVDA into the vault when the option is created, transfers USDC premiums and strike payments with CPI token transfers, and handles exercise, reclaim, and secondary listing.
On the frontend we built a Next.js app that lets users see xNVDA, create options, buy them, and exercise them. The UI calls the Anchor program directly and mirrors the on chain state. We also wrote an Anchor test suite that spins up mints for xNVDA and USDC, creates options, buys, exercises, and reclaims them so we can verify the whole flow.
Challenges
The main challenges were getting the PDA vault seeds and authority right, handling secondary sales without breaking payouts to the correct owner, and keeping the UX simple while we were still wiring up devnet wallets and mints. We also had to be careful with token decimals when calculating total premium and strike payments.
What we learned
We got a lot more comfortable with Anchor account design, PDA authorities, and CPI token transfers. On the product side we spent time thinking about how a regular user would understand a covered call on a synthetic equity and what information they actually need on screen.
What is next
Next steps include adding a proper implied volatility oracle, more strikes and expiries, support for other xStocks like xAAPL and xTSLA, and integrating with an order book or AMM so options can trade more fluidly on secondary markets. Longer term this can plug into prediction markets that want real hedging tools instead of only binary outcomes.
Built With
- anchor
- next.js
- node.js
- react
- rust
- solana
- typescript
- usdc
- xstocks-synthetic-equities
Log in or sign up for Devpost to join the conversation.