SushiSwap FOMO

More DeFi madness.

Well I learned quite a bit about DeFi today, and things really escalated quickly after I succumbed to a bit of FOMO. Thankfully I didn’t go too crazy.

I’d been seeing news earlier in the day that Uniswap, a ERC-20 DEX had broken $500 million in volume, and then read some info about SushiSwap, which is basically going directly after Uniswap. Uniswap operates by providing fees back to liquidity providers. Then this tweet happened:

And that’s exactly what SushiSwap is.

The developer behind SushiSwap, the anon Chef Noni, describes it as Uniswap with Sushi tokenomics. LPs are provided with rewards in Sushi tokens, but the main difference with UniSwap is that LPs can withdraw their capital and still earn rewards by holding Sushi later on. Right now, they’re just stealing liquidity directly from Uniswap, but the plan is to launch their own native pool in the coming weeks. In the meantime, as an early mover advantage, they are providing 10x staking bonuses to LPs, and another 5x to those that stake the SUSHI-ETH Uniswap pool.

The project launched just 72 hours ago, and already has $57m in liquidity with over $99m in volume. The SUSHI itself has gone from $0.90 to $6.00 in that time. The context here of course is YFI and other DeFi tokens that have had 10,000% gains in the last month. Could SUSHI see a run like this?

Obviously, the risk/reward here for a small stake seems immense, so I decided to give it a shot and see what is going on. SUSHI was trading around five or six dollars earlier, so I decided to throw some ETH at it. I made a bit of a mess at it, but I eventually got it figured out.

In order to be an LP on Uniswap, one has to provide equal amounts of assets on all sides of the pools. In most cases, it’s just two tokens, like ETH and DAI, but in others it might be three or even four tokens. After pooling your assets you’ll be provided with the relevant Uniswap token for the pool.

Of course the point to these pools in the first place is to facilitate swapping between the pool currencies in the first place, so the first thing I did was use Uniswap to purchase SUSHI. I wanted to stake in the highest paying pool, which is the SUSHI-ETH one. You can follow along with this guide here, but please check the contract addresses before sending any funds. The SUSHI token contract address can be verified here.

From there it was just a matter of adding my newly acquired SUSHI to the pool along with an equivalent amount of ETH. And this is where I messed up. Uniswap attempts to calculate the exchange rate between the two currencies before sending the transactions, but the volatility of SUSHI was too much for Uniswap’s default slippage percentage of one percent. My first two attempts at the conversion failed, wasting about ten dollars in ETH, before I raised the slippage to ten percent and it went through, giving me SUSHI-ETH Uniswap tokens.

I now was an LP in the same pool that I had just used minutes earlier to exchange my ETH for SUSHI in the first place. The conversion was not one-to-one; five SUSHI and equivalent ETH netted me 0.540 LP tokens.

The next step was to stake my SUSHI-ETH LP tokens in SushiSwap. This also took a fair amount of gas, but managed to go through at a fairly low rate. All in all I staked sixty dollars between ETH and SUSHI, and over twenty dollars in gas.

I’ll admit I got really wrapped up into a severe case of FOMO while setting all this up. Thankfully I’ve calmed down and managed to refrain from any additional buy-ins. DeFi is moving very, very fast, and I found myself in bit of a mania today. Thankfully I’ve managed to limit my exposure to just a hundred dollars.

Still the urge to go and swap a couple hundred dollars of stable coin or ETH is still there at the back of my mind. I just have to keep telling myself: risk management risk management risk management. I might wake up tomorrow and find SUSHI up 10x, or down to pennies. Either way, things are moving so fast right now that I’m sure there will be plenty of opportunities to deploy more capital in other projects. The last thing I want is to run out of dry powder this early in the game.

I’ve been so obsessed with the price of BTC the last few weeks. DeFi is the only thing that’s managed to keep my attention off of it for half a day or more, but it’s fueled a whole other obsession. We’ve still got four whole months left in 2020 and it seems like it’s going to be a doozy.

Work weekend

Another weekend draws to a close.

