All time high?

$BTC set new records on many exchanges today, following a huge pump as the weekend drew to a close. This followed a drawdown just before Thanksgiving which made lots of people question whether we’d see new highs before the end of the year. $ETH participated in the pump as well, breaching $600 again.

My IRA holdings saw an absolute massive gain today, over 16%, close to three months salary. It’s amazing.

While CT was going nuts about “ATH”, I’m holding off on the celebrations because it didn’t hit on either Coinbase or Gemini. So my celebratory bottle of Glenfiddich will stay corked for now.


Work continues on the Ether Auction subgraph. I kept running into a bug using Hardhat, verified it using Ganache, and got a tip from someone on the Graph Protocol Discord. The bug was fixed in the most recent version of Hardhat, and I was able to get the subgraph working after I bumped the version in my repo.

I’ve now got the bare minimum I need to start putting together the front end. Step one, auction details, with the pot amount, start and end time. I need to figure out how to show the bids, and have the bid events update the auction entity. I may need to go back and update the contract to add a deposit pot event so that I have something to start with. Right now I’m using the auction_start event, which is triggered on the first bid, but that’s not going to work for the actual deployment. I want the functions to be available from the web front end.

So there’s lots of work to do.

More ethereum work

I haven’t been keeping up with habits lately, and haven’t written in three days. I also haven’t been working out much, instead drinking and staying up too late. I could make excuses about how work, home and the kids have been stressing me out, but that’s not it. I’ve just got to find other things to do.

I have been getting a lot done on the Ether Auction smart contracts. I’ve been using Hardhat, which is probably a bit too new and buggy for me, given my experience level with Solidity development, but I’m slowly moving forward with TDD. There are a couple bugs that are preventing me from putting the tests together like I would want. Chai methods for ensuring wallet balances change between bid and withdrawal calls seems to be broken, and I can’t seem to retrieve the getters from a public mapping in the contract.

I’ve been reading up on Solidity best practices, fussing over the withdraw function on the app to make sure I don’t have any hacks on the withdrawals. I want a really solid testing suite before I worry about deploying this thing. I’ve got a lot to figure out in the meantime. Just getting the testing suite has been difficult enough, but I’ve still got to finish building the auction instance contracts, the deployer contract, then figure out how to deploy, and get the web3 UI up and running. I have no idea what I’m doing, and will have to learn it all on the fly.

Thankfully the Hardhat community Discord has several helpful people, although the team seems like they have quite the backlog on the Github issues page.

I’m trying to just take it slow break when I get frustrated. I’ve been working through the Javascript ES tutorials on FreeCodeCamp to try and fill the gaps in knowledge, since I’m going to need it more and more.

I’m not happy with the pace of progress that I’m making, but as long as I make some progress every day I should be happy.

Continued optimism

Nose to the grindstone.

So I actually got a quite a bit done yesterday since I wasn’t obsessing over $BTC price action yesterday. I spent most of my time working in Hardhat, trying to figure out how to make tests work using the Waffle/Chai suite. I’m having a hard time wrapping my head around all the different dependencies so that I can do things. It’s a lot to take in, even for me, so I just had to turn in early last night and give my brain a rest.

I’ve been reading Kurt Vonnegut’s Player Piano for the past week. I finished Slaughterhouse Five earlier last month — it’s a short read — Player Piano is much more like a regular novel. I only gotten through the first fifth of it, but it’s quite amazing from a futurist standpoint. The novel deals with the economic and class consequences of automation and computerization, and even touches on things like standardized test scores determining one’s algorithmic destiny. It’s really making me think about the kids’ education.

Elder is really spending a lot of her day working on schoolwork. I know it’s really not a lot compared to how much time she would be spending in class if they were in person, but it just seems like a lot of work for a third-grader. I find she’s often not paying attention to what the teacher is doing, and is doodling or reading something else she’s not supposed to, and I feel like a hardass constantly telling her to pay attention. She gets frustrated by the homework, having to type everything up; I’ve been trying to reinforce her touch typing, but she often falls back to two-fingers when she’s working.

