Banner

Decentralizing Dual Investment on Loopring

Summary: Dual investment products are a common product offering found on many CEXs. Taking LRC/USDC as an example, such a product allows users to invest in LRC or USDC, and then to select a target settlement price and a settlement date, locking funds to complete the investment. When the settlement date arrives, the system obtains an ...

Dual investment products are a common product offering found on many CEXs. Taking LRC/USDC as an example, such a product allows users to invest in LRC or USDC, and then to select a target settlement price and a settlement date, locking funds to complete the investment. When the settlement date arrives, the system obtains an index price at the settlement time according to the preset basket price index calculation method. The index price is then used to decide whether to return the user LRC or USDC.

1665285016(1).png

When a user chooses to invest in USDC, it can be thought of as equivalent to expressing a willingness to buy LRC at a low price. That is to say, if the price of LRC reaches the target price, the user is willing to buy it. It is effectively the same as a user placing a limit buy order with the same target price in an orderbook scenario. However, if the index price of LRC is higher than the target price at the time of settlement, the user is not left with nothing (as would be the case with an orderbook buy limit order using the same target price). Rather, what the user ultimately receives is the given product’s annualized income shown at the time of purchase, in this case earning more USDC tokens. On the other hand, if the index price of LRC is lower than the target price at the time of settlement, the user will ultimately receive LRC, equivalent to buying LRC at the settlement price. That is why this action can be thought of as equivalent to the user expressing a willingness to buy LRC at a low price (the settlement price) in the future. Simply put, if the target price is reached, the user will buy LRC at a low price. If the target price is not reached, the user will earn the given product’s annualized income shown at the time of purchase.

719727251914a9d0a659124a67de56b.png

When a user chooses to invest in LRC, it can be thought of as equivalent to expressing a willingness to sell LRC at a high price. That is to say, if the price of LRC reaches the target price, the user is willing to sell. It can also be imagined as an orderbook scenario, in which the user places a sell limit order with the same target price. If the index price of LRC is greater than the target price at the time of settlement, the user will ultimately receive USDC, in an amount equal to the amount they would have received if they had sold LRC at the settlement price. This is why it can be thought of as essentially equivalent to the user expressing a willingness to sell LRC at a high price (the settlement price) in the future. Otherwise, if the index price of LRC is lower than the target price at the time of settlement, the user is not left with nothing (as would be the case with an orderbook sell limit order using the same target price). Rather, the user will earn the given product’s annualized income, in terms of currency standard, in this case earning more LRC tokens. Simply put, if the target price is reached, the user will sell LRC at a high price. If the target price is not reached, the user will earn the given product’s annualized income shown at the time of purchase.

The annualized income of dual investment products is traditionally generated via the CEX system of earning a profit by using the user’s tokens to buy low and sell high. But on Loopring L2, such a system conflicts with the core principles of the protocol, as we have always emphasized that users must always own and control their assets, so the relayer system should not have the right to misappropriate user assets at will. Given this conflict, we set out to understand how we could connect this financial product to Loopring L2 in a decentralized manner capable of maintaining the core principles of the protocol.

On Loopring L2, a user first selects a dual investment product to participate in. The product side will ask the user to sign to confirm the action, which is a buy or sell order priced at the settlement price. When the settlement time arrives, depending on the index price at that time, the Loopring relayer system will choose to either match the user’s buy or sell order, or to unlock the user’s assets and transfer the profits to the user via a L2 transfer.

When the Loopring relayer system receives the user’s dual investment order, it will immediately go to the third-party platform to perform hedging. Loopring has already opened an account on the third-party cooperation platform in advance. Loopring uses its own funds to ensure that its users are not exposed to the various risks associated with third-party platforms. In this sense, the relayer system will act as a market maker, hedging orders, balancing assets, and distributing income between Loopring L2 and third-party platforms. In the future, we will consider introducing a range of additional partners to support more trusted and well accepted earn product offerings with attractive APY incentives that users can choose from.

cc28c80476f5307715f020109f81f37.png

In addition, on centralized exchanges, the USD standard of many wealth management products is settled in USDT. For example, in the trading pair of dual investment products, the other currency is USDT. In contrast, USDC is more popular on decentralized exchanges. How to allow decentralized exchange users to use USDC to invest is also a problem that needs to be considered in the design of Loopring’s products. By assuming the role of a market maker, the Loopring relayer system solves this problem, mapping the USDC invested by DEX users to the USDT of the partner platform, and vice versa.

The core design concept of this mechanism is still to ensure that a user’s assets are always in the user’s wallet address before the product is settled. One caveat that remains is that the distribution of annualized income requires users to trust the Loopring relayer system. Self-operated funds will be used to ensure the distribution of income. Inevitably, there must be a centralized element behind the dual investment product, but we have tried our best to use a decentralized approach to integrate this product on Loopring L2.

I hope everyone likes this product, and we will continue working hard to build the most easy-to-use L2.

About Loopring

Loopring is an Ethereum Layer 2 zkRollup protocol for scalable, secure DeFi and NFT applications. Loopring builds non-custodial, high-performance products atop our L2, including the Loopring Wallet — a mobile Ethereum smart wallet, and the Loopring L2 web app — an L2 orderbook and AMM DEX. To learn more, follow us on Medium or see Loopring.org.

Last Update:

Tags: ,
Link: Decentralizing Dual Investment on Loopring   [Copy]
  • The Bitcoin Halving is Complete! What’s Next? 3 days ago
  • Runes on Bitcoin: The Next Big Opportunity? 6 days ago
  • Uniswap Sued by SEC: What Does it Mean for the Future of DeFi? 11 days ago
  • The Value of Web3 Social, Explained 11 days ago
  • Initiated by Uweb and Waterdrip Capital, "Deep in Labs" announces its DePIN Demo Day 25 days ago
  • You need to login to comment.