Source: Photo by cottonbro studio

Looping — An Intro

Berk Orbay
DataBulls
Published in
5 min readJul 16, 2024

--

On-chain financial instruments can be designed in a lightning fast and automated nature. It is a property we are not much used to, at off-chain instruments. Flash Loans were such an example, giving you unsecured loans and asking you to pay it back in less than 30 seconds. Looping is another one; providing leverage by perpetual borrowing, swapping and lending. This one is also a bit mind boggling, therefore brace yourselves.

Looping is said to being used since as early as 2017, as borrowing markets are established at MakerDAO. Some report that, it is possible to get as high as 60–65% annual yields. There are also actual examples of individuals getting handsome returns. More than half of the volume of some exchanges are due to these leverage strategies.

It is a leveraged way to go “all in” in an asset. A good, step by step example is given in this source. I am going to reiterate the examples. You will also find some explanations about “collateral” and “leverage” at the end of this post, if you ever need to refresh the memory.

Looping

Looping is a way of getting leverage through crypto markets. It is possible to borrow other assets by putting your assets as collateral. The amount of collateral is defined by a ratio called LTV (loan-to-value).

The example states maximum LTV on ETH (Ethereum) as 82.5% which means if you can borrow assets equivalent to 0.825 ETH for each 1 ETH you put as collateral. Here goes the rollercoaster. Suppose 1 ETH = 1000 DAI (another token).

  • Put 1 ETH as collateral (or “lend it”) and borrow 825 DAI.
  • Exchange 825 DAI for 0.825 ETH
  • Put 0.825 ETH as collateral and borrow 680 DAI
  • Exchange 680 DAI for 0.680 ETH
  • ….loop it more and more!

Before you know it, you have 1 + 0.825 + 0.680 = 2.505 ETH using only 1 ETH, (but you are also short 1505 DAI). What can go wrong? You are rich!

What can go wrong?

  • Suppose ETHDAI parity is distorted in DAI’s favor, then your collaterals (1 ETH and 0.825) get liquidated quickly.
  • Normally borrowing costs are greater than lending costs (otherwise it is a perpetual money making machine). The main reason many do looping is to collect “rewards”, which mainly consist of platform utility tokens which are expected to go up in the future. This calculator shows an example of returns.
  • Beware the friction. Transactions cost money here as in the real world. Too many operations would mean accumulating costs.

Flash Loans - A better way of looping?

Briefly revisiting Flash Loans, it is an unsecuritized loan (i.e., you don’t have to put collateral) which has to be paid back almost immediately (i.e., at the end of the blockchain block calculations). The process is as follows

  • Get a flash loan of 800 DAI, convert it to 0.8 ETH
  • Add 0.2 ETH from your account. Put 1 ETH as collateral and borrow 800 DAI
  • Pay back your flash loan of 800 DAI.

Now you are long 1 ETH and short 800 DAI using only 0.2 ETH and minimal amount of transactions. You don’t need to be doing all the looping steps thanks to flash loans.

Conclusion

Getting leveraged was never easier outside of perp trading for retail investors. But with great leverage, usually comes Gambler’s Ruin.

Looping’s main advantage is an outsized return of fringe benefits in the currency of rewards, bonuses and platform tokens. During highly volatile times, the markets can be pernicious to the trader’s balance.

There are other technical risks such as contract weaknesses, hacking possibilities but it is a general risk of doing business in on-chain markets.

Remember, this one is only a brief intro and there are numerous sources and services to learn about looping. Happy looping!

Notes

Leverage

Leverage, in terms of functionality and simple way of explanation, is an amplifier of returns (both negative and positive). For instance, an insane multiplier of 100 times leverage means that 1% increase in your favor will give you a handsome return of +100%; but a 1% decrease will wipe you out (-100%). Hence the asymmetry; you can always turn from earning to losing, but you cannot come back from losing everything. For more information check Gambler’s Ruin.

What is collateral?

Collateral is an amount that you lock in to cover for the losses you may incur (plus the fees & commissions), during your transactions. Suppose you are short selling a stock (say, $STOCK) at 10$ per share, 100 shares. Suppose your estimates say that $STOCK will be worth 8$ in a couple of days. If it happens you will borrow $STOCK sell at 10$, for a total of 1000$; repurchase it at 8$, for a total of 800$. You would be profiting 200$ from short selling (minus the borrowing costs).

But if $STOCK becomes 12$ then you would be at a loss of 200$ (plus the borrowing costs). You will need to be able to provide proof that you can cover the losses. Therefore, exchanges would like you to put in some collateral. Say, in this case borrowing costs are 0 and required collateral is 200$. So, the moment $STOCK hits 12$, the exchange liquidates your collateral to buy back the shares. The lender will get their 100 shares of $STOCK back intact, but you will be 200$ poorer. On the other hand, if you were right ($STOCK is 8$ scenario); your return would be 100% because you put 200$ collateral and earn 200$ in profits.

If not for the collateral, the exchange (or the lender) would have to bear the losses in the case of your delinquency. That’s why collateral is important. Collateral is the main component of leverage.

More…

--

--

DataBulls
DataBulls

Published in DataBulls

We write to bring the right information, to make it accessible to everyone.

Berk Orbay
Berk Orbay

Written by Berk Orbay

Current main interests are #OR and #RL. You may reach me at Linkedin.