Saturday, September 17, 2022

A Crypto-Universe tour

Day 1


Okay, we're going to take a turn about the universe ...

... the CRYTPO UNIVERSE, that is. HA! 😎

... but this time, I'm going to rebuild my portfolio as I go.

It's time to let go of deadweight, and call losses, losses.

Harmony


Okay, my body is ready to be rekt.


This is what Harmony used to be. 


Remember these dApps? I do. At $60k I had half my investments in Harmony; the other half I had in Terra, ... but we'll come to that.

Let's go over the investments I have (still) in Harmony, and come to a state-of-the-world there. 

How am I going to tour Harmony? Am I going to hit your dApp? Maybe. Here's how I'm going to do it: I'm going to my SPEADSHEETSZORXEN, then look at each dApp I have in turn. 


First up: @AaveAave 


invested: $500
current worth: $746.40

I'm doing well here, ... EXCEPT: can I withdraw even one penny of this? NUPE! LOCKED. DAUWN! because of the $100M bridge hack.

Okay, how do I record this information?

To build the NEW portfolio for the NEW el geophf, I need a CLEAN BREAK from what's holding me back: the past.

So I have the raw data from the portfolio, and I'm building a new SPREADSHEETSZORXEN!


Where do I get automated asset prices?

There are many(?) different ways to get an asset's price, including having parsers for each protocol to extract the price from value/amount. The problem with that approach is that different protocol peg assets to different prices.

@CoinMarketCap provides an API of asset prices.

And, I have an API to @CoinMarketCap API that extracts prices and stores that information into a SQL database:


I'm not in love with this approach anymore. I was going to go all analytic-crazy with these data, but, now, I only need today's asset prices.

This leads to 

Rust exercise 1


Given the Rust JSON api: https://docs.rs/json/latest/json/
And @CoinMarketCap's daily listings as JSON (you get that with curl, or however you want to download it)

Write a Rust program that extracts the cmc_id, asset, symbol, and the price for all assets.

