Primitive is Live on Mainnet

Primitive
7 min readDec 29, 2020

--

The Primitive Interface home page.

The tokens living on Ethereum are a spectrum of ownership: from art to stablecoins to entire decentralized protocols. These tokens have markets to facilitate swapping, borrowing, and lending, which lay the foundation for the next large markets: derivatives. These decentralized derivative markets allow users to leverage up on ownership and capitalize on the growth of Ethereum.

Primitive is a new protocol that harnesses the power of simplicity to deliver tokenized options for any asset on Ethereum. There are three key features of Primitive:

  • The option tokens do not rely on oracles or admins; they operate independently as immutable smart contracts.
  • Each option is backed by the notional value they hold, eliminating counter-party risk and insuring option holders can always purchase the underlying tokens.
  • There’s no complicated math to price the options or determine parameters: the market decides. Anyone can participate in the option markets to earn the trading fees by simply depositing one asset: the underlying tokens.

The future network of applications leveraging ownership has one common denominator: a permissionless options protocol called Primitive.

This post gives an overview of the feature set of Primitive V1.

ERC-20 Option Tokens

The protocol is used to create smart contracts with an immutable set of parameters that define the rules of the option. Any two ERC-20 tokens can be chosen to be the underlying (the asset being purchased) or the quote (the token used to pay the strike price). Any strike price can be chosen along with any future expiry timestamp. Once an option smart contract is created, there are two tokens which represent ownership: the long and short option tokens. Long option tokens carry the right to purchase the underlying tokens at the strike price, while short option tokens are the tokenized counter-party, carrying the right to claim the collateral or strike price payment.

Oracle-less and Zero Default Risk

Long and short option tokens are minted from a deposit of underlying tokens. The underlying tokens remain in the smart contract until the long option tokens are exercised, or become expired. If the long option tokens expire, the short option tokens can be burned to release the deposited underlying tokens. If the user holding options chooses to exercise them, the underlying tokens are purchased for the strike price. This is called physical settlement, and its a feature with a trade-off between security and capital efficiency. Since the underlying tokens remain locked in the contract, there is no need to have a price oracle. A price oracle would be necessary to determine the payout of an option contract if it was cash settled, but this would increase the surface area of a smart contract significantly. Oracle-less option tokens are more reliable to hold because the underlying tokens are guaranteed to remain in the smart contract: there is zero default/liquidation risk from the counter-party.

Single-asset Liquidity Provision

Primitive has built a novel mechanism on top of the Uniswap Protocol to enable a smooth trading venue for users and developers. That is: users will indirectly swap to long option tokens by borrowing underlying tokens from flash swaps to mint long options!

Long option tokens are the actual options which hold the right to purchase the underlying tokens, these are the tokens users want to buy and hold. However, Primitive does not put these tokens in the Uniswap pool for swapping. The protocol takes a different approach by putting the short option tokens along with the underlying tokens in the Uniswap pool. Users can get pure long option exposure by minting options, keep the long and sell the short.

Providing liquidity is coupled with minting in this way to enable two critical features:

  • Allow users to get pure long option token exposure in some way.
  • Allow liquidity providers to be minimally exposed to option risk, while earning the fees from option trading.

First, liquidity providers deposit underlying tokens, then a portion of the underlying tokens get converted to short tokens (through minting), and finally these tokens are added to the pool. Single-token liquidity provision!

Since short option tokens are minted, long option tokens are also minted, but they weren’t provided to the pool. The wallet or smart contract that provides liquidity will hold the long option tokens, along with their LP tokens. When they want to exit from the pool, the LP tokens are burned to release short options and underlyings. Then, the long and short options are burned to release underlying tokens. All the underlying tokens released are sent back to the liquidity provider, with any fees accrued proportional to their provided liquidity added. Since the liquidity provider is always in control of the long and short option tokens, their option risk is neutral on the initial deposit. Over time, as the ratio of reserves of the underlying and short tokens changes, the LPs will start to accrue either short option exposure or long option exposure. For example, if many options are purchased from the pool, then there will be more short options over time in the pool. This means the LPs are entitled to more short option tokens than they deposited, which implies they gained some short option exposure over time.

