Creating Your Own Option

Step 1: Creating your own Option

Navigate to

http://hedge.markets/

Click on create option, then fill in the following

name: The name of the new token.

symbol: The symbol of the new token.

oracle: An oracle that provide price data. For example, you can use the address Scry oracle

0x0000000000071821e8033345a7be174647be0706.

collateral token: The ERC20 token that will be used as collateral. You can use the DAI token which you can mint for free from https://sepolia.etherscan.io/address/0x53844F9577C2334e541Aec7Df7174ECe5dF1fCf0#code…

expiry: The expiry time for the option contract in minutes from now.

strikePrice: The strike price of the option contract.

API: The API endpoint from which the oracle fetches the price data. For example, https://api.exchange.coinbase.com/products/ETH-USD/stats/

API Path: The specific path in the API where the relevant price data can be found. For the Coinbase API, you can use 'last'.

decimals: The number of decimal places in the price data. For the Coinbase API, use 2.

bounties: An bounty for the oracle. A suggestion 0.001 ETH.

Step 2. Wait for oracle to update, mint your option tokens, and manage them as per your strategy.

You can refresh the oracle data using 'update feeds' and 'update price' functions, and after the expiry, refresh request using 'updateFeeds' and 'updatePrice' to be able to redeem. Remember, you can use any APIs or data sources for price data you prefer.

You've now successfully created your own option for arbitrary assets! This allows for advanced financial strategies and interactions to be conducted fully on-chain, even where the asset is not tokenized or not on the network.

Last updated