And I’m pushing Younger with her reading. We’ve been doing IXL every day for the most part, and I’m working with her on language arts as much as I can. It’s stressful, cause she gets frustrated easy, so we have to take it in short increments, a few questions, a TV show, a few questions, another show.

And trying to fit all this in while “working”…

Zombie, LLC’s home franchise was having their virtual convention yesterday, and I spent half of my workday yesterday trying unsuccessfully to get sound working in the Windows 10 VM that I use for work. I don’t know if it’s a problem with QEMU, or the Pulse Audio subsystem, but I tried to convert my QEMU image over to a VirtualBox image and ran out of space. I tried watching the Zoom meeting on my host, but I’m stuck on wifi (another problem with the ethernet card), and the meeting was pretty much unwatchable. I also tried using the Azure VM that I use for the meeting, but the throughput on that was pretty horrible.

I really don’t know what to do about the networking issue other than just put my head to the grindstone and figure out what the hell is going on. I’m not sure if it’s a driver issue with the card itself or some sort of Network Manager / NetPlan issue that I messed up. I’m just not getting an IP address unless I run dhclient directly, and that only works for a few minutes. I really wasn’t looking forward to debugging the entire Ubuntu network stack.

I did have some small wins over the past few days. Lambo1, my six-GPU mining rig, had been acting up, so I wound up disconnecting the rig and pulling out every card one-by-one and spraying then off with air. It looks like one of the power cables stopped working, but it took an hour of swapping and restarting to figure it out. The riser support was slipping down as well, which may have contributed. I also managed to finally figure out how ssh-agent and ssh-add work together with ssh to allow automatic login. It had always been one of those things that I managed to clobber together once in a blue moon, but I had to redo my Gitlab and Github keys on both my development workstations, and now I’ve got it figured out. It’s so nice to be able to clone my repos and push without having to lookup passwords.

I think my BTC bullishness may have caught on with the Missus. She’s sitting on a lot of cash right now and just opened a Vangard account, per her FIRE peeps. I bought a small amount for her during the 2017 run up, and it’s now worth three times what she paid for it. We were comparing notes on portfolio performance she said, “OK, I’ll buy some more”. I’ve been trying to get her to setup a BlockFi account, but she’s had other things on her mind. I’ll probably just have her set the account up with some cash, and we’ll feed the interest into BTC. Maybe I’ll add some dollar cost averaging into the mix if she want to fund it further.

Ether auction development

So I actually started programming the (Evil) Ether Auction that I’ve been thinking about for several weeks. I put the repo up on GitLab while I work through it, so that I can get some feedback on it before deploy it.

I’m still working on the actual auction portion of it. There are several auction Solidity auctions tutorials out there, so used those as a start point while I refine the requirements for the app. The auction contract is deployed with a bid time parameter, and the the pot is seeded via a separate transaction. The first bid will set the endtime of the auction.

We keep track of the winner and first loser, once the auction is complete all other bidders will be able to withdrawal their funds from the contract. When the winner claims the pot, both the winner and first loser’s balance become property of the owner.

That’s the gist, anyways. I’m working out the details on a deployer contract that will keep the game running indefinitely, or until a set limit. I actually want the next round to be triggered by the winner claiming funds, some sort of callback to the deployer that takes the winnings from the previous auction and uses it to create a new one. I’ll probably add some sort of dev fee, and checks to make sure that the proceeds from the previous auction are more than the starting pot. I don’t think there’s any reason that this can’t be done, I’ll have to do some gas tests to make sure claiming the pot doesn’t cost too much for a first round.

I’m planning on seeding the first round with one Eth, and letting the contract run until the last round is greater than 32ETH. It’s actually pretty small change for some Ethereum whales, and there’s no reason that I couldn’t make this work for specific ERC20 tokens.

I’m using the Hardhat library to code this up right now, instead of Truffle and Ganache, and I’m not sure if I’m going to stick with Solidity for this contract or change over to Vyper. I’ve got the framework up and running and have started writing tests, but I’m unfamiliar with Chai and having problems wrapping my head around how to structure the tests.

