UMA LSP contract: a simple option tool

Through LSP, it is possible to create arbitrarily complex derivatives with homogenized long and short positions, and there is no need for users to actively carry out position management.

UMA LSP contract: a simple option tool

Too long to see : UMA has constructed a new contract template called Long Short Pair (LSP). Although this contract is simple, it is powerful and can be used to build a series of new products.

LSP is very simple in design (only about 300 lines of code!). But it can create arbitrarily complex derivatives with homogenized long and short positions, and does not require users to actively manage positions.

Next, I will introduce the design of LSP and why we are so optimistic about it.

How LSP works

As mentioned above, LSP is very simple. The user can perform three main operations.

  • Long and short positions for the new casting token pair.
  • The long and short token pairs are repaid before the contract is settled .
  • After the contract is settled, the positions represented by the long and short tokens are settled . Long and short tokens can be exchanged for a certain amount of pledge, depending on the settlement price of the contract.

At any time, the minter can pledge a certain amount of assets ( collateralPerPair) to mint a short token and a long token. At this time, the caster is fully pledged, and the position is risk-neutral. Regardless of the settlement price of the long and short tokens, the sum of the two values ​​is always equal to the total value of the pledge. This means that the cast who will always be able to repay one pair of long and short tokens to redeem a pledge to close the position.

When users mint long and short token pairs, these two positions offset each other in terms of risk exposure. Only when users sell long tokens or short tokens will one-way risk exposure arise. As a result, its counterparty has gained one-way risk exposure.

When it expires, the LSP will request a settlement price from UMA’s Optimistic Oracle (OO), and then use the price returned by OO to determine the value of each long token and short token. In the contract, expiryPercentLong  represents the collateral ratio between long tokens and short tokens. The position settlement function is shown in the figure below:

UMA LSP contract: a simple option tool

It’s that simple! Unlike UMA’s EMP contract, the caster does not need to worry about liquidation caused by price fluctuations of synthetics or pledges. Unlike other information input mechanism solutions in this field, LSP does not integrate a complex or high-cost real-time price push mechanism on the chain, but puts prices on the chain at one time through a trust-free and anti-manipulation method .

for example

Let’s take a look at how to use LSP to create covered call options.

  • The minter minted 100 ETHc3000–0721-Long and 100 ETHc3000–0721-Short tokens by staking 100WETH. The amount of collateral required to mint one-to-long-short tokens is determined by the collateralPerPair  parameter of LSP  . Then, the minter deposits all long and short tokens into AMM (Automatic Market Maker) and becomes a liquidity provider.
  • Trader A bought 10 long tokens at a unit price of 0.05 ETH. If the price of ETH at maturity is higher than $3,000, Trader A has the right to buy ETH at a price of $3,000.
  • Trader B bought 10 short tokens at a unit price of 0.95 ETH.
  • The mint decided to close the remaining positions, so he took out his liquidity, and then called on the LSP contract to  redeemdestroy 90 long tokens and 90 short tokens, and redeem 90WETH. She does not need to obtain the on-chain price, because each long/short token pair can redeem at most collateralPerPair.

On July 30, 2021

  • If the settlement price of ETH is 3600 USD (in-the-money), each long token is worth 0.2 WETH.
UMA LSP contract: a simple option tool
  • Trader A earns 0.15 WETH for each long token, and settle can get 2 WETH by calling it on the LSP contract  . In the contract, the price is set according to [collateralPerPair * expiryPercentLong].
  • expiryPercentLong  is a financial product library of UMA used in LSP contracts to execute covered call option conversion based on the price returned by UMA Optimistic Oracle.
  • The value of each short token (1- expiryPercentLong) or (1- the long token’s price), in this case, is 0.8 WETH. Trader B loses 0.15 WETH for each short token, calls and burns settle 10 short tokens on the LSP contract  , and obtains 8 WETH.
  • The mint did not lose any collateral, because ta sold long and short token pairs at a unit price of 1 WETH from the beginning. At the time of settlement, the total value of each long-short token pair is always equal to the value of each pledge.

Use cases for LSP

Although the LSP contract itself is simple, it has a wide range of application scenarios.

  • rangetoken: As mentioned in the previous article, the first use case of the LSP contract is to create rangetoken. Rangetoken is a convertible bond used to diversify the DAO treasury.
  • Binary options (binaryoption): LSP’s long and short token pairs are applicable to binary options products, including prediction markets and insurance products.
  • Linear dividend contract: some early community ideas-speculate on the ratio of CeFi and DeFi transaction volume in July, the monthly transaction volume of Uniswap and SushiSwap, and the actual monthly rate of return of DeFi assets.
  • Covered call options: Covered call options using UMA’s EMP contract have been launched. Using LSP helps simplify the design of the product and tokenize short positions.

Synergy with Optimistic Oracle

UMA’s Optimistic Oracle has been launched to provide customized price feeding services for a variety of products. It can return deterministic information about anything in a trust-free manner, and is resistant to manipulation, and can act as a settlement mechanism for LSP contracts.

LSP contracts help unlock the potential of OO. Developers can combine LSP and OO to build traditional/long-tail products.

For example, Optimistic Oracle can provide price information for the following scenarios:

  • Ethereum’s monthly gas price
  • The market value of BTC as a percentage of the total market value of cryptocurrencies
  • Indexes of the 10 most frequently discussed stocks on r/WSB
  • Customized agreement KPI
  • SPACE-X rocket launch insurance (!!!)

If you want to learn about other OO and LSP use cases, you can check these tweets-1, 2, 3.

Next step plan

The LSP contract and price conversion library are currently being audited by OpenZeppelin and will soon be deployed on Ethereum L1 and Polygon.

As we mentioned in the previous article, UMA will use the LSP contract to launch the first range token for UMA tokens in the next few weeks. In addition, our partners are also looking forward to using LSP contracts to launch their own derivatives, KPI options and structured products.

If you are interested in using our LSP contract for development, please be sure to read our documentation and join our Discord. If you have any feedback or questions, please contact us, thank you!

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/uma-lsp-contract-a-simple-option-tool/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-07-07 09:18
Next 2021-07-07 09:19

Related articles