Alpaca Academy -I’ve tried a lot of things-

hiyocoro
hiyocoro
May 6 · 9 min read

Good morning.😊

Today is a continuation of yesterday.
It’s Monday, but I’m writing this on Sunday, so it’s rich in content!

Here’s what I wrote last time.

I’ve tried a lot of things.

In the last note, I think you understood softly that you can short in Leveraged Farming. I think you also understood that if you don’t pay attention to the combination of pairs, you will end up with unexpected losses.

Today, I’m going to try a lot of things with concrete numbers until I learn what shorting is all about. Please just look at the parts that interest you.

Italics indicate detailed formulas and explanations. If you’re not good with numbers, you don’t need to read it to get the gist of it.

Conditions:

  • ETH-BNB Pool, leverage x3

The content of this note is based on the Alpaca Finance Yield Farming Calculator created by the official alpaca finance.

1. The price of one of the tokens in the pair goes up or down

1-(1) ETH up

First of all, let’s assume that only the ETH of the ETH-BNB pair goes up, from 1 ETH = $1,500 to $1,666, an increase of about 10%, what would the profit and loss be?

When considering the leverage of an LP pair, manipulating the value of BNB/ETH is efficient and easy to consider, so here we will consider raising or lowering the value of BNB/ETH by 10%.
At the start, BNB/ETH = 0.167. If we change this by 10% in the direction of increasing ETH, BNB/ETH will become smaller, 0.167*0.9 = 0.150. At this time, 1 ETH = 250 / 0.150 = $1,666.

You can also see that the quantity of BNB and the quantity of ETH are different from before. When the price fluctuates, the quantity also fluctuates so that the value of the two tokens is the same. Also, there is a rule that the value of BNB quantity x ETH quantity will always be constant, so when one quantity increases, the other quantity decreases. ⇒ Refference

Look at the bottom right of the figure, where it says “Earnings ($)” is the earnings in dollar terms when the position is closed.

Below that, I have also shown the earnings of LP without leverage for reference. In this case, no leverage is $541, while leverage x3 is $1,623, so you’re getting a solid 3x!

(In reality, the amount will be less than 3x because of the loan interest deducted.)

1-(2) BNB up (negative even though it is up?)

Next, let’s consider the time when BNB price is up.

As before, let’s assume that 1BNB=$250 to $275, a 10% increase.
BNB/ETH = 0.183.
Look at the bottom right of the figure. Earnings ($)… minus $536.

Even though BNB is up!
Even though I’m making $488 without leverage!
Isn’t leverage supposed to make you three times the normal amount of money?

It’s hard to believe, and the first thing that comes to mind is a calculation error. Have you ever been in a situation like this?

“BNB is going up, why is it negative? I hate it. I’m going to bed…”
“I’ve been tricked, the interest rate isn’t even close to what it says!”

But remember what I said last time.

The majority of the BNB is neutral, which means it doesn’t matter if the BNB goes up or down because you just pay back what you owe.
The part of the BNB that is borrowed and exchanged into ETH is short, which means it becomes negative when the BNB is up.

So it is neither a miscalculation nor a trick.
It is hard to understand the sense of it, but the calculations are correct.

1-(3) ETH down

Now for the ETH down. 1 ETH=$1,500 to $1,363, a down of about 10%.
BNB/ETH = 0.183, the same as before.

In the bottom right corner of the figure, Earnings are minus $1,396.
This is understandable because ETH is down.
You are losing 3 times the normal amount, well, this makes sense.

1-(4) BNB down (positive even though it’s down?)

Next, let’s consider what happens if the BNB price is down.
BNB/ETH = 0.150, same as 1-(1).

“The earnings in the lower right corner is… $460, isn’t that a loss…?”
“I’ve made money? Why, when it’s going down?”

This can also be explained by the previous figure.

I like this diagram because it is easy to understand. (I’m proud of myself.)

Again, there is no movement in ETH, so it doesn’t matter, but since BNB is going down, the shorting part works positively.

Can you feel it?

2. Both prices of the pair go up and down

2-(1) Both up

So far, we have moved the prices one at a time to simplify the simulation. Let’s now try to see what happens when the prices move simultaneously.

First, let’s see what happens when both prices are raised.

Let’s say both are raised by 10%, 1BNB=$250⇒$275, 1ETH=$1,500⇒$1,650.
BNB/ETH = 0.167.
These values are the same as the ones you started with.

So, how much will be the earnings, the earnings in the lower right corner is… $1,000.