The last piece I want in place is some sort of web interface setup, something simple that will list the auction details and allow users to place bids or reclaim bids from previous auctions.

That’s what I’m envisioning, so we’ll see how things go as development continues.

Numbers in Etherum and Javascript

So I feel like I made some significant progress today after going through this piece on numbers in Ethereum and Javascript. It’s quite a bit of trouble, especially because of the way that numbers and storage is returned from web3 call() and getStorageAt() functions.

Case in point, I’m trying to compute the sum of a Ethereum amount multiplied by a percentage. Both values are stored in wei, which has eighteen decimal points. If one simply multiplies the two together, you get a rate that is actually off by another 10^18, so the result of the division needs to be divided by this factor before it is returned.

The web3 library in Javascript relies on BN.js, which stands for big number. It doesn’t work on decimals, they have to be passed as strings. So I can’t just pass 10**18 to make a big number, I have to return it as a string.

let BN = web3.utils.BN;
let decimal = new BN((10**18).toString())
let balance = new BN("196144358288748402370");
let rate = new BN("2500000000000000");
let result = balance.mul(rate).div(decimal);
console.log("Result: " + web3.utils.fromWei(result));
> Result: 0.490360895721871005

Performing this percentage calculation in Vyper is simple arithmetic, where all the numbers are uint256.

res: uint256 = (balance * pct) / 10 ** 18

Bad Omens

I had a dream last night that I set my laptop on fire. Not like the battery got hot and it lit up kind of fire, but I intentionally set it on fire. Okay, maybe the fact that it went up in flames was an accident, but I was definitely doing something I wasn’t supposed to. I was more at a loss for the physical value of the hardware than anything on it, but still, I was relieved when the “I’m dreaming” realization came through.

I found myself thinking about this Tweet this morning, and what type of technical skills are needed to pull something off like that. My brokerage bot is just a simple API call application; I definitely need to figure out how to consume websockets to be able to do real-time stuff like this. Being able to watch order books and place or cancel orders in response to changes will really up my game.

As far as the Ethereum aspect of this goes, I’m not sure if you would have to run your own node or if something like this could be done on an Infura node. Not sure whether he’s watching the mempool or just following transactions on the network.


It’s the first of the month, which means I need to get cracking on some things: moving money from the kids Lending Club accounts over to their BlockFi. I think I’ll make rebalancing my DeFi vaults a quarterly affair, I don’t have enough to warrant the gas fees for smaller amounts. I will be making a withdrawal from my BlockFi and putting it on the exchange. I missed some trades that I wanted to take since I had vaulted my funds earlier.

I really need a dashboard to track my gains. Zapper doesn’t seem to be very accurate, although yEarn does let me see the monthly performance, in fact, every time I check their page they’ve made updates to their UI to provide more information. It’s still a pain that I have two wallet addresses that I’m using on it. Maybe there’s a way to transfer the vault balance? I’m guessing no since I’m staking a token. The balances are probably stored in an array and can’t be transfered.

I’ve obviously got a lot of work to do with Ethereum and smart contracts. I really love this kind of work, learning programming languages and building stuff. Too bad my regular job is all filled up with bullshit like fixing crashing laptops. My boss actually told me “don’t drop your sugar at the door” in response to me offering a technical next-step in response to one of these problems. I literally said that they needed to update the driver package on their Surface laptop. That is not my sugar. Boss has no idea what it I can do. He’s still locked into the stuff we were doing when we started eight years ago and hasn’t grown since. I’ve tried to tell him about the opportunities and he hasn’t popped out of this small business mindset. Sigh.

I feel like Zombie, LLC will be stuck with small-time players who are looking for technical support. We’ve got a few good managed services clients, but we’ve got no sales team, and the fact that Boss is unable to lead us as a team has left me completely disillusioned. Things will not change. I was listening to ILtB and someone said “if you take the best player on a high school team and you let them practice with a college team, they’re going to get better. They’re going to run faster than they thought possible.”

I’ve outgrown this team, and I need to find a better one.