Long option tokens can still be purchased indirectly from the pool. Assuming this pool is fairly liquid, the user who wants to purchase long option tokens will borrow underlying tokens from the pool using Uniswap V2 flash swaps, mint long and short option tokens, and then pay back the pool with short option tokens, along with an additional quantity of underlying tokens. This additional amount of underlying tokens is effectively the option premium, the pure on-chain option premium.

Implied Volatility Oracles & Option Premium

Option premiums for Primitive options are derived from the ratio between short option tokens and underlying tokens in the Uniswap pair. No oracle exists during this entire path to the option premium: this is a pure on-chain value. Just as Uniswap pairs can have TWAPs for the tokens in the pair, a TWAP can be built for these option premiums, and thus, an Implied Volatility oracle is born. These on-chain premiums can be used to derive the IV’s of the options.

Flash Exercises

Primitive V1 flash exercises pay out the underlying tokens first and allow any arbitrary code to execute before the exercise payment is received. If the underlying tokens are not paid for, in either the original underlying tokens or the strike price of quote tokens, then the entire transaction reverts, returning all ERC-20 tokens to their original balances before the transaction.

This enables many features, but the best and most simple one is the ability to take profits from exercising options at no cost. This is because the underlying tokens can be swapped for their market value, and then those proceeds can be used to pay for the strike price of the exercise, assuming the options are in the money. Of course, exercising options is usually a losers game because the time-value (also called extrinsic value) is burned. Regardless, these flash exercises enable flash loans to be taken out on the Primitive protocol.

One of the early concerns in the development of the protocol is that the underlying tokens locked in the option smart contract will sit unproductively, doing nothing. With flash loans, these underlying tokens can be used actively in the ecosystem while maintaining zero default risk for option holders. While there are no fees on these flash loans, there could be use cases built around them which benefit the original depositors of those underlying tokens being borrowed.

Launch Details

Primitive V1 has been deployed to mainnet!

The protocol’s documentation, audit report, and user/developer guides are available publicly on notion here.

The open-sourced and free interface to the Primitive protocol is hosted on the primitive.finance domain here.

There is still work to be done to complete this launch, including:

  • Deploying the interface to IPFS.
  • Smart contract audit for the Connector contracts repository.
  • Improving information and analytics on the interface for wallets with many option tokens.
  • Abstracting the use of WETH in the interface so that ETH can be used directly.

This is the beginning.

What’s next for Primitive?

Several upgrades can be made on the core option smart contracts, such as meta-transaction approvals using permit. The core contracts will continue to be researched and improved upon in V2.

The architecture is separated into Core/Helper contracts, just like Uniswap V2. This structure makes it easy to build and improve complex code in state-less helper contracts without migrating actual funds in core contracts. Applications can be built as helper contracts which abstract away complex operations, whether they are intra-protocol, or go beyond and connect to other protocols.

The V1 of the protocol is a proof of concept. Once there is live data and live transactions, it becomes easier to narrow down the set of features most important to users, developers, and liquidity providers. The trade-off space between security, capital efficiency, and ease of use can only be discovered through active use. With that said, we have in mind a few novel approaches to decentralized options that have not been tested yet, including:

  • Dynamically weighted geometric mean markets parameterized to replicate option payoffs.
  • Customized AMM curves that match options better, for example a lower curvature curve for short option<>underlying token pairs.
  • Virtual AMM for margin option trading.
  • Cash settled, synthetic options, for improved capital efficiency (using options as collateral to underwrite other options). For example, multi-leg option strategies can have their collateral netted out.

Join our Community

The Primitive discord wants you to join the discussion. We talk about all ideas related to decentralized options!

--

--