Exploring 1-click looping with MYSO v2 — Access leverage with no liquidations!

Diving into the topic of looping and how MYSO seamlessly integrates a built-in atomic single-transaction mechanism to access leveraged Zero-Liquidation Loans

Denis | MYSO
MysoFinance
5 min readJun 28, 2023

--

The MYSO v2 testnet is currently live here: https://testnet.myso.finance/

As mentioned in previous Medium posts, MYSO v2 represents a mass overhaul of Zero-Liquidation Loans in terms of capital efficiency, scalability, ease-of-use, and flexibility. We’ve made numerous upgrades on both borrowing and lending, enhancing accessibility for DeFi users of all experience levels.

If you’ve been playing around with the v2 testnet and have looked through the testnet guide + mainnet user guide, you’d have noticed that one selection of the borrowing flow available for several pairs is 1-Click Looping.

While some users have heard of this term, what exactly can it enable you to do, and how does this mechanism function in the v2?

Let’s dive in below 👇

Standard looping process…

To put it plainly, looping is the process of pledging some collateral token on a lending pool and borrowing another token, swapping this borrowed token for your original collateral on a DEX, then pledging it again on the same lending pool — this process is done continuously, or ‘looped’, until desired leverage on the underlying is acquired.

Typically, this strategy is executed when you are bullish on the collateral you are pledging and want additional exposure to its potential gains or to capture the spread between the borrowing/lending rates.

This process is usually quite tedious and requires significant operational overhead to pledge collateral, swap, re-pledge, etc. In addition, achieving maximum possible exposure is quite difficult and you must incur additional gas costs and fees on every individual swap.

With MYSO v2, this changes completely

We’ve created a built-in, atomic single-transaction mechanism to maximally loop and lever up on any available token as efficiently as as possible with no liquidation risk, all with just one click!

This can be done by selecting that you want to loop/fold in the 1-Click Looping box of the borrowing flow, which allows you to maximally lever up on your exposure to your pledged collateral token. The amount of leverage you can access depends primarily on the Loan-to-Value (LTV) ratio for the loan quote you’re interested in taking on — for example, with an LTV of 90%, you can theoretically access up to 10x leverage on your underlying (less slippage, DEX fees, etc.).

Let’s go over how you’re able to bypass the tediousness of looping manually by making use of MYSO’s atomic one-click looping mechanism:

Say you are pledging 200 RPL and want to access max leverage on your RPL exposure against rETH. Simply make sure the 1-Click Looping field is selected and choose an appropriate loan quote that matches your risk preferences. Depending on the LTV of the given quote, you’ll be able to access different amounts of leverage.

Let’s say our loan quote allows us to access approximately 4x leverage on our RPL exposure. To execute the full looping process with 1 click, the MYSO v2 looping smart contract:

  1. Executes a flashborrow of ~6.79 rETH (loan token) from the appropriate lender vault from which the quote is sent out from
  2. Swaps this flashborrowed rETH on a DEX (e.g. Balancer, Uniswap v3, etc.) to ~807 RPL
  3. Pulls the pledged 200 RPL collateral from the borrower to the looping contract
  4. The looping contract now has the ~807 RPL that has been acquired from the DEX, as well as the pledged 200 RPL collateral from the borrower. It then sends these two amounts back to the lender vault and the vault now has ~1007 RPL for the borrower to reclaim if they were to repay the borrowed ~6.79 rETH (+ interest) prior to expiry.

This whole process is done atomically and in a single transaction, allowing for minimal overhead in the looping process for the end-user. As described above, the looping smart contract interacts with the lender vault, a DEX, and the borrower on the backend to produce the maximum leveraged position for the borrower.

This process is also more efficient in terms of fees — if a borrower would want to loop manually, they would have to incur additional gas fees and DEX/slippage fees on every single transaction. Having to loop manually is also quite tedious and requires significant operational overhead to pledge collateral, swap, re-pledge, etc. —for example, it would take over 19 iterations of this process to achieve ~5x leverage on a given token at 80% LTV!

Visualization of leverage for iterative manual looping vs. 1-click looping

With MYSO’s 1-click looping mechanism, users can maximally lever up in just one single transaction, allowing them to loop with only a single fixed fee (one DEX/slippage fee, MYSO protocol fee, and any upfront fee set by the lender).

It’s important to note that while it only takes 1 click to maximally loop, there is still a multi-step process under the hood that interacts with lender vault, a DEX, and the borrower. This means that slippage and MEV losses are possible, and it is important to understand how to properly set the ‘slippage’ parameter. With tighter slippage you can attain higher leverage, but there is a possibility that the transaction will revert and you will lose out on gas if it is too tight — on the other hand, if you raise your slippage tolerance, you will have a higher transaction execution probability but run the risk of higher slippage losses due to MEV losses/frontrunning.

Finally, the amazing thing is that the in-house looping mechanism presents no additional risk to lenders and actually promotes greater capital utilization from provisioned liquidity as borrowers may be more inclined to lever up due to the limited operational/financial overhead of the looping process with MYSO!

Lever up with ease on mainnet

One-click looping with MYSO v2 simplifies the process of looping and allows users to gain leverage on their underlying exposure with absolutely no liquidation risk!

Borrowers can now access leverage without the hassle and additional costs of having to loop manually, which we see as a huge bonus for users that are bullish on their collateral and want to be as efficient as possible in securing levered gains.

You can try out looping with MYSO on the v2 testnet here: https://testnet.myso.finance/

We are excited to share more about the groundbreaking functionalities of MYSO v2 and are looking forward to the mainnet launch 👀

Let’s take Zero-Liquidation Loans to the forefront of DeFi!

Website | Twitter | Discord | Telegram

--

--