Tuesday notes

Of course my BNB position got stopped out while I slept. Of course.

I’m going to feel bad if this moons again, but I had too much of my trading stack bottled up in his one position. Most all of it is in BTC now, about eight percent is in $ALGO, $SOL, $ZEN and $ZRX.

Haven Protocol ($XHV) is up again, marking an eight on the TD Sequential. I got my node synced up again, and am probably going to convert funds to the “offshore” XUSD vault if things take off again tomorrow.

The only thing in my screeners that are forming a buy right now is $CELO

The project came up on my radar a few days ago, although I haven’t done much research. They’re centered around providing banking services to anyone with a smartphone, which is admirable and they’re still in testnet, which seems like an interesting opportunity to run a validator node on the cheap. There doesn’t seem to be much information about how much stake is required, and there seems to be some sort of validator election that occurs to promote full nodes to validators.

The only thing stopping me from putting in an order right now is the fact that the only exchange I have access to is Bittrex, and I’m not trying to move any funds right now. If I did, I’d probably move them into the Yearn sBTC vault.

Speaking of which, I am expecting my BlockFi withdrawals today and tomorrow, which will be going in the vault.

Evening notes

Trade plan programming

I’ve been working on my trade planning Python module the last couple days, and already the project is becoming rather complex. I say it’s a trade plan module, but really it’s a capital preservation ‘brake’, if you will.

The basic idea behind the module is like this:

  • Get balance list and filter empty ones.
  • Get last symbol/BTC market price.
  • Calculate total BTC value of all holdings.
  • Get open orders for each market. For each, look for limit orders, and calculate the covered/uncovered amount in BTC.
  • Make sure that no uncovered position accounts for more than two percent of total portfolio value, and that no more than six percent of the portfolio value is uncovered. If they are, do not allow any additional buys.

The last couple days I’ve been slowly working through everything, following a strict TDD methodology to make sure the code is covered, monkeypatching and mocking calls and creating fixtures for the exchange data. Now I’m getting to the point where I don’t know how to proceed, and I’m getting frustrated.

I don’t know where the problem arises in times like these, but I have a feeling it comes from lack of proper planning. I start out with a few procedural calls, then I get to a certain point of complexity where I have to start refactoring classes. Or I don’t know what to do next, and so I cobble come code together without writing a unit test first, and start breaking my flow.

All I can do at times like this is take a break.

Binance token mooning

Binance token has been on a bit of a tear the last few days. Apparently they’ve launched their own EVM compatible Binance Smart Chain, and are hoping to go after the DeFi space. Good luck to them.

I took a look at the validator instructions earlier to price out the cost of being one. It costs 10,000 BNB tokens, or about 300 BTC ($3 million), and about $244/month in AWS costs. That’s still a magnitude cheaper than running a $30 million Serum DEX node, but shows the type of centralization that we’re going to be seeing with these projects. I’ll keep running my puny IDEX node, and work toward my 32 ETH so I can run a Ethereum 2.0 node.

I’ve actually been holding my BNB tokens for two years, and they just actually touched my cost basis after spending so much time underwater. Since I’m actually trying to follow my capital preservation rules, I’ve had to put a tight stop on this latest run. I’ll have to figure out how to account for entry cost in my trade plan program, as now I’m just looking at the percentage of total. This may not work well when things start mooning and I have to recalculate on the run-up.

Jumping into the DeFi deep-end

I’ve decided that the opportunity cost for keeping my funds in BlockFi is just too great, and I’ve initiated some withdrawals. I’ll be putting the entirety of the funds set aside for my kids into the sBTC vault later this week, for a modest 40% APY. I must have stared at the withdrawal screen for five minutes before I could push the submit button. I must have read the wallet address over and over three or four times to make sure they were right.

It’s stressful, being your own bank.

Anyways, I’ve still made no decision on my cold storage funds. I’m risking way more than two percent on this vault, and any more would be irresponsible.

Famous last words.

Getting ideas

I spent some time coding Friday night, trying to update my trade plan script. It’s been a long time since I used it, and it doesn’t work anymore since it relied on the CoinmarketCap API to do lookups. So I’m starting from scratch.

Using the CCXT Python module to get my estimated balances off the exchanges is a bit more difficult than I had imagined. I can get the balances themselves, and then have to do some conversions using the last trade price in BTC. That’s a far as I got earlier. The next step is to do map limit orders against the positions to determine capital at risk, then I can start working on the trade plans themselves. I want the module to refuse to purchase if more than six percent of funds are at risk.

I’ve also decided to start moving funds from BlockFi over to Yearn’s sBTC vault. I did a test transaction last week, and I think it’s trustworthy enough to start moving things over. I still want to take a look at the contract code and see if I can make any sense of it, and there’s one other thing I need to figure out first.

I’ve allocated funds to my kids, and are holding some funds for my family members. I want to pool all these funds together, since moving funds in and out of the vaults takes a good amount of gas, and I want to minimize this as much as possible. Basically I’ll be farming USDC and BTC via the yCRV and sBTC vauts on yEarn, respectively, I just need to figure out how to track the amounts of assets from each individual.

I haven’t thought too much about this yet, but my preliminary idea is that I can use some sort of token to track contributions. Tokens will be minted or burned depending on how much someone contributes to the pool. But how to send those pooled funds to where they need to go?

I’m assuming that the yEarn vaults themselves use some sort of strategy contract to control what happens each time someone contributes. But in this case, I want to be able to control the funds myself. It seems, though, that funds would come in, I deploy them, and voila! But no. It’s going to be more complicated than that.

If I’m managing funds for four or five individuals, I’ll still have to manage wallets for each of them. I don’t think that this can be done with a simple spreadsheet, it’ll have to be tracked in a database of some type. Maybe I could build my own local contract to track it. We’ll see.

I’ll be looking over the Zapper and yEarn docs to see how I can interact with their contracts directly. I don’t necessarily want my contract to be on mainnet right now cause of gas transactions, this is why off-chain and side-chain projects were created in the first place, yes? Maybe I’m overthinking this.

I would need pools for each type of asset, so it could be a one-for-one token exchange. Tracking the value of the vault is where I’m stuck. I’m not sure how Zapper does it, so I have some more research to do.

While I think about all this, I’m also busy getting my Haven node spun back up. The vault is implemented, so it looks like I can move out of XHV into USD without involving an exchange. This will allow me some bit of trade leverage without having to deal with Bittrex for now. It just looks like it’s going to take a week for my node to sync up.

Week end report.

Today was a quiet day.

There wasn’t a lot of activity today. The markets were relatively flat, and I didn’t do much besides my day job. Most interesting part of that was doing some more work on setting up the environment for the Texas Instruments DSP compiler, which is part of my CI/CD pipeline project. I’ve still got a lot of work to do there, but professionally speaking, I’m not certain how much effort I want to spend on that given developments in fintech.

I finished recovering my Monero wallets and moved my funds to a light wallet, then it was on to repeating the process with Haven, which has been mooning the past few days. Unfortunately, the precompiled Linux executable won’t run on Ubuntu 18 because of GNU Library incompatibilities, and the Docker build failed also. I’m not sure how much time I want to devote to getting that together right now, given that I have to KYC with Bittrex to trade any of it.

My mining tracker needs some serious rework, since half of the pricing APIs are broken so I have to manually update everything. I should work on it tonight but I’d rather play video games. Priorities. Seriously though I may have to work on something tonight. I’ve got lots of work I want to do with the CCXT library and trade plans, so I might as well just bite the bullet and get started with it.

No trades or other on-chain activity. I’m leaning wrapping some BTC and sending it into the Yearn vault, but I’ll probably give it a few more days first while I work on other things.

Patience.

DeFi notes

I did quite a bit of reading today, I’ll share a few things I picked up relating to crypto and DeFi. I’m still trying to wrap my mind around it enough to the point where I can write a couple thousand words on it for my Substack, but for right now I still feel like I’m in the research phase.

DeFi is crypto’s latest craze, and it may soon challenge traditional banks – A good primer about DeFi and what’s going on in the traditional monetary systems.

Bitcoin of DeFi – about Yearn.Finance, covers the various sections of it as well as some of the background on it. Andre Cronje started it for his family and friends and codified it and released it to the public. Brilliant.

The Revolution You’ve Been Awaiting: Fintech + DeFi – Alternate title: “Software Robots and Automated Workflows”. Interesting read.

Guy Makes $250,000 a Day Yield Farming on Ethereum – Yes, but he started with $8.1 million ETH. I did take a look at the portfolio on Debank. $8m in Sushi swap, $4m in Swerve, and less in Compound and Balancer. Might pick up some SWRV just in case. Apparently I’m inadvertently staking there through Harvest USDC pool.

3 Rules for Healthy Pseudonymous Hygiene with Ethereum – With all this activity going on I’ve caught myself slipping a bit with my activities. I inadvertently shared a ETH tx with someone yesterday while I was depositing into Yearn yesterday, and now I consider that address burned, so to speak. I’ve got to be careful not to cross streams, so to speak, if I’m going to keep things clean.

And speaking of privacy…

The IRS is Offering $625,000 to Crack Monero – You bet they are. I’ve dealt with Cryptonote quite a bit, and it’s built on some solid math. Privacy tokens are the real thing, and Monero’s probably the oldest and most popular. I don’t see this happening anytime soon.

Getting serious about crypto yields

I’m a degen now.

