Optionism

Optionism is a permissionless platform to write or buy options of derivatives based on a wide range of assets market, like equities, commodities, fx. It uses PythNetwork Pull oracle prices + Gelato Web3 Function to cash-settle option contracts on derivatives products.

Superhack 2024Shipped August 2, 2024Prize winner#infra
Visit Repo
Optionism banner

About

This project is a decentralized options trading platform that allows users to write and subscribe to options contracts based on the price movements of various assets, similar to traditional finance (TradFi) options. This target two kind of user: - The writer ( Who publish the option ) - The buyer ( Who buy a share of the option contract )

Writers can create call or put options, selecting a strike price and other parameters, while buyers can subscribe by paying a premium. Upon expiration, a Gelato Web3 function automatically resolves the contract by pulling price data from Pyth (off-chain) via the Hermes REST API. The outcome is determined based on the direction of the option (call or put) and the final price of the asset. Only cash settlements are made, as the platform deals solely with derivatives and not the underlying assets themselves. This is helpful if you have no easy access to options in the real world.

Thanks to Pyth Network, Optionism can access pulled data from a wide range of categories: crypto, equities, commodities, forex, rates, metals in the most accurate way.

How it's made

The core of Optionism is its smart contract, where all key operations take place. Publishers can write options by depositing collateral to cover potential losses, and buyers can subscribe to them directly on-chain by paying the Premium Cost. When a share is purchased it mints a 1155 token to the buyer allowing shares for secondary trades.

However, to automate the process, the platform leverages the Gelato Network's Web3 functions to constantly monitor and handle options that have just expired on contract and need for a price update. Gelato pulls off-chain price data from Pyth Network API, processes it, and sends the valid input to the gelatoCallback() function within the smart contract. This function then updates the Pyth's prices on-chain, resolving the option by comparing the current price with the previously established strike price. If strike price isnt met the stake is returned to the writer, otherwise the gains are calculated by the ratio and made claimable to the subscribers.

The application is built using Next.js. Additionally, a dedicated Subgraph is integrated to facilitate seamless data retrieval.

What could i do as an addition:

Locking big amount of money for a long period of time isnt' worth it. If i had more time i would have integrated a way to invest these money into some protocol to extract value from long term options.

Prizes

  • Blockscout · Use Blockscout Block Explorer! · Use Blockscout Block Explorer!
  • Pyth · Most Innovative use of Pyth pull oracle (Price Feeds) · 2nd place

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Bear Market

A protocol that uses oracles to create synthetic, yield-bearing stock options based on stablecoins