Coder Social home page Coder Social logo

otp's Introduction

(Open) Option Trading Protocol - OTP

Roadmap

MVP

  • underwrite a CALL option with collateral
  • ability to buy a share
  • option settlement at expiry (european options)
  • scheduled worker to settle options
  • testnet launch

Future

  • underwrite a PUT option with collateral
  • scheduled/automatic settlement

option symbol convention

Based on Options Clearing Corporation (OCC) Option Symbology Initiative (OSI) but taking into account the proposed format limits:

  • OSI quote currency is implicitly USD, in cryptocurrency space we need to be open for the future where USDC, USDT, BTC can be quote currencies
  • OSI max quote values for the option asset is 99999 in quote currency, that means BTC above 100k is not supported
  • OSI year format is expressed with 2 numbers, which make it impossible to express options of year 2100 and beyond
  • OSI base asset cannot be expressed with numbers

Proposed symbology

<TICKER, all uppercase>-YYYYMMDD-<C|P>-<#K###|###U####>

examples:

  • BTC_USD-20220811-C-26K1000
  • BTC_USD-20220811-P-25K3500
  • BTC_USDC-20220811-P-25K3500
  • BTC_RNBC-20220811-P-184K8000
  • APT_USD-20220811-C-6U0000
  • APT_USD-20220811-P-4U9000

For more info about OSI, search for "OPTIONS SYMBOLOGY INITIATIVE IMPLEMENTATION" by OCC at feb 3, 2010.

unix timestamp to date conversion algo

Similar protocols

useful move libraries

Relevant links

Glossary

VAA - Verifiable Action Approval, a proof that the message has been signed by the majority of the guardians (validators) of wormhole

DOV – DeFi options vault

Liquidity - efficiency or ease with which an asset or security can be converted into ready cash without affecting its market price

Liquidity (in crypto) - the ease or rapidity with which one can buy or sell a digital asset close to its market price

Option Intrinsic Value – the difference between the option's strike or exercise price and the current market price of the underlying asset.

Option Time Value – represents the extra premium that traders and investors are willing to pay for the option based on its potential to make a profit before the option expires. Time value is influenced by factors such as the time remaining until expiration, the volatility of the underlying asset, interest rates, and dividends if applicable. Time value accounts for the risk or uncertainty associated with holding the option over time.

EMA Price (Feed) – exponentially-weighted moving average of the price. These values are time-weighted averages of the aggregate price and confidence. More details https://pythnetwork.medium.com/whats-in-a-name-302a03e6c3e1

Optimization ideas

  • do not mint option fungible token unit there is a buyer
  • convert timestamp in the option name to date in format 08SEP2023
  • maybe it is better to use u128 for supply_amount for option tokens on creation
  • freeze collaterized asset on the option issuer account instead of transfer it to resource account address
  • extract option object and related fun to separate module european option
  • take into account Pyth price confidence and/or price EMA
  • round strike and premium to USD cents

otp's People

Contributors

dmshvetsov avatar

Stargazers

Max Mohammadi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.