(answer

Okay. I'm now processing the JSON file of price-quotes into a CSV file.


That's great! But I don't want every price-quote. I only want the price-quotes in my portfolio.

Hmmmmm! 🤔 

But I don't want every frikken price-quote under the Sun! No! I only have $LINK and $ONE (so far), so I want only the price-quotes for #cryptocurrency I hold.

Rust exercise 2

From the CSV file (above), and from a NEW file that lists crypto that I (or you) own, output prices from held assets.

  • Hint 1: The data-type you may-or-may-not have invented for exercise 1 may be useful here.
  • Hint 2: filtering out (or, more correctly, filtering IN) the coins you want listed is much easier if you put all coins into a map, then printing the quotes becomes a simple map-lookup. 

(answer

Day 2

(I can't wait to get to Day 6)

Finally, after much trials and tribulations (what even is a 'tribulations'?!?!?), my system now generates price-quotes for my portfolio assets.

Which means I can start building my NEW portfolio from the ground up!

Here's the ground up.



So: okay. I have a start.

So, let's start.

I purchased some $AVAX on @coinbase then transferred that to my Avalanche wallet. 



So, I know I have $AVAX in my portfolio. So, I add `AVAX` to my portfolio coin list 


then rerun my portfolio price-quote report with

$ make filter

This spits out a CSV file that I past into my portfolio holdings.


And: I have $AVAX on Avalanche. How am I going to apportion it? That's where the Pre-supply stable coin borrow worksheet (PSSCBW) comes in.



PSSCBW, on the Pre-supply tab.

So, following what the PSSCBW tells me, I swap some $AVAX and $USDC to $USDC.e. Why? Because that's what @CurveFinance deals with, then, on Curve, I swap $USDC.e to $DAI.e and SUPPLY that on @BenqiFinance 





Now, before I supply the $AVAX as $sAVAX on @BenqiFinance, I want to do two things:


  1. accumulate all yields, converting them to $AVAX
  2. BUT BEFORE THAT! Record my @BenqiFinance positions into my new portfolio, which will include updating my portfolio holdings and price-report.



So did the second thing (PT), let's do the first thing: yield-farming. Let's go to Harmony. First stop: @FuzzFinance ... and, ouch! Less than a penny dip in $FUZZ means a loss of $100 in value, oh, well. 



Well, then!Then, on the Avalanche side, I swap the $JEWEL to $AVAX on @pangolindex. This is a $AVAX self-loan pay-down, which state on 2022-09-19 is as follows.





Speaking of $JEWEL, how about @DefiKingdoms?


I have 2,100 locked $JEWEL I can't touch. What's my approach here?

I'm writing this off as a bad debt. Experience (Terra and others) shows that I'm getting nothing from restitution, so I'm not going to hope here.

Writing this off.

To that end, I've created a "Bad Debts"-table to track these losses.


Why? I -MIGHT- be able to write off these bad debts. I'll be talking to my financial advisor about precisely this. He'll get to crow: "Haha! I TOLD you to stay out of crypto!" so: yay. 🙄

Next, let's go to @Defiraverse and @tranquil_fi. Their rewards 'look'(?) juicy, but, two things:

  1. Yields haven't increased (even in)significantly in WEEKS, belying their reported APYs.
  2. $FIRA is reported to be $1.74, but it swaps at 8.2 $ONE, which prices it at $0.17.





So, the 'yields,' reported to be more than $100, I compute to be less than $7. Consequently, these two protocols are no longer viable for me: I've lost almost everything.

I'm liquidating my positions and writing off the losses as bad debts.

So, I collect the yields from the @Defiraverse farms. The reported APYs are 400%+, but my computed yields are 9%, 5% and nothing because $sFIRA is not swappable for anything. 



So, here we see @Defiraverse says I have ~$1180 in liquidity on their protocol. 


Let's break down this liquidity and compute how much actual value is there, and that will be the (catastrophic) loss that I record as I close out these LPs. 

Okay. Did that.

Results:

investment: $2,485.90
liquidated amount: $128.08
loss: -$2,357.82

Holy 'ell-...o Hedley Lamar. 

Good bye, @Defiraverse.


Let's do the same thing for @tranquil_fi now.




This is what remains of @tranquil_fi. $TRANQ is now trading at 1/2 of a $ONE. $ONE hasn't reached $100 yet. Not today, anyway. Maybe it will get there tomorrow. 

So 48 $TRANQ is worth ... well, ... let's see, shall we?

... is worth $0.48. That means my $xTRANQ stake is not earning 300%+ APY, but, on my real money investment, it's making (checks calculations) 3.45% APY.

That's @tranquil_fi APY I calculated.

I don't know how they calculated their APY, but I'm not getting those returns.

The @tranquil_fi fees stake. I invested $645 into it, so the APY isn't 95%+, its [checks calculations] ... charitably, less than 9%.

I'm withdrawing all my unlocked $TRANQ and liquidating my position. Sadly.

I invested: $1,822.54 into @tranquil_fi 
Value at liquidation: $48.11

Value at liquidation: $48.11

So, I lost a total of $1,774.43 of my investment.

I mentioned catastrophic earlier.

This loss, clearly, is catastrophic.

I trade all the $FIRA and $TRANQ for $ONE, and we're done with these protocols.



Let's move onto the next one, shall we? 

Evoverses.

Not much to say here. 




Investment: $294.54
Liquidated $EVO and $ONE: $82.14

Loss: ($212.40)

... their user interface looks nicer now.

Next FoxSwap.one ...

Do you want to see how to make a $250 investment disappear into exactly $7.00?





No?

Me, neither, but here we are. 

Next: @RVRSProtocol 



Investment: $852.82
Liquidation value: not even 0.0000001 $ONE.
Utter loss.

But now we come to @VenomDAO. 

Okay. Here we go:

Investment: $4,418.59

... okay, I'll just show the swaps and then I'll just do this:

... HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA



Oh, but it gets better, on my secondary wallet, Harmony2, I put another $2,200 into Viper Swap tokens.

What can I say? Olympus DAO got me all like ... 

One more for Harmony, ... @relicquest.


Investment: $836.01
Liquidated to: $71.71

So.

Harmony.

I invested $21,944.78
I lost -$21,313.64


Isn't that neat?

That's all for today.

Tomorrow we'll have way more fun, though.

Tomorrow, I'm doing:

Terra.

p.s.: I take all these liquidated assets, swap them to $JEWEL on @DefiKingdoms, then bridge to Avalanche on @MultichainOrg.

As soon as the $JEWEL reached Avalanche, I converted the $JEWEL to $AVAX. 






No comments:

Post a Comment