I finally took the plunge, after a couple of test runs with Yearn, Sushi, and Harvest, and finally dumped a significant amount of capital into yield farming. Bankless published an excellent guide that I read this morning, and since the yETH pool is still closed, I decided to dump my stash of USDC tokens into Curve’s sBTC pool, and then staked it on Yearn where it’s now gaining upwards of forty percent ROI. We shall see.

The entire process was relatively painless considering the stress I went through with my previous forays. Zapper made the process even more so. It did most of the heavy lifting to get my Curve tokens, then I just had to stake them on Yearn, which was another step. And the gas used was only about half of what I was expecting, so yay.

Time will tell how long this DeFi madness can go on. I’ll probably take a breather for a bit and watch what happens. This feels like a pretty big step but I don’t want to go crazy right off the bat. I’m still reading through Mastering Ethereum, and it’s obvious that I’ve got a long ways to go toward understanding how all this stuff works, so I’ll just take it easy and get into it the same way I did with crypto: slowly.

There’s a first mover/early bird advantage to these markets, but I shouldn’t expect to keep getting lucky. Capital preservation is the name of the game. I’ve been so focused on it lately, and have been very aggressive with my equities positions. In addition to Overstock last week, I also had Tesla and NVidia stop out on me this week, so I’ve got a lot of cash available in my retirement account that I can deploy on more speculative bets. (Like I haven’t dumped enough on mining companies already…)

I’m continuing my value average program, but have also put stops on some of the ones that are running hot. Take profits. Hopefully that won’t come back to bite me if we actually get inflation. I’m just waiting for a broader pullback.

I’m keeping an eye on the ETHE premium. I’ve opened a small position, set some stink bids, and will scale in as I can while protecting my capital. The last week or has seen some crazy runs, I swear I must have gone up thirty percent and down fifteen in the last month. It’s insane.

If I’m going to make a living out of this then I need to keep calm and remember how to protect my positions. My equities trades are tax-exempt, but my crypto gains are going to be taxed like hell if I make any big moves. So far I’ve avoided liability, since my trades have been at a loss, and I haven’t opened any positions that have required stops yet. We’ll just wait for the market, buy low and ride it high.

No rest on Labor Day

Today is the first day of school for Elder, and one that will be entirely online. She’s got afternoon sessions, which means that Younger will be looking to me as a playmate. I don’t think I’ll be getting much, if any work done at all. We’re lucky she got the afternoon spot though, cause the eight to noon spot would be even worse.

Yesterday morning I produced a Labor Day Breakfast for the local political party. It was in Zoom, and they called me about three days out to put it together. I managed to use OBS as a virtual camera, and was able to queue up a half dozen videos in OBS so that we weren’t struggling with it using Zoom’s sharing capabilities. I just set the scene in OBS, put the spotlight on my video stream and hit transition. Voila!

It went really well, but was really harrowing. There was probably close to two dozen speakers, including our Senator, several Representatives, as well as numerous state officials. I managed to keep it on track, except for some of the speeches. By the end I was playing people off, Improv-style. The whole thing was about two hours. One attendee remarked that it was the best-run Zoom meeting that they ever saw. There was over one hundred people on it at one point.

Then as soon as I was done with that I had to get ready for a pool party, which meant I had to run to the grocery store for last-minute shopping. I only picked up a few things, but the store was crowded. As soon as I got back Missus loaded the kids up and we went to pick up her mom and headed off to the party.

I didn’t get to enjoy it for long.

About an hour after we got there, I got a message from a political committee member that the website had been “hacked”. I pulled it up and was met with the bare directory listing for the WordPress site. Index.php was missing, so my first thought was that it was a failed upgrade. I tried to pull up my management console on my phone to restore a backup, but the most recent one was months old. Oops. So much for relaxing.

I’m not going to get into the details of the hack or the recovery, I think this was a simple case of credentials being leaked. There were too many people that had access to it, and the committee secretary was given the site admin credentials to use to post on the page. Yikes!

I cleared that situation up with them and urged everyone to check their antivirus. One of the committee chairs was running a Mac with nothing but Malwarebytes on it. I swear. I locked the site down as much as I could with free versions of Securi and Ninja Scanner, so I think things are cool for now. This is the second time this site has been hacked though, so I’ll have to keep an eye on it.

I just checked the login attempts on the site, two attempts from Rio De Janeiro overnight.

Blood in the streets

Markets continued to tank today. So, we learn.

Seems like everything was in the red today. I didn’t take a lot of time looking at the markets today, but it seems that everything was down significantly. $BTC broke below $10K, and took everything with it, it seems.

