Tokenized European Style Options
The Tokenized Options Protocol is a 100% fully collateralized European hybrid.
Overview
There are a lot of pain points with the current Psy American protocol when it comes to developing structured products on top. Short vol products are quite simple because there are no actions that the caller program needs to take towards expiration. When looking to develop long vol products, the caller program must monitor, and handle exercising. Finally, there is a pain point when trying to auto-compound because of the use of a two asset system.
The goal of this protocol is to alleviate those pain points by:
Using a single asset throughout all transactions by having the strike price be determined by an oracle. This allows DOVs (Decentralized Option Vaults), and other products to seamlessly auto-compound the assets used.
Auto exercise by locking in the PnL using the oracle at expiration. Users can now come back years later and still claim their exercised value.
Improved efficiency where the option holder does not need to put any assets up to exercise when in the money. This improves the ease of developing more complex DOVs, other than short vol (CALL/PUT selling) Vaults.
Allow fractional contracts. This allows anyone to write or trade contracts no matter what capital they have on hand. It also allows DOVs to maximize the capital controlled.
The options will be represented as SPL tokens and traded over the OpenBook order book.
Developer Resources
Instruction Set
Initialize Underlying Pool
Initialize a program wide pool for an underlying asset (e.g. SOL, wETH, wBTC, etc). This instruction uses a PDA to ensure there is only one pool per asset for the entire program.
Initialize Stable Pool
Initialize a program wide pool for a stable asset (e.g. USDC, USDT, UST, etc). This instruction uses a PDA to ensure there is only one pool per stable asset for the entire program.
Init Expiration Data
Create a new ExpirationData account. ExpirationData accounts are used to lock in the index price of an asset at expiration time.
Update ExpirationData
This is necessary because Pyth may stop supporting price feeds as certain addresses when they upgrade. If there is a long tenor option that could be detrimental.
Only allowed to update the oracle addresses.
Create new EuroMeta
This instruction is used to create a new EuroMeta account, which stores data for the creation of a CALL and a PUT for a given expiration, asset, and strike.
Mint Options
The caller must put up 100% of the underlying to write a contract.
Validate the EuroMeta is not expired
Transfer the writer’s underlying assets to the underlying_pool
Calculate the number_of_tokens (Option and Writer tokens) to mint based on the amount of underlying put up.
Mint number_of_tokens OptionTokens to the writer
Mint number_of_tokens WriterTokens to the writer
Close Options
Burn an OptionToken and WriterToken to unlock the underlying assets. This instruction can be called an anytime no matter whether the EuroMeta is expired.
Burn amount of OptionTokens
Burn amount of WriterTokens
Calculate underlying to return: amount * underlying_per_contract / 10^TOKEN_DECIMALS
Set Expiration Price
permissionless instruction that locks in the price at expiration.
Validate the EuroMeta has expired
Validate that the current time difference between clock and expiration is less than the previous locked in value. This ensures that the cranks can lock in the asset price as close to expiration as possible.
Gather and set the price_at_expiration from the oracles
Settle Expired Writer
Allow option writers to settle their positions post expiration. The user must specify the amount of WriterTokens to burn (can be fractional).
Validate the EuroMeta has expired
Validate the price_at_expiration is set
Burn the WriterTokens
Calculate how in the money the option was and the profit for the option holder (denoted in the underlying asset)
Transfer underlying_per_contract - option_holder_profit to the writer
option_holder_profit = (price_at_expiration -strike_price)/price_at_expiration
Settle Expired Option
A holder of an OptionToken can call SettleExpiredOption to claim their profits from the option the held. If the option settled out of the money the token is simply burned. The user must specify the amount of OptionTokens to burn (can be fractional).
Validate the OptionMarket has expired
Validate the price_at_expiration is set
Burn the OptionToken
Calculate how in the money the option was and the profit for the option holder (denoted in the underlying asset)
Transfer option_holder_profit to the option holder
option_holder_profit = (price_at_expiration - strike_price)/price_at_expiration
Initialize OpenBook Market
Initialize a new OpenBook permissioned market.
OpenBook permissioned markets instructions
Add the entry for the OpenBook permissioned markets instructions
Close EuroMeta
Close the EuroMeta account.
Validate the EuroMeta is expired
In the money?
Validate that the OptionToken Mint and WriterToken Mint have a supply of 0
Out of the money?
Validate that the WriterToken Mint has a supply of 0
Last updated