DeFi notes

This weekend was a bit rough.

The kids were on my nerves the whole time and my temper kept flaring up. The girls seem to think they can just do whatever they want and ignore what I ask them to do. It’s infuriating. Missus is stressed out from work, and has been sleeping a lot. I’m stressed out cause she’s sleeping a lot and it feels like I’m doing most of the work around here.

We did manage to have some fun around here. I had promised Younger an ice cream party if she learned her letters. She did that several weeks ago and has been waiting patiently through Halloween and her friend’s birthdays, and Saturday I took her to Cold Stone and let her pick out three different flavors. She was really distraught when I told her that her friends wouldn’t be able to come over till Sunday, and on Sunday she must have asked five or six times if it was time.

So they came over yesterday afternoon and had their ice cream in the backyard. And these kids are exhausting, man, I tell you.

We also watched Biden’s victory speech Saturday night, although I had a hard time getting Elder to pay attention to it. I told her it was important to watch cause she’s so young that she probably doesn’t remember anything about the Obama presidency, and I want her to remember this moment. Younger probably won’t remember it. Missus was more interested in Harris’s speech and making Elder watch it. She didn’t see any point in making her pay attention to another old, white dude. Still I think moving on from the Trump presidency as soon as possible is very important.


Most of my time this weekend was spent reconciling my DeFi transactions, trying to figure out how to reconcile the ycrvBUSD that I have. I owed the girls some, so I got those numbers recorded in my Notion database and moved a bunch more fiat into them. I was tempted to buy more BTC, but decided to stick with my stablecoin strategy for the time being.

I also spend some time on the Yearn Discord and reading over the smart contracts to try and figure out just what the heck is going on. I pulled my ETH out of the vault since it was inactive, and considered doing so with LINK save for the fact that I don’t know what else to do with it. I talked to someone about using it as collateral on Aave for something else, but I don’t want to risk it.

Also, it seems that there is a new test USDC vault, which there seems to be some excitement around. I was tempted to move some funds there but I’m playing with savings here. I’m already nervous enough after hearing of some US-based crypto lending firm filed for bankruptcy this week. I don’t know enough about their business model to know whether BlockFi is at risk as well, but much of CT seemed to think so.

After I deal with day job stuff I need to take a look at my altcoin lending portfolio. Several positions should have stopped out during the pre-election run up, but I’m not entirely sure I had my stops set properly. Cosmos, PolkaDot, and Serum are all well below my stops, only ChainLink has managed to hold its position. I need to calculate my losses and figured out if I’m allowed to make any November trades. I found a new degen yield farming site and am tempted to try and take a position on one or two. If I was smart I would just wrap my BTC and put it in a vault. Alternatively, I don’t have any CRV or YFI tokens, and as much as I’m relying on the vaults I should probably allocate some funds there.

But the best strategy might just be to hold my BTC for now. It seems on the verge of a breakout this morning, and I have no idea what equities will do this morning now that Biden has won. We’ll see.

Evening update

BTC was mainly quiet today, resting while alts seem to be pumping. Bitcoin has held steady mostly today while the election results come it. Several outlets are calling it for Biden, but several states are going to recounts. It seems that Dems may be able to squeeze out a Senate majority as well, pending results in Alaska (!) and two runoff elections in Georgia early next year.

I spent some time this morning thinking about how to design the Evil Ether Auction app, and exactly how I want to make it work. Nothing solid yet, but I’m trying to figure out how I want the mechanics to work. I’m thinking that it’ll will have a series of rounds, starting at one ETH, and that the proceeds from the first auction will be used as a starting amount for round two, and so forth. I’m thinking the last round would be for 32 Eth, enough to fund a masternode. I’ll either keep the proceeds of the last round, or possibly put a bid tax at some nominal amount as a developer fee. We’ll see how that goes.

My most recent fiat funds cleared ACH on my onramp, so spent more time today thinking about strategy. The GUSD Curve pool is basically garbage, so I’m probably going to stake the bUSD pool. There are a couple degen opportunities out there, Harvest seems to be going strong, recent hack withstanding, and someone pointed me to SnowSwap, but I’m not playing around with these funds. I trust BlockFi and Yearn, but I’m not willing to take chances on any other platforms with significant sums.

I also spent a lot of time thinking about tax ramifications of lending platforms and all this DeFi activity. It’s going to be absolute nightmare. I don’t think CoinTracking has done much work in this area, so I’m probably going to have to take a look at TokenTax when the time comes. Considering that it integrates with Turbotax, I probably should.

The rest of the afternoon was spent going over CSV exports of my Ethereum transactions, trying to line up all my activities over the past few weeks, trying to match fiat to various pools. I haven’t been doing a good job with my earmarked funds, and I’ve got some cleanup to do before I make any more conversions. Trying to keep track of funds earmarked for my family members in one wallet is proving tedious, but keeping them in a separate wallet is out of the question, given gas fees for vault deposits and withdrawals.

