見出し画像

Alpaca Academy -Research on Increasingly Leveraged Pairs-

Good morning.😊

Last time we featured Alpaca Finance.

Today, we are going to study DeFi with Alpaca master.
I'd like to share with you a story from the Alpaca Academy about how leveraged farming can be profitable even in down markets if used properly.

When you use leverage farming, depending on the pair you choose, the value of the LP may go up, but for some reason you don't make as much profit as you expected.

In other words, if you don't understand the characteristics of the pair, which one you owe, and which one can be profitable if it goes up, you can lose unexpectedly, so today's note is a must.

Okay, let's go!

How it all started

It all started with a tweet from Mr.Medaka. (Thanks!)

I was interested in this, so I read the full original article on Medium.

I read the full article on Medium because I was interested in it, and it was very informative, so I'll give you a quick overview. I've tried to separate the overview from the details as much as possible, so that those who are not interested in details can understand just the overview, and those who want to know more can enjoy the details.

1-(1) What is a short?

"Buying when the price is low and selling when the price is high" are the basics of profiting from trading, and this is called Long.

Shorting is a method of making a profit by "selling when the price is high and buying back when the price is low". It can be said to be the same as the basics of trading, only the order is reversed.

Shorting is a common practice among traders (speculators), for example, in FX (Foreign Exchange Trading), shorting is achieved by "borrowing" the target asset first.

At BSC DeFi, you can borrow major tokens through the Venus Protocol.
This can be used to achieve shorting in the following way.

- First, you borrow 1 BNB.
- Exchange the 1BNB to 500BUSD (sell the BNB)
- When the value of the BNB drops to 400BUSD, exchange it (buy back the BNB)
- Return the 1BNB.
- You have 100BUSD left over, which is your short profit.

Of course, this is fine, but Venus requires about twice that amount of collateral to borrow BNB. In other words, if you want to borrow $10,000 worth of BNB, you need $20,000 worth of collateral, which is less efficient than going long.

1-(2) Leverage Farming of Alpaca

Alpaca's Leverage Farming can also be used for shorting.

In other words, when the BNB is in a down market, you can realize shorting by borrowing the BNB. The way it works is as follows.

When you start a leveraged trade, you borrow an asset (ALPACA / BNB / BUSD / ETH) from the protocol and repay it when you are done.

In Alpaca's LP pool, we create pairs of tokens (ETH-BNB, BNB-BUSD, etc.) in a 50:50 ratio, so if the leverage level you choose exceeds 2x, you are borrowing more assets than you put in.

画像1

Then, regardless of what you deposited, you will need to exchange some of that borrowed asset for the other pair of assets in order to create LP tokens in a 50:50 ratio. A simple example is shown below.

1-(3) Shorting example 1 (condensed version)

- You want to farm ETH-BNB so you add 1 BNB in principal.
- You choose 3x leverage so you borrow 2 BNB.
- You are now holding 3 BNB, but in order to create your LP positions, the protocol needs to convert 50% of that into ETH. Thus, the protocol sells 1.5 BNB (0.5 * 3 BNB), converting it into ETH. You now have 1.5 BNB and ETH worth 1.5 BNB, and can create your LP position at a 50:50 ratio.
- Some time later, when you close your position, although you’re only holding 1.5 BNB, you still owe the protocol 2 BNB. As such, the protocol must buy .5 BNB using your ETH, giving you a total of 2 BNB that you pay back to the protocol.

"Sell first, buy back later"...that's what we had just talking about. This is shorting, the basic reverse order of making a profit in trading.

The amount for this short is 0.5 BNB.

1-(4) Which pair of funds is better to start with?

What happens if I put in ETH instead of BNB as my own funds?

It may seem strange, but it makes no difference whether you use ETH or BNB as your initial type of funds. It makes sense if you think about it, because you exchange your money when you invest it, and it starts as the same LP.

However, there is a difference in the exchange fee, which is slightly lower when you use ETH because you have to exchange less money. (Almost negligible)

When you close your position later, the value is the same regardless of which currency is returned, the only difference is the exchange fee.

画像2

1-(5) Shorting example (Full version)

Let's examine this a little more concretely.

画像3

- You want to leveraged farm the ETH-BNB pool so you open a position, depositing .166 ETH which is worth ~1 BNB.
- You set your desired leverage to 3x.
- When you click Approve and open the position, the protocol lends you 2 BNB(“Assets Borrowed” at the bottom of the image above), which is 2x your principal value of ETH. In this way, your total position is 3x your deposited amount(1 unit(ETH principal) + 2 units (2x the ETH principal in BNB) = 3 units, aka 3x. This is the meaning of leverage level).
- In order to convert your tokens into LP tokens to farm the ETH-BNB pool, they need to be added at a 50:50 ratio. Thus, since you have more BNB than ETH, the protocol will sell part of the borrowed BNB to achieve that. As in the prior condensed example, your position is worth a total of 3 BNB tokens, of which 1.5 need to remain in BNB and 1.5 need to be in ETH. At the moment, since you hold 2 BNB, the protocol will sell .5 BNB for you in order to achieve an even ratio (This is the selling part when you open the short).

1-(6) Ratio of longs and shorts

Now, let's also see how much of the LP position is long and how much is short.

画像4

- The total amount of funds is 3 BNB at the start, which consists of 0.249 ETH + 1.5 BNB.
- For a total of 1.5 BNB worth of ETH (1 BNB worth of your own ETH and 0.5 BNB worth of ETH made with borrowed BNB), you will make a profit if the price of ETH goes up and a loss if the price goes down. This part is Long.
- The 0.5 BNB worth of ETH made by selling (selling first) the borrowed BNB must eventually be exchanged (bought back) into BNB and returned. You will lose money when the price of BNB goes up, and you will profit when the price goes down. This part is Short.
- 1.5 BNB is returned as 1.5 BNB. Since you return what you borrowed without exchanging anything, it has no effect on whether the value of ETH or BNB goes up or down. This part will be Neutral.

1-(7) Comparison: No Leverage

画像5

1-(8) Conclusion - Better to borrow a weaker token!

There are currently 4 types of tokens that can be borrowed on Alpaca Finance(ALPACA, BNB, BUSD and ETH). There are many pools on which these are based. ⇒Reference

・PancakeSwap ALPACA pools ==> Borrowing ALPACA
  BUSD-ALPACA pool

・PancakeSwap BNB pools ==> Borrowing BNB
  CAKE-BNB pool
  ETH-BNB pool......etc

・PancakeSwap BUSD pools ==> Borrowing BUSD
  BNB-BUSD pool
  VAI-BUSD pool......etc

・PancakeSwap ETH pools ==> Borrowing ETH
  COMP-ETH pool...etc

In addition to the usual criteria for choosing LP pairs, you should bet on pairs that you think are weaker than the one that comes later in the pair combination than the one that comes first.

For example, between CAKE and BNB, if you think that CAKE is stronger (has a larger price increase), you can bet on it.

On the other hand, if you think BNB is stronger than CAKE, you may lose money if you bet on CAKE-BNB. If you really want to bet on the CAKE-BNB pair, it is better to hold the LP pair without leveraging or each pair alone.

That's the explanation of Alpaca Academy Lesson 1.
Tomorrow, we'll go a little more in-depth with some concrete examples.

Continue⇒Alpaca Academy - I've tried a lot of things -

I hope you found today's note helpful.

See you again, DeFi~(@^^)/~~~

この記事が気に入ったらサポートをしてみませんか?