Trading

Premia allows users to trade European style options (ERC-1155) with multiple sources of liquidity.

Overview

Options are represented as an ERC-1155 token in a wallet which allows any EOA or contract address to easily trade, transfer or exercise (settle) the option.

While all options settle within their respective pools, it’s possible to interact with multiple sources of liquidity for the same option. Users will have easy access to the best quotes from each source. There could be up to 4 sources of liquidity for a given option:

  1. Orderbook
  2. RFQ System
  3. Vaults
  4. External Protocols / Third Parties

Interacting with the CLAMM and Orderbook / RFQ System can be done directly via the IPool interface while Vaults and External Protocols would involve directly corresponding with their contracts or interfaces if not available on the Premia Interface or Premia v3 SDK.

REMOVE Concentrated Liquidity AMM (CLAMM)

Traders (takers) on the Premia Blue exchange can receive a quote to buy (sell) an option from liquidity providers in an option pool at the given quote price using 'getQuoteAMM'. If the taker deems the quote acceptable, they can trade the option and pay (receive) a premium and receive the long (short) option contract in the form of ERC-1155 tokens.

The trade function has 3 inputs: 'size', 'isBuy', and 'premiumLimit'. The size parameter refers to the order size, 'isBuy' is a boolean to signify trade direction, and 'premiumLimit' is used for slippage control. If an order trades beyond the 'premiumLimit', i.e. the average execution price of a buy (sell) order is above (below) the 'premiumLimit', the transaction will revert.

The difference between a pool’s current 'marketPrice' and 'getQuoteAMM' in the 'IPool' interface is the price impact of a potential trade. This is a function of market liquidity and order size, where more a higher ratio of order size to existing liquidity will result in a higher price impact and vice versa.

It is possible to pay/receive premium/collateral for an option in the token of a user’s choice. This requires the user to define their swap parameters in the form of calldata, which will enable the swap to be executed on-chain before or after the necessary action to convert a token. The 'swapAndTrade' and 'tradeAndSwap' functions on each AMM pool can be used to facilitate this feature. More details can be found in the 'IPool' interface within the Contract section.