Today was not nearly as productive as yesterday. I spent most of the morning messing with VMs and blockchains, trying to get things Monero and Arrow synced back up so I can access my funds. I managed to combine four 250GB drives together into a striped software RAID (converting Win10 from AHCI to RAID is just too cumbersome), and configured WSL 2 and Docker on it.

Trying to build Monero from scratch in the official Dockerfile was a wash. One of the dependencies wouldn’t build, so I just wound up downloading the precompiled binaries. Things are still pretty slow to sync, and could take another week. I may use some of my Azure credits and just start tucking stuff there. We’ll see.

I did lots more reading on various projects, mostly DeFi stuff like Curve and Yearn. These things are really complicated, and I don’t have the type of free capital to deploy to really take advantage of these protocols, given the high fees.

Probably the most interesting piece of news today was about this new Project Serum DEX. It’s built on Solara, of which I had never heard of before, but there’s so much going on with this project that I was just fascinated. The hardware requirements for the nodes themselves are quite impressive, and it looks like it requires about thirty million dollars of SOL tokens for a stake. I’m not sure how this compares to similar projects, but it’s pretty obvious that this is out of my league.

I’m still evaluating other options, a ChainLink node, perhaps, but it seems I’ve been priced out of that as well. I’ll just have to stick with my IDEX node for the time being and start testing for Etherum 2.0. The requirements for that are still within my grasp.

In fact, ETH is the most profitable token up on the mining calculator right now, so I’ve switched the rig over. I’m not sure what this means for my BEAM converter, but I’m waiting for slight bounce back in price before I sell to cover August’s mining costs.

My immediate goal is to figure out how to generate income. I spent too much of the last two years focused on politics and finishing my degree. I think I’m mostly done with my little adventure doing WordPress builds. The opportunity is just too big to miss right now.

I’ve got work to do.


It’s been a remarkably productive day today at the homestead.

We allowed the girls to stay up a bit last night, I wound up going to bed a bit earlier than usual on a Friday as I had my bender Thursday night. We all woke up and were out of bed by seven. Even Missus gave up on trying to go back to sleep as she normally does.

We were expecting rain this weekend and most of next week due to the hurricane that’s been moving through the gulf coast, so I went out as soon as was neighborly and did my monthly weed-eating. Missus tended to her flower beds, and even I wound up pulling some weeds and laying some mulch myself. I also downed some limbs in the backyard as well. All of this before eleven in the morning.

Missus had me hang a new shelf over the bathtub, and I don’t know what was getting into me at that point but I must have felt motivated, cause I started cleaning out old piles of computer junk. My downstairs office almost looks empty.

I’ve got about a dozen or so hard drives that have just been laying in boxes, ones I’ve pulled out of clients machines out over the years, lots of five hundred gigs and under. I actually recabled one of my machines so I can start inventorying them and cleaning them out so I get rid of them. So now my upstairs office is a mess, but I have a plan to get rid of a lot of old equipment, routers and access points, all kinds of stuff that’s just been laying around the house. The reorganization is long overdue, and it’s helpful to see how things are developing. Calming, almost.

I’ve done enough for today, so now I’m going to spend some time working on my programming projects, restoring some blockchain wallets, and doing some research on LINK and ETH 2.0 nodes. You know, the kind of things one does on a Saturday night.

Evening update

Today was supposed to be my self-designated RDO, or regular day off from work, something I’m experimenting right now as a way to reclaim some of my time so that I can work on personal projects. I did wind up doing a fair amount of reactive work for my day job, but got a surprising amount done still.

Of course I was focused on money: activities in the equities markets, crypto, and trying to make sense of what the hell is going on in DeFi right now, which is just a bit mind boggling.

I did finally say goodbye to my Basecamp account. As much as I like the product, the monthly fee of a hundred dollars is just too much for me when I don’t have any active projects going on. I think I can do most of what I need there in Notion, anyways.

Of course I rewarded myself by starting a TradingView trial. After god knows how many years I’ve been using that, and I’ll never have to see a stinking nag screen or ad again. Hallelujah.

