Showing posts with label THORChain. Show all posts
Showing posts with label THORChain. Show all posts

Wednesday, September 13, 2023

2023-09-13 ETHBTC-THANG! Day 108

Let's do the ETHBTC-THANG!

I record the $ETH and $BTC prices from @osmosiszone, where errors are resurfacing for the $wBTC price.



I record these prices into my SPREADSHEETSZORXEN! 

SPREADSHEETSZORXEN! says 'swap 0.00812 $BTC' (I'll come to that eventually), so I withdraw that amount from @TeamKujira Ghost lend.



But where to swap?

Aye: there's the rub.

Let's look at 4 (non-)options, then a fifth OG geophf-option.

For DEXen, worst (least $ETH from $BTC) to best (most). 

For 0.00812 $BTC I get _ from: _

  1. 0.1299 $ETH: @THORSwap (ignoring gas fees)


  1. 0.1309 $ETH: @Manta_DAO


  1. 0.1315 $ETH: @osmosiszone


  1. 0.1317 $ETH: @NolusProtocol (lease then payoff)



Folks: learn leasing.

"...butbutbut HOWDOILEARNLEASING, o, el geophf?"


All on my blog, folks, with other juicy α. All free. For you. 

"So, el geophf, ya gonna lease-then-payoff, then, for the BTC-ETH 'swap'?"

Maybe. The above four give you the (kinda-)DEX-approach.

Let's take a deeper dive.

These are the viable paths for the @TeamKujira order books, diagrammed by ./graphista.



These data are graphed in @neo4j cloud db Aura, uploaded with queries.cyp:

https://github.com/logicalgraphs/crypto-n-rust/blob/main/src/ch08/graphista/queries.cyp

Okay, fine. What are the directed and acyclic paths from $wBTC to $wETH?

Easy. That's the Cypher query:

match p=(c {name: "wBTC"})-[*1..4]->(c1{name: "wETH"}) 
return p



This, however, is inhuman AND inhumane in the amount of pathing one must do to trade from $wBTC to $wETH on @TeamKujira FIN.

That's why I have ./vern, my main man, ./vern.



There's a problem, however, when I output the viable paths as CSV.

Dear @neo4j,

Seriously? Again?




You've had this problem FOR YEARS!
I have pointed this problem out on MULTIPLE occasions!

Please fix CSV output to be NO QUOTES, not 300,000 quotes.

ffs 🙄

love, geophf

Dear @neo4j,

A reference how CSV output, that is: sane CSV output, SHOULD look like and how your CSV output USED TO look like.




You pay bounties for people who find bugs in your system?

wallet addy: kujira1h525rx052gx2qt9qc9jqj6f7thv5h3lylja47q

So, I'm a programmer.

Let's pretend problems don't distract me from just writing the d-mn solution.

They do, but let's pretend.

Behold. 



all-isomorphic-paths.csv (up to 3-deep) on @TeamKujira FIN, ... NOW INCLUDING $MNTA ORDER BOOKS!! 💥💥💥 

That, along with the latest market data and my (non-)list of synthetic order books allows me to run ./vern, my main man, ./vern!

What does ./vern say?


Huh! If that isn't disappointing!

But am I disappointed? No.

Sometimes, ./vern fails me, be it the verra smol amount traded or inactive-order-book hell.

This does not stop me. No weapon formed against me shall stop me.

I'll just find another way! Let's look at the order books




The key here is to look at the HIGHEST price to SELL $wBTC and the LOWEST price to BUY $wETH.

SELL HIGH; BUY LOW

Then create a path between those two, which entail mixing in:

USK,axlUSDC,ATOM,KUJI,MNTA,






not in any particular order. 

So, the trick is to stitch the order books together in a pretty-durn-good transactional chain.

How do you know that your path is a winner?

Enter: ./emily 

I run my three best guesses through ./emily, and ./emily tells me what the result of the trade is.



Now, ./emily runs the trade AT MARKET PRICE, ONLY! But that's what @Manta_DAO is supposed to do, automatically.

So why does ./emily easily beat @Manta_DAO? 🤔



@NolusProtocol lease-then-payoff just beats my best trade, without the hassle of going through five order books.



But, even still: it's not as easy as all that.

@NolusProtocol beats market price trades.

I NEVER trade at market price. Why would I?

So, with ./emily I can get the trade to be around 0.1355, just above or below market price, on order books with $1k+ 24-hour volumes.

So, I place the first order in the 

> $wBTC > $USK > $axlUSDC > $ATOM > $KUJI > $wETH

trade-path, and call it a night.



G'night, fam. I have a video-conference at midnight, then a meeting at 1:15 am ET. 😴

Pivoted: $wBTC > $MNTA > $KUJI > $wETH

I'm at the $KUJI > $wETH part of the trade. I took a wee bit o' profit in $KUJI, and still I beat all DEX trades.






Next time I need to long the objective ($wETH) during these trades so the objective doesn't escape me on a moonshot.

Friday, August 11, 2023

Thor swap for CØSMOS? a pensée

Yesterday, I had an interesting problem on @TeamKujira blockchain.

88 $ATOM came my way.

Wat do?

Arb $ATOM. The thing is, arb'n $ATOM is fine, but $stATOM also has its uses.

How to get $stATOM?

Three ways:

  1. trade on FIN.
  2. mint on @stride_zone 
  3. swap on @osmosiszone 

So, I decided to arb half-...ish my 88 $ATOM on the barometer @TeamKujira FIN board: KUJI/ATOM

barometer HOWTO.


The other half, I'll swap to $stATOM, but how? Which of the three ways is best?

My answer: I check each of the three ways, every time.

It turns out, the @osmosiszone swap was best this time, but one does not simply swap $ATOM on @TeamKujira on @osmosiszone.

One must do the following:

  1. Bridge $ATOM to @cosmos


  1. Bridge $ATOM to @osmosiszone


  1. swap to $stATOM


  1. Bridge to @stride_zone 


  1. Bridge back.


The Terra station sees all @cosmos assets on all zones and labels them as such, so does KEPLR v 2.0.

I'm just wondering: is there a need for a protocol, kinda like @THORChain for CØSMOS, that lets you swap assets on any zone with anything?

That'd be sweet, fam.

That'd be sweet.

P.S.: Burn arbitrage

P.S.: now, all this was said, assuming a lot. Why am I arb'n $ATOM (and $stATOM) when I could slow-burn it on @stride_zone?

The answer is easy, once ./burn tells me there's no viable burn-scenario.




And, after this, that's why I did all the above

Saturday, August 5, 2023

2023-08-05 ETHBTC-THANG! Day 69

2023-08-05 ETHBTC-THANG! Day 69 

Happy 69th day of my ETHBTC experiment!







  • swap 0.0000 $BTC (no swap)

After swap:

ETH: 5.34815
BTC: 0.00000
Total: $9,777.31

That does not mean, since I have no $BTC to swap, that I'm not going to buy $ETH, ... at these prices?

And, yes, I remember when $ETH was $1.1k-per.

But BUY $ETH, yes.

So I swap some $DAI on @optimismFND to $OP on @VelodromeFi, the transfer that to my @coinbase wallet.




I have to say here, I do respect how @coinbase doesn't have a bridge, instead: you want $OP? Use an @optimismFND-address. You want $AVAX? Use an @avax-address. This doesn't solve all problems, but it does solve the bridge-hack-exploits that have been plaguing us of late.

For the DeFi-approach to this @THORChain has lead the way with multiple assets from multiple chains all under one ... 'chain'? ... 'umbrella'? ... 'wallet-that-has-multiple-addresses'?



Then there's @cosmos' IBC.



I wonder if this is the future of multichain liquidity.