header-langage
简体中文
繁體中文
English
Tiếng Việt
Scan to Download the APP
Partnered With:

How does UMA's LSP contract allow users to trade options easily?

Read this article in 13 Minutes
The UMA LSP contract makes it easy to create a complex set of derivatives, allowing users to earn money relatively easily without actively managing their asset positions.
原文标题:《 Introducing UMA's Long Short Pair (LSP) Financial Primitive 》
By Sean Brown, Uma

Min Min and A Jian are Ethereum enthusiasts


Too long to watch: UMA builds a new contract template called Long Short Pair (LSP). This simple but powerful contract can be used to build a range of new products.


LSP is very simple in design (only about 300 lines of code!). . But it can create arbitrarily complex derivatives with homogeneous long and short positions, and does not require active position management by users.


Here's a look at the design of the LSP and why we think so much about it.


How LSP works


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


1. Cast token pairs for newly created long/short positions.
2. Repay long/short token pairs before contract settlement.
3. Settle positions represented by long/short tokens after the contract is settled. Long and short tokens can be exchanged for a certain amount of collateral, depending on the settlement price of the contract.

At any time, a minter can pledge a certain amount of an asset to mint a short token and a long token. At this point, the foundry is fully pledged and the position is risk neutral. Regardless of the settlement price of the long and short tokens, the sum of their values is the same as the total value of the pledges. This means that the minter can redeem a pledge at any time by paying back a pair of long and short tokens, thus closing the position.


When users create long and short token pairs, the two positions cancel each other out in terms of risk exposure. Only when the user sells long tokens or short tokens will a one-way exposure occur. It also gives its counterparties one-way exposure.


At maturity, LSP will ask UMA's Optimistic Oracle (OO) for a settlement price, and then use the price returned by OO to determine how much collateral each long token and short token is worth. In the contract, ExpiryPercentLong  Represents the ratio of pledges between long and short tokens. Position settlement function is shown in the figure below:


2


It's that simple! Unlike UMA's EMP contract, the founder does not have to worry about liquidation due to price fluctuations of the finished product or collateral. Unlike other information entry mechanism solutions in the field, LSP does not integrate complex or costly real-time on-chain price push mechanisms, but instead puts prices up at once in a trust-free and manipulation-resistant manner.


For example


Let's look at how to use LSP to create covered call options.


1. The minder minted 100 ETHC3000 -- 0721-long and 100 ETHC3000 -- 0721-short tokens by pledging100weth. The number of pledges required to cast a pair of long and short tokens by LSP & NBSP; collateralPerPair  Parameter determination. The minter then deposits all the long and short tokens in the AMM (Automatic Market Maker) and becomes a liquidity provider.

2. Trader A buys 10 long tokens at A unit price of 0.05 ETH. If the price of ETH at expiration is higher than $3000, Trader A has the right to buy ETH at $3000.

3. Trader B buys 10 short tokens at a unit price of 0.95 ETH.

4. The foundry decides to close the remaining position, draws out its own liquidity and calls it on the LSP contract. To redeem, destroy 90 long tokens and 90 short tokens, and redeem 90 weth. She does not need to fetch the on-chain price because each long/short token pair can redeem the collateralPerPair at most.


On July 30, 2021


1. If the ETH settlement price is US $3600 (within the price), each long token is worth 0.2 Weth.

3


2. Trader A earns 0.15 ETH per long token and calls   on the LSP contract; settle  You get 2 WETH. In the contract, the price is set based on [collateralPerPair * expiryPercentLong].

3. expiryPercentLong  Is an LSP contract that uses UMAFinancial product libraryThe covered call option conversion is set according to the price returned by UMA Optimistic Oracle.

4. The value of each short token (1-expirypercentlong) or (1- the long token's price), which in this case would be 0.8Weth. Trader B loses 0.15 Weth per short token and calls   on the LSP contract; settle  Destroyed 10 short tokens and earned 8 WETH.

5. The Founder did not lose any collateral because he initially sold the long-short token pair at a unit price of 1 Weth. At settlement, the sum of the value of each long/short token pair is equal to the value of each pledge.

LSP use cases


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


1. RangeToken: As mentioned in the last article, the first use case for LSP contracts is to create RangeToken. RangeTokens are convertible bonds that are used to diversify the DAO Treasury.

2. BinaryOption: LSP's long-short token pair applies to binary options products, including prediction markets and insurance products.

3. Linear Dividend Contracts: Some early community ideas -- speculated ratios of July CEFI and DEFI trading volumes, monthly Uniswap and Sushiswap trading volumes, and the actual monthly yield on DEFI assets.

4. Covered call options: Covered call options products that use UMA's EMP contractalreadyonline. Using LSP helps simplify the design of the product and tokenize short positions.

Synergy with Optimistic Oracle



UMA's Optimistic Oracle has been online, providing customized feeding services for a variety of products. It can return deterministic information about anything in a trust-free manner, and is resistant to manipulation, so it 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:


1. The monthly gas price for Ethereum


If you want to know more about OO and LSP use cases, check out these tweets1,2,3.


Next step


LSP contractsandPrice conversion libraryIt is currently being audited by OpenZeppelin and will soon be deployed on Ethereum L1 and Polygon.


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


If you are interested in using our LSP contract for development, be sure to read ourThe documentAnd join us in Discord. If you have any feedback or questions, please feel free to contact us. Thank you!


The original link



Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit