Tuesday, January 31, 2023

Daily Fantom Blockchain position report, 2023-01-31

Let's haunt @FantomFDN menace GhostDawg Chain.

BOO! 👻👻👻

A stop along the way: @UniDexFinance and o! dear! the $FTM-pool at 80%+?


Yes, please! PARTIcularly with $FTM's price being what it is now! 😅😎 

This lands me at @GranaryFinance with my leveraged looped liquid stake position (λλλ), 


... with no hedge against the eventual s-token depeg.

So, thanks to this great author, I know exactly what I must do: http://logicalgraphs.blogspot.com/2023/01/looped-liquid-staking-danger-and.html

Narrator: 'great'?
Me: Some call him 'great,' yes

But before I unwind my $sFTMX position on @GranaryFinance, I harvest yields, 


and Holy Clam Chowder! the $SD-yields are clocking in at 20% APY, folks! 😱💰


That's the power of leverage: leverage ... well: leverages. #suchwow 

I must stabilize my @GranaryFinance-position. So, 

  • I withdraw 4000 $sFTMX from supply, 


  • swap to $FTM on @beethoven_x 


  • then pay-down the borrow.


My health has improved, 


so now I can iteratively build a hedge position on @beethoven_x from the $sFTMX-supply on @GranaryFinance.

How do we balance our λλλ-position on @GranaryFinance with the "Lock, Stock, and Two Smoking Fantoms"-LP hedge on @beethoven_x?

  • I withdraw 4000 $sFTMX supply from @GranaryFinance 


  • I swap 3000 $sFTMX (ONLY!) to $FTM on @beethoven_x 


  • I swap 1065 $FTM to $wFTM


  • then provision.


That leaves ~2000 $FTM: I repay the borrow. But you see my health has deteriorated a wee bit. So, I have to alternate between paying down the borrow and building my hedge-position to equal my $sFTMX-bag.

'Sleep'? What is that? I'm curious to know. 🙄


Speaking of sleep ...

My cara spoza informs me I'm falling out of my chair, so I believe now is a good time to call it a night.

G'nite you dashing, daring, darling, delightful people!

NEW DAILY REPORT INCOMING BECAUSE YOU* DEMANDED IT!

Daily Fantom Blockchain position report, 2023-01-31



invested: $19,425.82
valuation: $27,469.38
ROI: 41.41%

you, pron.: well, maybe somebody might be interested, idk.

Net Avalanche positions: 2023-01-31

Let's go: @avalancheavax! 

First stop: @GMX_IO, or, as I call it: "La Machine!" as this protocol just keeps grinding out yields and growth.

Ooh, this baybee is bad-@$$.


I collect and compound yields here: having the yields reinvested to produce more yields.

A yield-farmer's delight. 

I reinvest half the $AVAX-yields as $GMX (swapping on @traderjoe_xyz) then staking that on @GMX_IO. 



The other half invested into $GLP is a bit more complicated.

  • I swap $AVAX to $USDC on @KyberNetwork first.


Why? The fees are much lower when you buy $GLP with $USDC.



  • THEN I buy the $GLP on @GMX_IO, which auto(magic)ally stakes those tokens.

Next up: let's visit @BenqiFinance

This isn't going to be facile.

I published an article on liquid staking and the dangers of depeg.

So, I'm rearranging the $sAVAX loop, splitting off half of it to @KyberNetwork sAVAX-AVAX LP AND withdrawing $BTC supply.



Okay. Help.

I have ~$600 $BTC.b sitting on @avalancheavax.

I have a hate-hate relationship with $BTC. I never know what to do with it, but it'd be stupid of me not to factor it into my investment portfolio.

@TeamKujira: are you gonna set up the BTC-ETH order book anytime soon?

At the end of the day:

Net Avalanche positions: 2023-01-31



invested: $52,927.77
valuation: $54,463.70
ROI: 3.54%

Lots to unpack here. Am I too sAVAX-AVAX LP-centric? Thank goodness @KyberNetwork has a killer incentivized yield, so I can defer that analysis for now.

Daily cryptocurrency income report, 2023-01-30

Daily #cryptocurrency income report, 2023-01-30: $41.12*