I have to be very disciplined if I’m going to keep things straight, and I’m still not sure the best way to keep track of it. Hopefully I can keep things straight in a spreadsheet or Notion table and not have to go as far as putting together a custom database or ledger. I’m going to go back to it here shortly and shore up my calculations and see what I come up with.

DeFi update

PRIA Burns Frontrunning Bots

Yesterday while I was puttering about on Telegram, I noticed a couple of large PRIA orders come through via a bot channel that I have pulled up. What immediatley struck me was that two of the three transactions were by the same address, a purchase and a sale, right before an after a larger order. It was apparent that this was a bot order trying to front run a transaction on the Uniswap pool, likely because of high slippage on the order.

What the bot owner didn’t account for was PRIA’s transaction burn. Between four and six percent of the purchased tokens were burned on during the attempt, resulting in about half an eth’s worth of loss for the bot. Oops.

This is part of a bigger problem in the Ethereum ecosystem, and why it’s considered an adversarial system. All transactions get sent to the mempool before they are mined in a block, which gives bots the opportunity to watch the mempool for transactions and try to front run it by submitting another transaction with slightly more gas.

Some have called this aspect of Ethereum’s architecture “the Dark Forest”. There’s a fascinating write up about it here that everyone should read if you haven’t already: Escaping The Dark Forest.

Another dev on the PRIA project has been trying to do KEEPR jobs the past few days and said that it is nearly impossible because everything keeps getting fronted as well. I’m not sure what the solution is to fix this problem, other than having private mem pools available via large mining pools, as mentioned in the article above.

At some point I need to dive into what solutions are being proposed by the Ethereum community, and compare how it’s handled in other L1 solutions like PolkaDot or Cosmos.

Value DeFi exit

A few months ago I tried staking some USDC in the Value DeFi seed pool v2, which was supposed to be earning 23% APY. The pool is closing, which I happened upon just by chance, and I just withdrew my funds for some underwhelming results.

I got my stake out, minus a bunch of gas fees, and got a couple bucks worth of $YFV back, which I then had to swap for $VALUE. Ok, I guess. I’ll just sit on this forever and see if it ever turns into anything.

The lesson here is that DeFi does not reward the timid. If you have less than a thousand dollars, you’re probably better off just keeping your money in BlockFi. Unless you’re a complete degen and want to ape into something with insane APY and risk getting rug pulled.

Currently, my main vault holdings are in the Yearn sBTC Curve vault. After that, it’s the Yearn BUSD vault. I’ve also got some Link in their yaLINK vault, which isn’t doing too well at the moment, but I can’t be bothered to move it right now.

My main strategy at the moment is to move funds that are locked into the Lending Club accounts I have earmarked for my kids, into stablecoins into various vaults. (This is on top of the BTC that I DCA for them into their BlockFi accounts.) I’m also trying to figure out the best way to maintain my cash flow between my expenses and lending platform. Moving in and out of vaults is expensive, so I’m trying to figure out the best way to do that. Quarterly, maybe? Keeping funds that need to be converted to cash in BlockFi for easy ACH back to fiat.

Keeping track of everything is proving to be quite the chore. I’m using a Notion database, but keeping track of where funds go, where they originated from (in the case of kids and other family members), and fees associated with the various conversions is a bit of a mess right now.

And tracking the value of the shares of these vaults outside of something like Zapper or DeBank is difficult. Right now I have no idea whether keeping cash in BlockFi at a stable eight percent with no fees is a better idea than trying to chase twenty percent plus with all the variability, contract risk, and fees.

I’ll keep working on a solution though. If you have one, please leave suggestions in the comments.

Turning wealth to income

Gas prices on Ethereum finally came down low enough yesterday, into the 200’s, long enough for my early ETH transfers from my mining account to come through to my main account, giving me the gas I needed to finally stake my USDC and wBTC into a couple vaults. Zapper.fi actually recommended the YFV USDC Seed vault, and I used Yearn’s sBTC vault for the main amount.

Since I’m actually pooling assets from various funds that I’ve earmarked for various members of my family, it’s becoming a bit of a challenge to keep things straight. I’m working with a Notion database, with rows for each person, and columns for the amounts of ETH, USDC, and BTC that they’ve contributed. I have another row for fees, where I’m tracking the gas costs in ETH for each of the transactions in and out of the vaults. I’ll have to create some formulas to help compute each person’s percentage of the total pot; I’m not sure whether I can do it in Notion, or will have to do Excel. Ideally, I would do it on the blockchain, but managing three of four Ethereum addresses is too cumbersome.

I finished Mastering Ethereum earlier this morning. It’s a lot less mystifying now, although I’ve still got a ways to go to understand a lot of it. There are ton of links within the book that will take me some time to read if I want to go that far into it, for now I’m going to continue working through the Ethernaut challenges and will figure out how all Uniswap and all these Yield farm vaults work. That’s the awesome thing about Ethereum, all the contracts are public, most of them operate as open source with the contracts right out there in the open. It’s actually quite amazing.

