---
# System prepended metadata

title: Options - Architecture and Roadmap

---

# Options - Architecture and Roadmap

###### tags: option
*If you have missed our previous articles, refer to our [first](https://hackmd.io/ZyLNUMd7RTSMzGUEc5QmEg), [second](https://hackmd.io/5uXL-HC3SDe0yWhYC76CTQ) and [third](https://hackmd.io/-_-plATFRNOt_bw4sGwfyQ) one to find out on the workings of the option protocol* 


In our final article of the series, we will be giving a high level overview on the architecture of the smart contracts and also the direction that the plan for this option protocol. Feel free to jump straight to [this section](https://hackmd.io/NP3mZQLUS2CvIHThQev6Wg?both#Plans-down-the-road) if you would like to skip the technical details and would just like to know on the directions and plans for this option protocol. 

## An Overview of the Smart Contract Architecture
![optionPool](https://user-images.githubusercontent.com/60590919/168230797-2b08b2d4-937c-40d7-81fa-132ad96a34a2.svg)
<span style='font-size:0.8em; font-style: italic;'>Uml diagram of options. (Click [here](https://user-images.githubusercontent.com/60590919/168230797-2b08b2d4-937c-40d7-81fa-132ad96a34a2.svg) to enlarge) </span>

The diagram provides a high level view of how the smart contracts are being structured. For simplicity, only the core option logics are being included here. Refer to [this svg](https://user-images.githubusercontent.com/60590919/167111872-dd978a46-975e-4446-9264-451866fd6dbb.svg) for a complete uml of the entire option protocol.

The core of the option pool lies in the `OptionPool` abstract contract which will be inherited by either `CallOption` or `PutOption` This will mean that most of the logics for call and put option are the same except for how profit is being calculated. (ie. Call option needs to expire above the strike price to profit while put option needs to expire below the strike price to profit). The `_profitOf` override will be responsible of this calculation.

Also, whilst both types of option may have the same underlying asset, the token that is used to stake, buy and profit from is different. 

In a WETH call option, the user will be staking and paying for premium in WETH. Profit will also be paid out in WETH. On the other hand, in a WETH put option, user will be staking and paying in stablecoins (eg. USDC, USDT...). The profit in this case will also be in terms of the stablecoin.

A `Facade` contract will act as a convenient interface for users to buy and unlock contract. It is not essential to the general workflow of the protocol.

Finally the `OptionErc20` contract will be used to represent options owned by users. Each option of specific expiry and strike price will have their own `OptionErc20` as mentioned [here](https://hackmd.io/5uXL-HC3SDe0yWhYC76CTQ#Make-it-Trade-able). `OptionErc20` will also contain accounting information such as `totalLockedAmount` and `totalPremium` which will be withheld as long as the option hasn't been unlocked. 

The ability to transfer, mint, burn are also carried out from `OptionErc20`. Transfer and mint can only be carried out when the option has not expiry.

As all options will inherit the same logic, it will be deployed using [Minimal Proxy](https://eips.ethereum.org/EIPS/eip-1167) pattern to save on gas fees.

## Plans down the road
This option protocol is a research effort brought to you by the [Birthday Research](https://birthday.dev/) team. It will be first deployed on [Binance Smart Chain (BSC)](https://www.bnbchain.world/en/smartChain) in its alpha phase for a period of 3 months. To attract user activities, the Birthday Research team will prefund the protocol with [liqudity mining rewards](https://hackmd.io/-_-plATFRNOt_bw4sGwfyQ#More-Rewards). Keep an eye on the official launch date which will be announced soon!