Ooh! Income! From multiple tokens, too! 

*does not include auto-restaked yields nor s- nor x-token gains

Valuation, Kujira portfolio: 2023-01-31

Valuation, Kujira portfolio: 2023-01-31


invested: $15,469.79
value: $16,997.17
net gain: $1,527.38
ROI: 9.87%


staked: $979.67
wallet: $4,762.155
order book bids: $4,847.42
Supply: $3,185.33
Borrow: -$748.744
LPs: $3,790.432
ORCA liquidation Bids: $180.905

matches supply+stake: TRUE
matches LPs: TRUE
matches value: TRUE

total assets: $16,997.17
discrepancy: $0.00

PnL


@TeamKujira FIN order books: 2023-01-30


Profit: $80.585
Loss: $79.329
subtotal: $1.256
fees: $0.049
commission: $0.358
total costs: $0.407

Total profit (or loss): $0.849 on 10 trades
average: $0.085 per trade


Assets in play


Kujira Positions report


staked, supplied, provisioned, @TeamKujira 2023-01-31


Staked and supplied assets UP 18.26%


LP positions UP 4.42%

total positions:
$7,151.85 invested
$7,955.428 value
UP 11.24%

Top 5 LPs on Team Kujira BOW by volume and by APR(combined), 2023-01-31

Top 5 LPs on @TeamKujira BOW by volume, 2023-01-31


  1. axlUSDC/USK,$540892.688,16.57%
  2. KUJI/ATOM,$469412.875,12.62%
  3. KUJI/axlUSDC,$405800.438,16.11%
  4. gPAXG/axlUSDC,$286437.812,26.18%
  5. ATOM/USK,$265824.125,33.22%

Showing all LPs with $100k+ volume

Top 5 LPs on @TeamKujira BOW by APR(combined), 2023-01-31



  1. AQUA/USK,$27604.279,203.42%
  2. LOOP/USK,$2240.930,194.73%
  3. DOT/USK,$37505.941,82.27%
  4. LUNA/USK,$31493.180,66.79%
  5. STRD/USK,$5996.290,64.19%

Report generated by ./lps

Monday, January 30, 2023

Looped Liquid Staking: the Danger, and Opportunity! of the Depeg

Liquid staking:

(Leveraged) Looping, and

the Danger (and opportunity!) of the Depeg.

Preparing for, then HOPING for, the worst.



Or: how I'm not getting any sleep tonight (again).

Real Talk with the el geophf. 

Caveat Lector


Before we start, this, like my other HOWTO/pensées, hits heavy. No reason to be scared, however. If you don't understand something, learn the concepts.

I did.

If you still don't understand, ask. I bite: hard and ferociously, cuz I'm a mean ol' cuss, but you can still ask.

Concepts

So, I'll ask for you, because some people don't know.

  • "What is liquid staking, el geophf, the munificent?"

Liquid staking. @stride_zone has a good description and a sine qua non in their whitepaper.

Next concept

  • "What is leveraged looping of liquid staking tokens, el geophf, the wizened?"

You callin' me old? 😤

Fair. 🤔

Funny how 'wizened,' or 'one who has obtained wisdom,' used to mean 'agèd person.'

Okay:  back to the question. I've written an article as my answer.

The Risk of Liquidation


You see in my article about liquid leveraged looping (λλλ, eheh 😅) that I point out that the s-token depeg is a possibility, in which case you're eff'd.

Are you?

Yes. Absolutely. The s-token depegs, and your entire supply collateral is liquidated to cover the borrow.

Eff'd.

And there's no way to stop this.

Remember Terra? I tried to bring in collateral, along with all the other wallets, to no avail.

BILLIONS of dollars, liquidated, and the network, my friends, was shut down to save ...

... absolutely nothing.

I hear tell people who looped $NearX when it depegged had a similar experience, ... orders of magnitude smaller, but still, when you lose money, the 'orders of magnitude' pale to your personal loss.

In all this (devastating) loss, I hear tell of people, and companies, who profited tremendously from depegs. One individual walked away with a 7-figure gain on the $UST-depeg.

Companies have set up multibillion-dollar hedges to destabilize then to profit from a depeg.

"VULTURES!" you scream.
"BLOOD-SUCKING OPPORTUNISTS!" you cry.

Here's the thing.

They are still here. And they are planning for the next depeg, right now.

Meaning: given the opportunity, a depeg WILL happen, and looped leveraged positions WILL be liquidated.

Strategies/Hedges


Okay, GIVEN that the depeg 'may' occur, there are several approach to take to this impending doom.

Let's go over each.

  1. "Leveraged looping is too risqué, but not in the good way. I'm makin' like a tree and getting outta heahe!"

Cowardice is one approach. And, if you opt-out on one of the most stable and high-yielding money-making strategies, then, ... well, we have nothing more to talk about.

  1. Insurance from a 'certified' ('certified' to be what??) third party

Here's why I detest this.

You give me your money.

That's stupid: what happens when the sh-t hits the fan?

I say: "Oh, insurance covers $327 of your loss. Here you go."

How do I know this?

Don't ask.

If you think getting paid a pittance for a crater-hole of financial loss is what pisses me off, you've missed my point.

You give YOUR MONEY to a THIRD PARTY?

How anti-DeFi can you get? 😤

Instead of paying somebody else, who doesn't care about you, why not be your OWN insurer?

  1. Hedge.

Be your own insurer.

Look: people bet FOR the depeg, in some cases PROFITING millions of dollars.

Be one of those wise guyz. Bet FOR the depeg.

AND.

All the while, maintain your leveraged looped position.

That's making money on BOTH SIDES of the house, fam.

"Okay, Mr. Smarty-pants, ..." you say.

Thank you. Yes, I am: because I LISTEN TO and LEARN FROM my betters, then ACT ON this knowledge TO CREATE my own path.

That's a free #protip that I'm throwin' atcha, if'n you're catchin'.

Catch my drift?

HOWTO Hedge


"Yeah, so, anyway," you say: "Of COURSE I want to hedge. But how, man? HOW?"

I'd like to introduce you to a concept you've never heard of before:

The Liquidity Pool. 


Now, before you snort at me derisively, claiming to know about liquidity pools, let's look at the use-case beyond providing liquidity for trade and thereby earning fees, yes?

Advanced liquidity pool investing involves this: when your token value DECREASES, the NUMBER of that token in your LP-pair INCREASES, thanks to the balancing-magic of the AMM/Automatic market maker.

Let's walk through a depeg-scenario to see how the s-token-token LP is a hedge.

Depeg Scenario

Let's say you have 5k $sAVAX supply on @BenqiFinance and borrow $AVAX against it.

Now, you're smart, see? So you have a 5k sAVAX-AVAX LP as hedge.

BOOM! $sAVAX depegs to $1.00 vs. $AVAX $20-per. You get liquidated and lose all your collateral: so only have $sAVAX collateral!

So, your @BenqiFinance-position is nullified.

What happens on the LP-side?

Your 5k sAVAX-AVAX LP IS STILL a 5k sAVAX-AVAX LP!

But, before it looked like this:

  • 2,400 $sAVAX - 2,500 $AVAX

But after the depeg, it looks like this-...ish:

  • 48,000 $sAVAX - 2,500 $AVAX: same value.

"48,000 $sAVAX?" you scoff, ... scoffingly. "What's the worth of that when $sAVAX is worth only $1.00?"

Here's its worth, and here's where you act, and act quickly:

  • Draw down 50% of the LP. Now. Hurry.

That puts 24,000 $sAVAX and 1,200 $AVAX into your wallet.

Now that you have those assets-in-hand, you do the following.

  1. Supply a FRIKK'n 12,000 $sAVAX to @BenqiFinance 
(sry: I misspoke.) That puts, not 12,000 $sAVAX, but a FRIKK'n 24,000 $sAVAX to @BenqiFinance.

So you're not up by a net-200%

You're up by a FRIKK'n net-400%

A FRIKK'N NET-400%, folks.
  1. Swap half the 1,200 $AVAX to $sAVAX and re-provide that liquidity to your sAVAX-AVAX LP.
  2. Wait. Wait for $sAVAX to regain peg. Wait patiently.

There are two outcome of your waiting:

  1. The peg never restores, and you have Harmony and Terra all over again. Welcome to the club. Hug a kitten. Smell some flowers. Don't kill yourself. Please.


It's a loss. Yes. It's just money. And money, at base, is nothing but Maya. माया

Or, like $NearX on @NEARProtocol:

  1. the s-token restore to peg.

But look at this:

You have your LP at 75%, once it rebalances.

But your @BenqiFinance supply is UP 120% 240%

And you have no borrow, so you're really up by more than 200%. 400%

You're up by more than 200% 400% from a depeg.

So. When somebody criticizes your liquid leveraged looped position (λλλ) (alles teh lurlz), saying: "What if the s-token depegs?"

Scream.

Scream in their faces: "O! G-D! PLEASE! PLEASE LET THE S-TOKEN DEPEG! PLEASE!"

Scream some sense into them.

For my sake at the very least.

Conclusion


What is the takeaway from all this, other than 'hedge your stake'?

It's this: it's the coward that listens the the crowd and cowers.

But you're not a coward: you're a trader. You're an investor. You don't let the crowd think for you: you think for yourself. 

So when someone says: "but what about the depeg?" Don't respond: "Oh, yeah! The depeg. Gotta stay away from that. Too risky!"

No. Remember: you're an investor. Think, instead: "If the depeg happens, how do I set it up so that I profit from it?"

Then set that up.

Always remember, the markets don't control your portfolio. They can't: they aren't the investor.

You are.

YOU control YOUR portfolio.

P.L. ('postlude')


I said 'Why I won't get any sleep tonight. Again.'

Here's why.

I have the s-token loops on @avalancheavax and @FantomFDN, but I don't have the s-token LP hedges in place.

Guess what I'm going to be doing all tonight, huh?

Welp. I hope YOU have a good night!

Rust pop-quiz: Order book URLs

Rust pop-quiz.

Receive the @TeamKujira order book JSON from https://api.kujira.app/api/coingecko/pairs


Parse it into Rust structures so that you can answer the following question:

* what is the URL to the order book [some order book].

BONUS!

Some names are just wrong. Find and fix them.

No daily cryptocurrency income report, 2023-01-29

No daily #cryptocurrency income report, 2023-01-29:

I did no yield farming yesterday. I did get some sleep in, so that was an interesting experience: sleep.

Valuation, Kujira portfolio: 2023-01-30

Valuation, Kujira portfolio: 2023-01-30


invested: $15,444.79
value: $16,860.97
net gain: $1,416.18
ROI: 9.17%


staked: $953.04
wallet: $4,690.238
order book bids: $4,827.12
Supply: $3,177.21
Borrow: -$742.772
LPs: $3,776.671
ORCA liquidation Bids: $179.462

matches supply+stake: TRUE
matches LPs: TRUE
matches value: TRUE

total assets: $16,860.97
discrepancy: $0.00

PnL

No PnL ('profits-n-losses') report today: I did not trade on @TeamKujira FIN yesterday.

There'll be a PnL report tomrrah. #PinkyPromise 

Kujira Positions report

staked, supplied, provisioned, @TeamKujira 2023-01-30


Staked and supplied assets UP 17.28%


LP positions UP 4.04%

total positions:
$7,151.85 invested
$7,906.922 value
UP 10.56%

Top 5 LPs on Team Kujira BOW by volume, 2023-01-30

Top 5 LPs on @TeamKujira BOW by volume, 2023-01-30


  1. axlUSDC/USK,$526122.438,19.56%
  2. KUJI/ATOM,$507131.125,22.77%
  3. KUJI/axlUSDC,$419431.500,21.54%
  4. ATOM/USK,$275248.344,37.46%
  5. KUJI/USK,$267152.375,34.19%

Showing all LPs with $100k+ volume

Top 5 LPs on @TeamKujira BOW by APR(combined), 2023-01-30


  1. AQUA/USK,$32791.160,195.18%
  2. LOOP/USK,$2412.220,186.77%
  3. DOT/USK,$36475.809,93.34%
  4. STARS/USK,$31351.619,85.03%
  5. LUNA/USK,$30028.320,77.51%

Report generated by ./lps

KUJI/ATOM-arbitration

Do you want to see a magic-trick?

$KUJI's price is skying, relative to 35 days ago. So, now $KUJI-arbitration is a thing, again.


What is '$KUJI-arbitration'? It's starting with some amount of $KUJI, k, doing some trades, then ending up with more $KUJI, k + ε

Let's talk.

Why Arbitration?

First off, let's deal with arbitration-as-a-thing, because some of you are wondering why I focus so much time on arbitration: a technique usually only available to whales, ...up to this point.

Why, geophf? Why?

Arbitration:

  1. costs nothing (relatively)
  2. gives you something.
Let me explain what I mean.

Traditionally, if I have k $KUJI, and I want more $KUJI, I go buy some with $axlUSDC (money) or $USK (money, minted or bought).

That costs money.

With arbitration, if I have k $KUJI, I arb to k+ε $KUJI, and keep arbing until I have the $KUJI I want.
 
What does that mean?

That means, with the protocols @TeamKujira provides, arbitration is now available to poor people – people like you and like me – to work their way to having as much $KUJI, or $ETH, or $DOT, or $ATOM, or $BTC, or $BNB, or $PAXG, or whatever, as they want.

HOWTO

"But HOW, geophf, HOW can I arb like the ArbenMeisterszorxen, toiself?"

(that is geophf-language. That's an official language now.)

I've shown you, in prior articles, how to arb axlUSDC/USK (the 💸🖨️), and how to arb the x/axlUSDC - x/USK order books.

Now let's get FONCÉE! 😎

Okay, arbing $KUJI or arbing $ATOM.

Basic


The most-direct way to arb these, or any asset x, that has an x/axlUSDC and x/USK pair-o'-order-books is to sell x on the higher-priced book, swap on axlUSDC/USK order book, then buy back x+ε on the lower-priced book.

Easy-peasy!

Let's take $KUJI as an example. 


The $KUJI/stable order books are:

a. KUJI/axlUSDC: $0.66
b. KUJI/USK: $0.655

So you sell your $KUJI on a., swap the earnings to $USK on axlUSDC/USK, then, with that $USK-liquidity, buy-back your $KUJI, and then some, on b.

$KUJI-arb. Easy-peasy!

KUJI/ATOM Order Book

But now I want to show you a magic-trick, available only to trading Wizards 🪄on @TeamKujira FIN from day 1 (and, after this article, available to us smol 🥔 traders, too! YAY! 🎉).

Ladiez and Gentles, I present for your trading-pleasure, the KUJI/ATOM order book. 


What is magical about the KUJI/ATOM order book?

It's so d-mn inefficient, that's what!

Let me explain.

Do you see the quote (price-of-KUJI) on the order book?


It's $0.678, or higher, MUCH higher than either KUJI/axlUSDC (0.649) or KUJI/USK (0.651).

So? Who cares?

I do.

I care, and you should, too. Why?

As a trader you want 

  • to buy (valued) assets low, and 
  • to sell high.

$KUJI's price is higher on the KUJI/ATOM order book (IN THESE MARKET CONDITIONS!) (important caveat).

That means we can exploit this inefficiency to sell $KUJI high.

  • Step 1: Sell $KUJI on KUJI/ATOM order book

But if $KUJI's price is high, what is $ATOM's price?

Um. The KUJI/ATOM order book doesn't list $ATOM's price.

OR.
DOES.
IT?

In my ATOM-arb article, I wrote how to compute $ATOM's price from the ratio and $KUJI's price:


$ATOM price = $KUJI price / ratio

So, running this computation on current market prices we have


  • $ATOM price on KUJI/ATOM: $13.31
  • ATOM/axlUSDC: $13.20
  • ATOM/USK: $13.259

So, $ATOM's price is HIGHER on KUJI/ATOM order book. And we're buying $ATOM from the $KUJI we're selling.

Oops, buying higher. Hm. 😅

But now we have $ATOM. What do we do?

  • Step 2: We find the ATOM/stable order book where $ATOM's price-quote is HIGHEST, and we sell there.

The trader's axiom: buy low/sell high.

In these market conditions, ATOM/axlUSDC has the higher $ATOM-price, 


...so we sell there.

Now, 

  • Step 3: buy-back $KUJI to complete the arbitration can be complicated, depending on market conditions.
IF the low-quote is on the same KUJI/stable that you sold the $ATOM,
THEN simply buy-back the $KUJI on that KUJI/stable order book, and you're done.
That's the easy-arb.

BUT, in these market-conditions, we SOLD on ATOM/axlUSDC, but KUJI/USK has the lower $KUJI-quote.


SO! IN THAT CASE! You need to run 2 scenarios ('scenarii'?)

  1. SWAP axlUSDC to USK on axlUSDC/USK, then buy KUJI on KUJI/USK

The axlUSDC/USK order book, or the @TeamKujira 💸🖨️:


OR

  1. simply buy KUJI on KUJI/axlUSDC if the above swap is disadvantageous.


And this closes out the $KUJI-arbitration, using the KUJI/ATOM order book. 

That's the 'simple' $KUJI-arb-scenario, using the KUJI/ATOM order book, which arbs you MORE $KUJI FASTER. Why? the price-inefficiency of both $KUJI and $ATOM on the KUJI/ATOM order book.

That's one scenario.

There are actually TWO more scenarios ('scenarii'?) here.

  1. It's $ATOM's price that is (much) higher on the KUJI/ATOM order book, or $KUJI's price that is much lower. In that case, you'll be wanting to arbitrate $ATOM, then.
  2. It's BOTH $KUJI AND $ATOM's price that are (much) higher.

For 2., then YOU get to pick which one to arb.

I've walked though the reasoning and 'magic' behind arbing either $KUJI or $ATOM on the KUJI/ATOM order book.

You: You talk alot, geophf.
me: You sound like Narrator.

Narrator: ...wut? 😤

Now let's step through an actual arb and see the reasoning-in-action/poetry-in-motion.

Arbitration Walkthrough

  1. I see $KUJI-price is higher on KUJI/ATOM than on the KUJI/stable order books. So I sez t'me-self: "SELF!" ('cuz that's what I say to myself when I'm talking to myself) "SELF!" I sez, "let's arb $KUJI!" 