The Unidrop earlier this week has also got me thinking a lot about the difference between wealth and income. Bitcoin, and to a certain extent, the FIRE movement, has really got me focused on savings and building wealth. Right now, my timeframe for net zero was really dependent on the next BTC bull cycle, but the twenty percent plus interest rates in DeFi are forcing me to re-evaluate my plans. I had planned to do some trading and see if I could build my stack higher that way, but the risk/reward ratio has been upended.

I’m still very tempted to move the remaining eighty percent out of my hard wallet and stake it in a vault, but the returns at this week’s levels isn’t high enough to justify. I’m not going to stake my entire stack against contract risk and the other factors inherent in the system for what amounts to one-sixth of my current salary.

If BTC hits $60k, though, that’s another story.

Uniswap Day

Heaven forbid you actually needed to use Ethereum yesterday

I was all ready to take the plunge yesterday and had moved a large portion of my BTC to wBTC. I just needed a bit more ETH to pay the gas fees for the zap into the vault. I set up a tx between my test wallet and my main wallet, with an average gas cost around 119 gwei. Metamask estimated a two minute transaction time, but after five went by I started looking at the gas costs. “Slow” was now 140 gwei. So I resubmitted the transaction. Five more minutes, then gas was up to 175. What the hell was going on?

Things kept escalating over the next hour, reaching 400-500 gwei. Something was happening. Etherscan’s gas tracker showed Uniswap’s router taking about a quarter of the available gas on the network. That wasn’t too unusual, it’d been up there for some time. So I decided to go on Twitter to see what was going on.

It didn’t take long to figure out what was going on. Uniswap had airdropped their governance token, UNI, into the hands of everyone that had used their service. At least four hundred UNI tokens were available to be claimed by everyone who had ever used Uniswap to make a trade, more, I’m sure, went out to LPs. Ethereum was clogged up with people trying to claim the tokens. Binance had already added UNI to their exchange.

Those tokens were worth twelve to fifteen hundred dollars last night, and are currently trading at about a grand. Unfortunately, the cost to claim and swap them is exorbitantly high right now, as gas pices are still well over 600 gwei.

It’s apparent that this trend will continue with Ethereum for the near future, as gas prices continue to rise, forcing small player out of the market. After all, what’s the use of trying to move around <$1000 amounts of ETH or other tokens if you’re paying $100 in gas for the privilege. That said, it will be likely that Ethereum will wind up being the chain for large financial operations, with other, smaller projects being forced off to side chains or competing projects.

With that in mind, I spent some time earlier today doing some research into Polkadot, looking at toward running a validator node, or even doing some smart contract coding on it as well. It’s an interesting project, but the cost of running a validator node and learning Rust will have to go on the backlog for now.

For today, I’m just watching equities markets get crushed and considering whether to buy some more ETHE. It’s holding steady today while everything else tanks, and I don’t have enough that I need to worry about setting stops on my position yet. The premium is sitting at this level, so I may

Crypto markets are mostly green. Haven is back up today, so I’m swapping out to xUSD a bit at a time. I’m still watching CELO, although I don’t have any capital free right now to grab any.

So for now, I’m stuck with transactions in mempool, so I’ll just wait a couple days, and hopefully things will calm down enough for me to get my funds moved into Yearn.

At the top of the diving board

DeFi is completely insane and massively complex.

I’m about to load up the yEarn valut with some wrapped BTC, and am planning on staking about twenty percent of assets under management. This is almost insanely risky, but I believe that of all the projects in DeFi, the one I’m picking carries the least amount of risk.

We’re putting our faith in several assumptions.

  • The wBTC protocol is secure, and that the BTC that we put in there will be safe when we decide to withdraw.
  • The Curve protocol is secure, and that the smart contracts are safe. Of course, there’s a ton of assumptions nested here as well, including the other tokens in the pool, renBTC and sBTC.
  • That the Yearn valut is secure, and that they know what the hell they’re doing.

Anyways, I must be insane.

I’ve got two out of three withdrawals out of BlockFi. I decided to use exchange funds instead of paying their thirty dollar fee to make another withdrawal. (I burned my freebie on a test tx.) I put in an order to convert BTC to wBTC, and that took all night to trade at an even price. After that completed I put in a text tx to my Etherum address, and then sent a max withdrawal after that cleared.

Now that those funds are sitting safely in my wallet, I have to choose whether to go ahead and proceed with loading the vault, or if I want to convert the rest of my BTC first. I think that’s wise. I feel like quibbling over the gas fee is probably stupid considering the size of the position here, but every bit will count in the long run.

If this works out, assuming that everything is safe and that my deposit grows at the respectable forty percent that I think it will, this could be one of the most significant, life changing decisions that I’ve made since getting involved with crypto.

We’ll give it three months and see.

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.

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.

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.