The losses that got stopped out in the last week or two, like $BAT and $CVC, were actually good in that they preserved some capital. And since I only deployed two percent on the other orders I placed, I’ve managed to avoid taking losses on $ZEN and $SOL. I’m still waiting for my COSMOS/$ATOM order to hit, and if Aave’s $LEND token has another flat day I may pick up some of that as well when it hits a nine on the TD Sequential.

I’m also keeping an eye on the IDEX-ETH price. If it spikes I may trade some; I’m still open to the possibility of providing liquidity on Uniswap. We’ll see.

I read a lot of Mastering Ethereum. The cryptography chapter managed to put me back to sleep this morning, but I’m actually getting to the smart contract part and am looking forward to trying my hand at Ethernaut right after I get done with this. I’m really looking forward to writing some programs to watch what happens with these liquidity pools.

Should be fun.

Liquidity

Spent some time today delving into Uniswap. Here’s a couple of posts that have some good information:

Understanding Uniswap Returns

An Introduction to Automated Market Makers

I had a bit of a flash this morning that I should probably start exiting my IDEX position into ETH, specifically the yETH pool, but it turns out that Yearn has halted deposits on the pool. I’m glad i got my little test deposits in when I did.

Still, I was looking at the best way to exchange my tokens. On IDEX, obviously, but I have never actually used them since they implemented accounts, so I can’t trade there as of now. Binance has trade pairs to BTC, but that would involve another trade. Then of course, there’s Uniswap, so I took a look and found an IDEX-ETH trading pool.

The liquidity here is not very impressive. And I saw an opportunity for me to provide some, although I still don’t understand how the assets in the pool are being staked together. I would assume that the pool would need to be 1:1 in value between the pairs, but it actually looks to be about 1:2, as far as the USD value of IDEX-ETH. And I’m not going to put any more capital at risk until I understand what this “divergence loss” is and how I can keep from being affected by it.

I also spent some time looking for arbitrage opportunities. There was a bit of a price divergence between the IDEX exchange price and the Uniswap price, but the liquidity is so low that trying to take a large order would eat the price divergence back to par, and dealing with low amounts would have caused any profits to have been eaten up by gas fees.

So for now, I’ll take no action while I wait for a bit of a price recovery on IDEX and explore other opportunities. I’ve given up trying to get the Monero blockchain running locally, and have it syncing in a cloud server. What was taking over a week with my SATA stripe array looks like it’ll take a few hours on cloud.

Other than that, I’ll be working through Mastering Ethereum, trying to understand these smart contracts, and hopefully figure out how these smart contracts work, how to design my own, and how to build programs to interact with them.

Black Thursday

Today was a good day, unless you count what happened in the markets.

This morning actually started out pretty good. My four-year old slept in her bed for the first time ever, and both my wife and I had the best night’s sleep in a long time. Everything was pretty calm around here and I managed to get a lot done.

Bitcoin took a huge dump today, but so did most of my equities positions as well. I was actually pretty calm about it, as I had some stops trigger over the last couple days, so I’ve got my bigger positions protected. I even picked up some more Grayscale Ethereum Trust, $ETHE, as the premium held, and DeFi isn’t going away anytime soon. I was actually pretty calm about it. Staircase up, elevator down.

I had a couple stops set on $ICX and $LISK from last week, it looks like both of them triggered, but neither of my recent buys hit my stops, so that’s good. I picked up some $ALGO today as well, and Cosmos, $ATOM, just hit a nine on the TD Sequential, so I’m probably going to market buy some of that as soon as I get done writing.

I did spend some time fretting about my USDC holdings which are currently just sitting in my wallet. I’m half tempted to dump them in Yearn, but with the gas costs I’m probably just better off dumping it back in BlockFi. I am however, at total risk of becoming a degen and dumping my entire ETH holdings in the new yETH vault, with it’s shiny 99% APR. Thankfully I missed the withdrawal window to get my funds out of BlockFi until Tuesday at the earliest. Waiting is probably a good thing right now, so I’ll do nothing.

I spent some time reading over the Ethereum yellow paper today, and I plan on spending the rest of the evening Mastering Ethereum as it were. I want to be able to read these contracts and understand exactly what they’re doing before I go and do anything stupid.

And I’m really feeling the urge to do something stupid. I got a notification from my student loan issuer yesterday. The debt forgiveness has been extended until January 2021, so I don’t have any debt or interest to worry about till then. But I have an extra $600 a month that will be coming due then, and that is going to be a real big problem for me unless I take another job — or choose one of the other payment plans. The possibility of raking in some of that sweet, sweet, yield farming money is looking really, really good right now. If I was willing to dump all of my BTC into ETH and stake it, I could pretty much retire right now.

I know it won’t last for long, and I would rue the day I was born if I did something like that and lost everything to something like a contract failure or exit scam. I’m taking it real easy right now, and trying not to get caught up in some stupidity.

At least for now.