“Hmmm, It’s raising both. It’s not enough.”
“Even when the ETH price only went up, I was still making about $1,600, right? And I was expecting to double that if both went up… I don’t want to do this anymore, I’m going to bed…”

This is also not enough for your senses, but remember.

For the third time, the ETH price raise certainly benefited my longs, but the BNB raise has negatively impacted my shorts.

So if the total increase is not much, this is also as calculated!

2-(2) Both up x2

As a test, I simulated the case where both are raised by 20%.
Since the value of BNB/ETH is the same, they move in a similar way.

2-(3) Both down

The same is true if both are turned down.

2-(4) Both unchanged

It is the same even if there is no change in both.

In addition, it’s not sad that the BNB/ETH ratio doesn’t change like this, it’s actually a very happy thing.

Because, although I’m ignoring it now, I’m very happy that the farming rewards and pancake exchange fees keep coming in at x3.

(The borrowing rate will also come in at x2, please note.)

This is the image of farming a stable coin pair.
It’s an investment method that allows you to sleep peacefully at night while leveraging and even spend weekends with family.

Now that we’ve seen both tokens move in the same way, let’s simulate that they move in opposite ways.

3. Pairs make disparate price movements

3-(1) ETH up x2

I would like to consider ETH up and BNB down.
From what we have learned so far, we can see that ETH is profitable when it goes up and BNB is profitable when it goes down.

Now, let’s think about the direction of double profit when ETH is up and BNB is down. It looks like ETH will go up twice as much as BNB, doesn’t it? Let’s first simulate a doubling of the ETH price to 20% from the previous price.

ETH=$1,500⇒$1,875, an increase of 20%
BNB/ETH = 0.133

So, the bottom right corner shows $3,541 in earnings.
That’s right, as expected!
I’m making 3 times as much as I expected without leverage.
At 20%, that’s a 2X increase!

3-(2) BNB down, ETH up (not doubled up)

Now, let’s take BNB down and ETH up.
BNB=$250⇒$225, ETH=$1,500⇒$1,687.
As a result, BNB/ETH = 0.133, which is the same as before.

The earnings at the bottom right is ……$2,187

“…… hmm, is that about right, not 3600?”
“No, I don’t know why at all, I’m getting sleepy…”

This is the fourth time this figure has appeared today?

In this case, the long portion is not doubled, but rather the profit from ETH long plus the profit from BNB short.

In short, it is the sum of the profit of about $1600 from the ETH increase in 1-(1) and the profit of about $500 from the BNB decrease in 1-(4).

So it looks like …… will be there too, “just as calculated!

3-(3) BNB up x2

So next time, when only BNB doubles, raises by 20%, you can already imagine what will happen.
BNB=$250⇒$300
BNB/ETH=0.200

The loss will be twice as much as the BNB increase, and the bottom right hand side of the earnings, yes, minus $1,137, 1-(2)’s minus $536, it is roughly double.

3-(4) BNB up, ETH down

Finally, BNB up, ETH down.
I’ve pretty much figured this out too.
“I’ve seen enough of your punches.”
“Hahaha, you idiot, it’s not like in the comics!”

Yes, I get it. It’s the same diagram.

I can combine the loss of BNB short up and ETH long down, so 1-(2) BNB up minus $500 or so and 1-(3) ETH down minus $1,390 or so, totaling about $1,900. 😊.

I understand now, I’m going to sleep now. 😌🌃💤

4. Conclusion and extra spreadsheet

I hope you have learned the relationship between longs and shorts.

The ideal pair is one in which the value of the long portion increases and the value of the short portion decreases. In addition, it would be great if the overall value of the pair were to rise against the dollar.

Also, stable pairs such as staple coins can generate stable profits by paying attention to the fluctuations in the lending rate, because the interest on the farming reward and exchange fees is delicious.

I shared the Google Spreadsheet I used to create my note today. If you’re interested, please try it.

I hope this article will be helpful to you.

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

Originally published at https://note.com on April 26, 2021.

Leverage Farming with Alpaca

Introduction to Leverage Farming with Alpaca

hiyocoro

Written by

hiyocoro

DeFi is fun! I started DeFi in February 2021 and my life has changed, everyday is fun!

Leverage Farming with Alpaca

Difficult to understand, but fun to understand. I’ll show you the charm of Leverage Farming.

hiyocoro

Written by

hiyocoro

DeFi is fun! I started DeFi in February 2021 and my life has changed, everyday is fun!

Leverage Farming with Alpaca

Difficult to understand, but fun to understand. I’ll show you the charm of Leverage Farming.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store