Introducing UMA’s Long Short Pair (LSP) Financial Primitive

Sean Brown
UMA Project
Published in
5 min readJun 18, 2021

tl;dr — UMA has built a new contract template called the Long Short Pair (LSP) contract. This is a simple but powerful contract that enables a suite of new products.

The LSP is simple in its design (around 300 lines of code!) It allows for the creation of arbitrarily complex derivatives with fungible short and long positions and without the need for active position management.

Below is a walk through the LSP’s design and why we’re excited about it.

How the LSP Works

As stated previously, the LSP is simple. There are only three main actions a user can perform.

  • Mint new pairs of long and short tokenized risk.
  • Redeem pairs of long & short tokens before the contract has settled.
  • Settle positions of long or short tokens after the contract has settled. They would be redeemable for an amount of collateral determined by the contract’s settlement price.

At any time, a minter can deposit an amount of collateral, collateralPerPair, to mint one short and one long token. At this time, the minter will be fully collateralized and will have a risk-neutral position. Regardless of how much the long and short tokens respectively settle to be worth, the summed value of the two will still be worth the total amount of collateral used to mint, which means that at any time, the minter can also close out his/her position by redeeming a pair of long and short tokens for one share of minting collateral.

When someone mints the long and short pair of tokens, those two positions cancel each other out in terms of exposure. It is only by selling either the long or short tokens that they get directional exposure. Another user could also gain directional exposure simply by purchasing one of the tokenized sides.

At expiration, the LSP will request a settlement price from UMA’s Optimistic Oracle (OO). The price returned by the OO will then be used to determine how much collateral each long and short token is worth. The proportional split of collateral between the long and short tokens is known in the contract as expiryPercentLong, and the payout function for a position settlement is simply:

That’s it! Unlike EMP contracts on UMA, at no time does the minter need to worry about liquidations because of a move in the price of the synthetic or collateral. Unlike other oracle solutions in the space, there’s also never any need to worry about integrating a complex or expensive real-time on-chain price feed — prices are brought on-chain in a trustless and manipulation resistant manner exactly once.

Numeric Example

Let’s now walk through how an LSP would be used to create a covered call option.

  • A minter deposits 100 WETH as collateral and receives 100 ETHc3000–0721-Long and 100 ETHc3000–0721-Short tokens in return. The amount of collateral needed to mint 1 pair of long and short tokens is determined by the LSP’s collateralPerPair parameter. She deposits them into an AMM to be a liquidity provider.
  • Trader A buys 10 long tokens for 0.05 ETH per token. Trader A now has the right to buy ETH for 3000 USD if ETH/USD is greater than 3000 at expiry.
  • Trader B buys 10 short tokens for 0.95 ETH per token.
  • The minter decides to unwind the remainder of her position. She withdraws her liquidity then does so by calling redeem on the LSP and burning 90 long and 90 short tokens in exchange for 90 WETH. She can do this without an on-chain price because the total maximum payout of any long/short pair is capped at collateralPerPair.

On July 30th, 2021

  • If ETH/USD settles at 3600 (in the money), each long token is worth 0.2 WETH.
  • Trader A has gained a profit of 0.15 WETH/Long, calls `settle` on the LSP contract and receives 2 WETH. In the contract, this price is set with the formula: [collateralPerPair * expiryPercentLong].
  • expiryPercentLong is set by performing a covered call price transformation, using one of UMA’s financial product libraries, on the price returned by the UMA Optimistic Oracle.
  • Each short token is worth (1- expiryPercentLong), or (1- the long token’s price), so in this case, 0.8 WETH. Trader B has a loss of 0.15 ETH per short token, calls settle to burn 10 short tokens and receives 8 WETH.
  • The minter has lost no collateral since she initially sold pairs of long and short tokens for 1 WETH. At settlement, the value of the sum of any long and short token pair will always be worth the initial required minting amount.

LSP Use Cases

Although the contract itself might be simple, the potential applications are vast.

  • Range Tokens: As mentioned in a previous article, the LSP will first be used to create Range Tokens, a convertible debt for DAO treasury diversification.
  • Binary Options: The LSP’s two token approaches intuitively works for binary options products, including prediction markets and insurance products.
  • Linear Payout Contracts: Some early community ideas — speculating on the ratio of CeFi to DeFi volume over July, the Uniswap vs. SushiSwap monthly volume, or the effective monthly yield of some DeFi asset.
  • Covered Call Options: Covered calls using UMA’s EMP contract are already live. Using the LSP will make this design simpler and also tokenize the short side.

Interplay with UMA’s Optimistic Oracle

UMA’s Optimistic Oracle is live and providing bespoke pricing for myriad live products. It can trustlessly return any deterministic information on anything while being manipulation resistant and acts as the settlement mechanism for LSP contracts.

The LSP contract helps to unlock the power of the OO. Developers can combine the LSP and OO to build traditional or long tail products.

For examples, today, the Optimistic Oracle can provide pricing information for:

A few recent Twitter threads about other potential applications of the OO and LSP — 1, 2, 3.

Next Steps

The LSP contracts and suite of price transformation libraries are currently being audited by OpenZeppelin, and will soon be deployed on Ethereum L1 and Polygon.

As mentioned in our previous article, UMA will also use the LSP contract to launch the first Range Token for the UMA token in the coming weeks. Additionally, multiple partners have been building in anticipation of using the LSP to launch their derivatives, KPI options, and structured products.

Developers interested in building with the LSP should read our docs and join our Discord. As always, feedback or questions are welcome and appreciated!

--

--