So, I place a sell-order.


Okay, now I have $ATOM.

  1. I examine the ATOM/stable-prices. I see ATOM/axlUSDC has the high-price, so I SELL (limit-order) $ATOM on ATOM/axlUSDC


Buy low/Sell high. 

Let me share the transactions as I do them, for total transparency:


  1. SELL 100 $KUJI for 4.93 $ATOM, quote: 0.0493 
  2. SELL 4.93 $ATOM for 64.8985 $axlUSDC, quote: $13.16  

Okay, now I have $axlUSDC.
  1. (maybe) Now, let's buy $KUJI to close out the arb, yes?
No.

We're at a crossroads here. I HAVE $axlUSDC, but the low price is on KUJI/USK.


SO!
  1. I SWAP $axlUSDC for $USK
  1. SELL 64.9 $axlUSDC for 63.1 $USK, quote: 0.972 

That order hits. And, you see I have a bunch of orders that hit on the axlUSDC/USK order book, or, as I call it: 💸🖨️.


I collect these orders in one fell swoop.

Please read my article on axlUSDC/USK-arbitration.  

Finally,

  • step 4: Buy KUJI to close-out the arbitration.
  1. BUY 101.6 $KUJI for 63.1 $USK, quote: $0.621 


ROI: 1.6% 💥

Discussion/FAQ


Q: "1.6%?" you say. "Meh." you say, "I'm doing better on the LPs!"
A: You're doing better APRs on the LPs, yes, but this is ROI. I made 1.6% in ONE MORNING! If I do one of these per day for a year, I've made 300%+ as an APR.

That's the thing: I arb at my pace.

Q: Can anything go wrong?
A: AB-SO-LUTE-LY! If the markets change during your arbitration, you can end up on the losing side of that equation, even: big time. That's why you want to do your arb as expeditiously as possible.

Start your arb; finish your arb quickly.

Summary


The KUJI/ATOM order book is this magical thing: you can arb either $KUJI or $ATOM OR BOTH! ... depending on market conditions.

I suggest stepping through this HOWTO with a small arb. Get the hang of it.

You'll find the KUJI/ATOM order book to be an useful tool.