I caught some nice profits off of Materialize ($MTLS) earlier this week after placing a trailing stop on them after they hit a nine on the TD sequential. It got pulled up with a spike on Wednesday I pocketed a nice one hundred percent gain. I’ve had a value averaging protocol in place on this one for more than three months now, and reset the position to start accumulating again while I watch and see if the TD generates a buy signal.

Materialize ($MTLS). Value average accumulation period in white box.

I’m not seeing any good entries in the crypto markets right now. Cardano (ADA) looks like it might be setting up for a buy zone. It seems to be at the support formed by the June buy setup. I would probably size my position here to stop just under the 200-day MA.

Cardano ($ADA) chart

Tezos ($XTZ) seems to be a bit of a mess, but might be worth a look. It looks like it takes 1000 XTZ to stake, which is a bit much for me to accumulate, so I’ll keep this one on the back burner at the moment.

Tezos ($XTZ chart)

The topics of staking came up in conversation with an associate today. My IDEX holdings are maintaining for right now, and I’m eagerly awaiting the release of IDEX 2.0 in the coming weeks. I don’t know whether that will be a “sell the news” type of event or not, but I’m hoping I’ll have enough of a stake to operate a Tier 2 node when the specs are released. Still no word on what that’s going to look like. In the meantime, it looks like I’ll be getting double the staking rewards every two weeks.

Perhaps the biggest decision right now is whether to accumulate more Ethereum in advance of the planned change to poof of stake. 32 ETH seems to be the magic number needed to create my own money-printing machine. That’s going to require a substantial investment, but will it be worth it? I’m guessing yes.

I was also exploring the possibility of running a ChainLink node. Interestingly, it doesn’t actually require staking LINK, although ETH is needed. The hardware requirements are pretty steep though, requiring 16GB of RAM. Running one in AWS isn’t going to be cheap, but if LINK continues to perform, it may be worth it also.

And speaking of LINK, half of my original ICO proceeds are now officially locked up in a Yearn Vault. I may have been overzealous, cause I still don’t understand fully how it works or is paid out. So far it has cost me a bit of gas to purchase Aave’s aLINK and deposit it in the Yearn vault, not to mention the cost I’ll incur to pull it out. For now I can just wait and see what happens, and watch to see if any more buying opportunities arise. The price has really pulled so far ahead of the moving average that I would expect it to consolidate or pull back for a while. Given how much ChainLink has been up to, though, there’s really no telling how far up this is going to go. I just can’t see selling any of this right now.

And I still won’t be buying anything yet, until I get my trade plan program up and running. I haven’t looked at it in a year, and who knows what I was doing last time I worked on it. I’m almost scared. I’ve got a few more things I want to do with my BEAM converter before I change gears to work on it, so hopefully we’ll have several more weeks of opportunity before things start to take off.

Building steam

I continue to focus my activities on cryptoassets and trading.

I’ve had some mild anxiety over some of the sells I made, BAT especially. It’s not that I feel that strongly in it as a long term play, but I just had a tinge of a feeling like I’m going to regret that one. I’ll just keep watching and see if an entry comes up on the TD Sequential.

I’ve been starting at this indicator across my watchlist for the last few days, both with crypto and equities, trying to see if there are any rules I can glean out of it. It looks like it’s going to be impossible to call the tops with these signals, but they do seem like they make nice support and resistance lines. I’ve seen many, many times where the price has bounced of a previous top or bottom. I’ll either have to prepare my orders for prices that are approaching a potential signal, or revisiting a previous one. It’s also import to remember that it’s better not to get focused on catching the tops and bottoms so much as it is about getting the trend right.

I’ve only made a couple of sells lately, and am still watching for potential buying opportunities. I haven’t seen anything especially interesting yet. Most coins are well above their moving average, so I’m paying special attention to those coins that are still trending below it and haven’t joined the alt-party yet.

Before I jump into any position though, I’m going to take my time and plan out my trades. I’ve got to revisit my old trade planning tools that I scrounged together in Google Sheets and Python previously. Since I’ve learned how to pull data from exchange APIs, I should be able to hack a program together that will track the prices in real-time and set my entry and exits automatically.

But first, I’ve got to finish work on my BEAM converter. I’ve got most of the functions I need to check prices, compute my mining costs, and send a transaction to the exchange, so I’ll need to finish writing up the order functions, as well as another to send funds to my hard wallet (if that’s what I want to do). I’m hoping to have that done by this weekend.

Yearning DeFi

High contract fees on optimized lending platforms may be roadblocks for casual retail investors

I spent a good deal of time researching DeFi yesterday, mainly trying to figure out what the hell Curve and YFI are.

I’ve spent several months with deposits on BlockFI, where my crypto and stable coin assets are making between six and eight percent interest. It’s decent, compared to bank deposits right now, but I keep coming across these insane valuations on certain lending protocols, upwards of twenty five, sometimes as high as one hundred percent APY. What is going on, how risky is it, and how do I get in on the action?

Most of the lending protocols, take Compound for example allow users to deposit certain tokens, such as DAI or ETH, and receive interest on these deposits. Alternatively, users use these deposits as collateral for loans with which they can receive other tokens. BlockFI offers USD loans as well, at rates around nine percent.

I’ve never found a reason to participate on the borrowing side of these platforms. Apparently people use them to make short-term trades, possibly staking them on other platforms, but that’s been a bit risky and complicated for my tastes. I’ve stuck to the lending side of these platforms, becoming what is known as a liquidity provider, or LP. (I think it’s interesting that this acronym mirrors one from venture capital, for limited partner. The comparison is quite apt.)

One of the reasons that I settled on BlockFi for my deposits is that they are more aligned with traditional finance, and I feel a bit safer keeping my funds there than with a smart contract that could be susceptible to the usual risks such as code vulnerability. (See the DAO hack for an example of this.) The other is that they had higher rates than Compound and some of the other competitors. At least, they did.

And that’s where these newer DeFi protocols come into play. Curve is one smart contract platform that automatically maintains users’ funds in whatever system is offering the highest interest rate. This is done automatically whenever someone interacts with the contract by depositing or withdrawing funds. The advantage here is that LPs don’t have to deal with it manually and also save gas in the process.

