Inspiration
One of the biggest criticisms of blockchain as a store of value is the extreme volatility of asset prices.
Another industry that has this problem is commodities, which has highly volatile prices due to poor harvests, geopolitics, etc.
The Chicago Mercantile Exchange was created as a way for farmers to hedge changes in price with derivatives like futures contracts. I thought it would be fun to build a web3 CME (crypto mercantile exchange) to hedge memecoins with options.
What it does
It’s an options marketplace where participants can buy and sell memecoin options listed by a market maker. A market maker first chooses a memecoin to write put and call options for. The option is then priced using the Black Scholes model and listed on the marketplace (the market maker also funds the smart contract so participants can sell their options back to the contract). Participants can then buy and sell options to hedge their memecoin positions.
How we built it
I used Stacks and Clarity to store options data such as positions, options, and transactions on chain. A python fastapi is used to price options using data from Rebar and CoinGecko. Finally, the market maker and users can interact with the blockchain from the frontend, built with NextJS Typescript
Challenges we ran into
Connecting to devnet from frontend was tricky
Accomplishments that we're proud of
Learning Clarity in a weekend
What we learned
Blockchain is hard. Clarity is pretty cool, a non Turing complete domain specific language for smart contracts.
What's next for Crypto Mercantile Exchange
American Options pricing (instead of only European options). A more market based pricing model instead of mathematically determining prices and setting them with a market maker.
Built With
- clarity
- coingecko
- fastapi
- hiro
- nextjs
- rebar
- stacks
Log in or sign up for Devpost to join the conversation.