This document outlines the scope of Potion’s smart contracts operational capabilities.
It provides a high level description for how the system has been designed to behave.
Basic description of the system
- Potion v0 is a market maker for put options: it helps sellers (LPs) and buyers find a price for option trades.
- Basic process:
- LPs perform certain mathematical analysis off-chain, to come up with a “premium bonding curve”. These are curves that represent a pricing function that depends on LP pool utilisation.
- LPs create capital pools in the Potion protocol, and can bind the aforementioned bonding curves to them.
- Each capital pool in the Potion system belongs to a single LP. Each pool has its own utilization state, separate from the rest.
- Each pool is associated with a customisable criteria set (a collection of assets, strikes and durations for which that the LP is willing to underwrite put options)
- Options are collateralized using USDC, only if buyers pay the premiums described by the curve when buying an option that matches the pool criteria set.
- When a buyer buys an option, the collateral can come from a single or multiple LP pools. The buyer describes the pools they wish to buy from.
- Buyers discover the cheapest Pools and build their orders using a smart router (off-chain) that inspects all available prices on-chain, and proposes optimal selection of pools according to their curves and current utils. For clarity, this router is out of the scope of the audit.
- Potion relies on Opyn for the collateralisation and settlement of the “otokens” that are Opyn’s on-chain representation of options.
- When a buyer buys an option, they pay a premium to their chosen LP(s), and those LPs send the required amount of collateral to Opyn’s smart contract system, to fully collateralize the options. The buyer is then issued with some oTokens (ERC20 tokens) with their chosen settlement date and strike price.
- Users can mint brand new oToken option contracts with precise strike and duration, or can re-use pre-minted oToken contracts (accepting whichever strike and duration they were minted with).
- Otokens represent European options, and are cash settled on expiry. Once oTokens expire, buyers and LPs can exercise, and withdraw the respective payoff (again, in the stablecoin used as collateral) from the contract.
Architecture
- There is one LP contract holding all collateral for all LPs, and keeping track of the criteria sets and utilizations configured for each pool of capital.
- Users interact with a router to find cheapest available pool of capital.
- When a buyer gets an option, an oToken contract is minted, and collateralized with capital from various LPs.
- There is one single LP contract, and as many oTokens as option configurations minted.
https://lh6.googleusercontent.com/ORiphpQC3Glp_B1za6j8p95oswlGXC6e8d2Ek1ddRZjou0SiOr1OytAcaWer__hOA94XNvontPqod3ES2UmZ9N0RlFckAOmg4VIuvpvPpksforHZj8AAOoNOFSidFa6LvC1GVNx_
Potion LP Pools
-
LPs can create Pools that they control, and that are unique to them. These pools are data structures mapped inside the PotionLiquidity.sol contract.
-
Each LP pool will have its own Pool Utilization (and therefore will be quoting different pricing relative to other pools at different utils or with different curves):
- For $\text{PoolOfCapital}_k$, $\text{Utilization}_k$ is defined as:
$$
\text{Utilisation}_k = \frac{\text{LockedCapital}_k}{\text{TotalCapital}_k}
$$
- LockedCapital is the capital that is actively being used to collateralise oTokens, and which has therefore been transferred to Opyn’s smart contracts.
-
Each LP will have its own Pool Criteria Set, which describes the options that can be collateralised with capital from the pool. Each criteria in the criteria set contains 3 main pieces of data:
- Asset: Defines the underlying assets for which the pool can lock collateral.
- Strike: If strike is set to K%, then this pool will only collateralise options of strike K and below. For example, if Strike criteria is 120%, this means a strike that is 120% of the spot price at the time of purchase. I.e. 20% “in the money” (ITM) at the time of purchase.
- Duration: Like Strike, if criteria is set to Duration d, the pool can use its capital to collateralize options with any duration <= d
-
Because each Criteria Set can contain multiple criteria, the same pool of capital can optionally configure itself to:
- sell multiple assets at once (eg, ETH, BTC, MKR could all be sold by the same pool).
- Sell options at multiple strike percentages (e.g. all of 10% ITM, At The Money (ATM), and 10% Out of The Money (OTM))
Key functionality and system behavior
- LPs can deposit collateral. Once deposited, this collateral can only be controlled by them.