The downside is that it is relatively expensive to interact with these contracts. I did a small test transaction today, exchanging LINK for Aave’s aLINK token, which I then deposited in a Yearn Vault. I paid almost $90 in gas between the two. Since the fee is flat and not based on the amount of funds, these types of systems are geared toward larger liquidity providers. (As of this writing, Curve had over $800 million in funds in its stablecoin liquidity pool.

Platforms like Aave, Curve, and Yearn are some of the most cutting edge in the DeFi space right now, and I’m just getting familiar with them. There is a lot of risk here, as we are talking about some uncharted space. Not only is there risk of contract failure and security audits that need to be done on these contracts, one tutorial described some of these governance token staking as the “derivative of a derivative of a derivative”. And I remember what happened in The Big Short.

I’m going to pause before I send any more funds into one of these platforms, until I can do some more research and weigh the options. This is clearly a space for large liquidity providers, and may be more than I am willing to risk at the moment.

Crypto prepping continues

I spent most of today focusing on crypto and equities.

On the equities side I put trailing stops on several of my large positions, including Amazon, Tesla, NVidia and Netflix. All stops were calculated as a dollar amount equal to two percent of my total portfolio value. These positions are large enough that I don’t anticipate any of them triggering as part of any short-term movement, but they’ll serve as circuit breakers in the case of any major downturn.

I spent a good deal of time looking at all my positions and watch list, trying to see if there was anything to be gleaned from the TD Sequential setups. I’m using it as a guide, but haven’t developed any hard rules about it yet. Basically I’m looking for any positions that have moved above any sell signals, and am setting stops on those positions.

As far as crypto goes, my NEO position closed yesterday, after bag holding for almost two years I let it go at an eighty percent loss. It had a bit of a run lately, but I’m going to stick to tokens that I actually care about long-term. For that reason, I’m also preparing to unload my OmiseGo, Lisk, and Civic tokens, at some substantial losses. Also, I’ve put my Brave tokens, BAT, up as well, as its had a nice run lately. I’m almost flat on it and am holding a four-figure position on it. I’m also putting a stop limit up on 0x, which I once had high hopes for. Maybe DeFi will lead to some more growth, but for now it’s up on the block.

Since most exchanges don’t support trailing stops, I’m going to have to keep an eye on these positions, and adjust them accordingly. I’ll look for further TD Sequential sell signals, and tighten them as needed. However, I am investigating some automated tools to make this happen.

Right now I’m basically harvesting losses. I’ve used taxes as an excuse not to make any trades, but I don’t think that’s going to be a wise choice in the coming months. I might as well take some losses now and offset some of the massive gains that will be coming later on.


Speaking of massive gains, my IDEX holdings have absolutely exploded. After being underwater for most of the last year since I started staking and running a node, it’s not only recouped its value but has gained almost six times over the past month. A few days ago it was listed on Binance and shot up forty percent almost immediately. I’m in a bit of a pickle. I’m staking and earning a small reward each month as a result. But the value of the tokens has appreciated so much now that it would be irresponsible not to take action. If I move the tokens to the exchange though, I have to wait another seven days before they can stake again.

I guess in this case it makes sense to lose the stake and prepare to take profits. I have a feeling that there’s going to be a lot more gains in store for IDEX in the near future, but I need to think about protecting my capital and taking some profits off the table.

It’s a hard decision.

There are other assets that I’m delaying action on.

I considered taking some off my GBTC position off the table today but decided against it since its slightly underwater. A full sixth of my IRA is in it right now, and even the slightest movements cause oversized actions to my balance. I can only imagine how it is going to look when we get to six-figure bitcoin. I’m used to it now, and hopefully I’ll be able to stand it as we make the next leg up to new ATHs.

I’ve also made a nice sum in ChainLink, all the way back to the ICO. I haven’t touched it the entire time, but recent pullbacks are making me consider pulling it to the exchanges and setting some limits on it. Not yet though.

I have some other tasks that I can work on in the meantime to delay any overreactions. I sense myself getting a bit manic about things right now, and the last thing I want to do is pull out of too many positions. There are some tokens that I’ve been wanting to get exposure too, thinks like Comos/ATOM, REN, and ALGO, but I’m hesitant to move anything out of cold storage to take it. So I’ll have to free up some funds elsewhere. All I know is that I don’t want to touch my ETH for now.

For now I’ll put stops on these gainers, sell off the rest of my losers, and then wait for buying opportunities in the others. I’m playing with a small stack right now, and I’ll use the next few weeks to solidify my rules. And making sure that I have the discipline to stick to my two percent capital preservation rule is key.

In the meantime, I’ll work on codifying my decisions into code, and wait for the opportunities to come to me.

Getting ready for alt season

Making preparations for the coming bull run moon rocket trip

I spent a good deal of time this weekend getting my cryptocurrency affairs in order. More and more of my attention is getting pulled into the space, with the price of bitcoin hitting a yearly high, and insane price action happening in the distributed finance space. Altcoins are starting to make moves, and I needed to do some housekeeping to prepare for any possible parabolic runs.

I’ve got several dozen ERC-20 tokens associated with my Ethereum accounts that are easily accessible via my hard wallet, but a lot of tokens have their own softwallets, and I’ve many of them haven’t been accessed in months. Several are nothing more that backups of wallet files on old hard drives that I have laying around.

There are numerous stories over the years of people who have struggled to recover bitcoin funds after having forgotten about them for several years, only to find that their magical internet money is now worth millions of dollars. My favorite one is the guy that tried to dig up the city dump to find an old hard drive that he tossed out. I have no intention of being one of those guys.

Multicoin wallets

I’ve been debating whether I want to mess with syncing blockchains locally, or just doing it on a small AWS instance. A few days ago though, the subject of multicoin wallets came up, and spent some time Friday loading up Guarda, and figuring out how to import things into it. I managed to recover several chains successfully, but it doesn’t have everything that I need. There’s just too many coins and tokens out there for any one solution, so I kept looking at other solutions, like Coinomi.

I have a hard wallet that I’ve been using for my primary cold storage, and yesterday I found out that Exodus integrates with it. So I downloaded and gave it a go. It’s solid, allowing operations with the hard wallet directly through it’s UI. Operations still have to be confirmed on the device, but it allows operating on the Ethereum tokens without having to use MyEtherWallet or MyCrypto.

One problem that I have with it is that for many tokens, it doesn’t actually allow importing existing accounts, per se. It allows a “move funds” operation, which basically sweeps funds into Exodus’s (non hard-wallet) accounts. This leaves a bit of dust in the accounts. Guarda, by contrast actually stores the account keys, which means that they’re not moved.

Mental preparation

In 2017, my first bull run, I watched as bitcoin and various altcoins exploded in value, and my crypto portfolio increased ten times over in the span of a few weeks. I wasn’t mentally prepared, even after ten plus years of managing my own stocks. Nothing can prepare you for crypto’s parabolic runs. But just as quickly as things ran up, did they fall back down, and I watched what was potentially six figures of coins drop down to one-fifth over the following year. Now I’ve got strong hands, and didn’t sell anything, but I cursed myself for not taking profits when things were going crazy. I’ve spent the last two years of this dark crypto coming up with a plan for what I was going to do when bitcoin has it’s next bull run.

I feel that such a run is imminent. In the past, bitcoin’s runs have followed the four-year halving cycle, which passed earlier this summer. On chain metrics seem to be where they need to be, hashrate is at an all-time high, coins on exchanges at an all-time low, price action seems to indicate that we’re nearing the end of a long consolidation period; even Google trends seem to be indicating retail interest is picking up. And with institutional investors at the doors, there are all indications that this next cycle will be intense.

I had been dollar-cost averaging bitcoin weekly up until earlier this year, when I decided that the percentage of my net worth invested in bitcoin and adjacent public equities bordered on over exposure. I’ve set price targets on my equities based on value averaging protocols that I’ve implemented, and I’ve got a price target for bitcoin based on they Mayer Multiple, which tracks the price of bitcoin as a multiple of its moving average. My target is near the 2017 top, and when bitcoin hits it, I’m going to take some profits.

I also have a secondary target that I’m eyeing, which I’ve calculated as the price that bitcoin will hit that will give me financial independence, allowing me to pay off my car, student loan, and mortgage debt. I don’t have any plans to sell at this level, but when we hit this level (and I’m convinced that we will), I’ll be taking steps to make sure that this wealth is preserved.

Trading again

Since I’ve got all the fiat I can spare locked up in bitcoin for the foreseeable future, the goal now is to convert the other various cryptoassets that I’m holding into more bitcoin. Many of the other assets that I’ve acquired are doing quite well, but I’ve got a lot of others that have not. It’s time to clean them up.

Several tokens that I’ve been bag-holding for the past two years have had some signs of life lately. I’m still down eighty percent on some of these and they’re worth pocket change at this point, so it’s a perfect opportunity for me to get in the habit of selling. Carter Thomas was a big proponent of this during the last run. Selling small amounts and taking some profits, to make it easier to do so when the time comes to make life-changing trades.

There are many trading indicators that people can use to make decisions; the disciple is making it automatic, and not on emotion. I need to develop a system that I can write down and refer to so that I don’t mess things up and lose money. I’ve decided that I’m going to use the TD Sequential indicator, which is available through Trading View.

A couple of my tokens have hit new yearly highs, triggering this indicator, so I moved them to the exchange last night and set limit orders. Most exchanges don’t have trailing limits like most brokerages, so for now I’ll be keeping a tight eye on them while I research automated options. I could only bring myself to move the ones worth three figures in value. The ones worth less aren’t worth my time right now, and I can’t bring myself to touch the ones worth more.

Things quickly get serious when trades have a thirty or forty percent gain overnight, and you’re looking at a five figures trade. Having a plan is good, but when things take you unaware, then doing nothing is usually better than falling prey to emotion. Price may take a dive, but most times I’ve found things tend to consolidate, giving you time to think. This is more true of more established tokens. Many small cap coins are heavily susceptible to pump and dumps.

The important is not to get caught by FOMO and rush into a decision. The goal here is to buy low and sell high, not the other way around, so a plan is a must. While my long-term strategy is to accumulate more BTC, I’ve got several other tokens that I’m bullish on long term, and will be looking for entry points on these as I sell off some of my other losers. Getting caught up in some other shitcoin because of a recent pump is a no-no.

Risk management is critical, as is having a exit strategy. If I’m going to base entry on a position based on the TD Sequential, then I’ll makes sure I have a stop loss based on my two percent max loss rule, and will use the sequential indicator for when it’s time to sell. None of this fly by night trading.

…and Taxes

Taxes are inevitable. I’m aiming for life-changing gains in the next year or two, and I’ve got to make sure that the IRS gets their due. I’ve used CoinTracking during the last bull run, and renewed my subscription last night in preparation for my first sales in a year and a half. There’s going to be a lot of loss harvesting as I clean up positions, and CoinTracking will make sure that all my realized gains and losses are compiled into a nice report that I can use next April. It will pull the transactions directly from many exchanges through APIs, as well as public Ethereum transactions. I’ve got some work to do to get things cleaned up with my softwallets though.

It also tracks mining proceeds, but it’s a bit more difficult to keep that up to date. The proper guidance is to declare cost basis when the coins are mined, but keeping up with the sheer amount of transactions is impossible. Instead, I prefer to use cost basis of zero and record the transaction when coins are exchanged. I’ll admit that it’s a bit of uncharted territory for me, and a lot depends on what the coin is and whether they touch exchanges that I’ve KYC’d on, or addresses that may have interacted exchanges in the past. This isn’t a big deal for me since most of the coins I’ve mined, with the exception of some ETH or ETC, have never left the mining address.

Fun times recovering BEAM wallets

I don’t always ruin my crypto wallets, but when I do…

So I had a little bit of a screw up last night that almost cost me several hundred dollars in $BEAM. I was working on my automated exchanger program, and wanted to set up the BEAM wallet-api. It wasn’t included as a release like the CLI node and wallet programs, so I had to compile from source.

I cloned the git repo and tried to compile, but I had older versions of Boost and CMake that needed updating first. This wasn’t much of a problem, but after I got things compiled I actually wound up with executables ending with -masternet. I thought this was slightly unusual, but I threw them in with my node and wallet database files and ran them. I didn’t know it, but I had already made two mistakes.

The BEAM developers took the unusual step of using the Git master branch for their development branch. I had missed it in the build docs. So when I ran wallet-api the first time it actually upgraded my DB to this development version. Of course there was a mismatch with the node, which I caught, so I ran the updated node software as well. I still didn’t realize that I was running on testnet, and of course the node blockchain wasn’t valid. I was stuck.

I’m not sure how I finally made the connection, it might have been another read of the build docs, but I eventually realized that I needed to checkout the mainnet branch and build from there. Once I did that, I was still stuck, as the node and wallet DBs were already upgraded past the current version. So I had to download the entire blockchain before I could try to check my wallet. Oops.

That was done when I woke up this morning, but I still had several problems before I could fully recover my funds. The wallet DB was no good, and my first attempts recovering the wallet failed. “Invalid seed phrase,” it said, although I was one hundred percent sure I had saved the original phrase correctly. I eventually found a github issue that indicated the proper CLI input for the seed phrase, and was able to recover the wallet.

Unfortunately there were no funds in it. Due to the way privacy and anonymity is implemented in BEAM, the UTXOs belonging to the wallet can only be rescanned from a node running with the owner key active. This is usually used to collect mining rewards from multiple nodes running the same wallet, so I had to restart my node with this key, allow it to rescan the entire blockchain, and then run my wallet with the rescan option. Then I was finally able to see my funds in the wallet.

Obviously the main lesson here is that I should make backups of my DB files before updating anything relating to nodes or wallets. I should know better, honestly. Still, it serves as a bit of a reminder just how complicated cryptocurrency and blockchains are. We are still early.

Still, there’s a lot that can be improved by the Beam team to make things a bit more user friendly. Obviously GUI users take precedence for the teams, but a couple minor changes could go a long way. Keeping your development branch in master just seems… strange to me. And a bit of clarification in the CLI --help option would go a long way for the recovery process.

And when I’m ready to start back up work on the wallet-cli application this weekend, you can bet I’m going to do it with a testnet implementation.

Update 8-23-2020

After recovering my wallet and funds, I found that exchange payouts from my mining pool were not occuring. Turns out that the wallet address created by the wallet software are somewhat non-deterministic, and will not be restored on import. I was facing the prospect of having to contact the exchange and asking them to payout funds to another address, which I was sure would be a hassle.

Instead I decided to recompile the masternet branch of the wallet software, and managed to run the export data command (against a wallet backup!) to get all of my addresses and other data as JSON. I was able to import this into my live wallet, and verified that the address was restored.

After a few hours I checked, and verified that the pool had paid out.

Cryptocurrency mining auto-exchanger

How to convert mining pool proceeds to bitcoin

I haven’t done much programming lately, at least rather I haven’t written much code lately. I still rely on some things that I’ve written; my value average programs for my self-directed IRA is something I use every day. But I’ve been so tied up with other projects lately that yesterday was the first time I’d really sat down and started writing a program from scratch in a very long time.

It’s amazing how much I’d forgotten.

I’m writing a new Python program, this one to do some automatic selling of cryptocurrency mining proceeds. My little six-GPU mining rig has been chugging along for some two years now, and has yet to turn a profit, so I’ve decided that if I’m going to keep doing it I need to at least cover my electricity costs. I’ll be exchanging the proceeds for bitcoin, not fiat, of course. Plus it seems that market pressure is building toward another parabolic run, so I think it prudent to start converting some percentage of my proceeds that I’ve mined over the years so that I don’t wind up holding another dead bag. I guess I’ve moved out of the spec mining phase for the time being, and need to start making some real money.

So I sat down last night to start designing a system. I had already set up my environment during a previous session, and got started with my usual project flow, setting up dotenv files, a new git repo on my home lab, TDD with pytest. It was slow going, and felt like I had to do Google searches for every line of code I wrote. I caught myself dealing with premature optimization several times and had to stop myself from over complicating things. I was just building an API call using requests.

All I managed to do last night was get the rewards statistics from the mining pool that I’m using. It’s a list of dicts, and I’m not sure how I want to do my calculations, a percentage of rewards, or something based off of power consumption. I need to at least cover my rig’s 0.9Kw/h power consumption. I can’t get that from Simplemining since they don’t seem to have an API, so for now I’ll just have to go off that estimate, or plug in my Kill-o-watt. I killed the last one with a power surge over eleven hundred watts, so I can either run a test or just use SMOS’s estimate.

Either way, I can use my mining rewards for our preferred mining interval, get price data off Binance using the CCXT library, and then send a transaction to the exchange using the wallet API. Then I’ll have another call to the exchange, after the deposit has cleared, to initiate a market order. And then a final call to move the proceeds to my hard wallet.

Several of these components are going to be rather straightforward, but putting them all together is going to be a bit of a challenge. I could run this as a simple script as a cron job, but I could also leave this running as a service, with various components running in different threads. I’ve obviously got some design decisions to make.

I have decided that I want to move my blockchain nodes out of my house. I’ve got several of them that I need to have online, including ARW, XHV, RVN, and BEAM. Running all of them at the same time is a bit too taxing for the machines that I have scattered around the house, so I’m going to try and put my AWS training to work and setup various nodes in the cloud.

My XDNA node that is currently running in an EC2 instance is using less than 5% CPU as all of the work for Ethereum has been handed off to Infura. When I tried to put the BEAM node on this same instance it couldn’t handle it, so I’ve got to figure out what the actual requirements are for it. I’m hoping that it’s not going to be cost prohibitive.

I’m envisioning several instances with various blockchains stored on S3 volumes, nodes running on their own small instances as needed. My wallet files can either remain at my home lab or consolidated in another, secured instance. Cost will be a factor of course, but maintaining copies of several different blockchains locally is proving difficult to manage. And several of my wallets have been untouched for over a year or more.

I’m hoping I can build everything out in config files, Docker builds for the nodes, and the AWS configuration itself setup using Elastic files. I envision that some of the programs, like the one that I’ve described here, could even be run as Lambda functions.

Of course, a lot of this sounds like premature optimization. We shall see.