Because of the Coronavirus lockdowns, I haven’t been into Manhattan in a few months, which is crazy. I had been into Manhattan at least 2-3 times a week since moving here last year. Yesterday, I decided to bike around Manhattan and do a little photo tour to see what things look like in the wake of these lockdowns, store closures, and now the riots / protests. I don’t have great words to describe the feeling of Manhattan yesterday, but there was hope, despair, inspiration, beauty, empty streets, but also vibrant, active blocks of activity. It was a really enjoayble ~4 hour ride across town.
Here are some of the photos I took. You can also see them all here
I had been wanting to play around with the programming notebooks created by ObservableHQ. They are a new type of programming notebook, very similar to Jupyter Notebooks, but they run Javascript, and can run entirely in the browser. Observable notebooks also us an observable pattern, where all cells which depend on a variable are automatically updated whenever the underlying variables change. This also eliminates the reliance on ordering of cells, as they can be ordered in any way that makes sense, rather than ordered by their dependences. To learn about more differences butween Observables and Jupyter you can check out Observable for Jupyter Users.
Bitcoin Futures Basis Trade
Yesterday I decided to see if I could build a quick futures basis rate calculator for Bitcoin futures. The “basis rate” is the spread that exists between a future, and the current spot price of an asset. When the asset futures are in contango, this rate will be positive, because the future price is higher than the current spot price. Conversely, the basis rate will be negative when the asset futures are in backwardation.
It turned out to be super quick and easy. I’ve embedded the resulting table belowe, but you can also check out the entire notebook here. I’m calculating the annualized APY for each futures product available on Deribit using their public v2 api. The notebook updates itself every 5 seconds (adjustable by the user on the ObservableHQ site) with the latest prices and rates. Do note that I’m currently calculating the APY (annualized basis rate) based on the mark_price rather than the last_price. I’m also using the BTC-PERPETUAL as a proxy for the current spot price of Bitcoin, as you can’t actually trade spot on Deribit. As with any moving, volatile market, you may not actually be able to capture that APY, but it gives a good reference for comparison of where rates are at. This is also, obviously, not investment advice. The percent_delta column is the simple percentage delta between the BTC-PERPETUALmark_price, and the respective futures’ marke_price, to give you an idea of the actual rate, vs the annualized APY.
Current Deribit Bitcoin Futures Basis
I think this will be a useful tool to prototype ideas quickly, and share them with others without having to have a server running or have each person set up a local development environment. I look forward to making use of this tool more in the future.
I also want to play with Polynote a bit more, as it can leverage more languages (Scala, Python, Haskell), and is probably better suited for things that require a bit more computation, as well as things that may need to talk to private APIs.
The Handshake Network launched relatively silently in February of this year. As part of the launch, the network contains a merkle tree filled with nonces (random numbers) encrypted to the PGP and/or SSH keys of ~175,000 Github users, 30,000 PGP keys from the PGP WOT Strongset, and thousands more Hacker News and Keybase accounts that were identified as of 2/4/2019 by the Handshake team. Additionally, there was a window of time where anyone could signe up to the Handshake Faucet and recieve tokens from their interest in the project (this is what I did).
These encrypted nonce values are hard-coded into the network such that any of these individuals has a right and ability to claim some amount of HNS tokens (4,246.994314 HNS for most users) on the live Handshake network. This Airdrop system was designed to more fairly distribute the network tokens to builders and developers across the internet who are likely to be interested in seeing a freer, more decentralized naming and certificate system for the web.
Claiming Airdrop Tokens
The Handshake team has provided a tool that enables these users to find their nonce in the tree, and send a message to the live Handshake network claiming their tokens. While we at Polychain are early investors in the Handshake Network, and have been active with the network since it’s launch, I hadn’t claimed my personal tokens yet. I finally went through that process today, and wanted to document it here in case it’s useful for others.
Do note that I wanted to claim my tokens using only software released by the Handshake team. I did not want to use third party software, or trust third party websites to do some of the work for me. Using other software or websites is risky and may result in stolen tokens.
hsd
To start off, you will need to get a handshake daemon (hsd) running locally. Luckily this is pretty easy:
git clone https://github.com/handshake-org/hsdcd hsdnpm install# Just leave this running in it's own terminal window for now./bin/hsd
Creating a wallet
If you created a wallet from the Handshake Faucet, you can skip this step, and the next step. Only users claiming from an SSH or PGP key from Github, Keybase, etc. need to do this, and use hs-airdrop.
# Still in the hsd/ repo from above./bin/hsw-cli account create account1
You’ll want to save the receiveAddress above, as that’s where we’ll be sending your claimed coins to. Additionally, you’ll want to backup your master key someplace safe, so you’ll always have it and not lose your HNS tokens. You can do that with this:
From this you can backup either the xprivkey or the phrase words. You will be able to regenerate your wallet from either of these in the future.
hs-airdrop
Next, if you didn’t use the Handshake Faucet, you’ll need the hs-airdrop tool.
I learned the hard way that you no longer need to use the hs-airdrop tool to claim tokens if you registered an address with the Handshake Faucet. Those tokens will just be waiting for you in your wallet. You can skip to the last section on verifying your Handshake Faucet tokens below.
The README for the hs-airdrop tool is pretty self explanatory, but I’ve shown the various ways you may need to use it below. In all of the commands below, the hs1... should be your receiveAddress created above.
git clone https://github.com/handshake-org/hs-airdropcd hs-airdropnpm install# If you want to check against your gpg keyhs-airdrop ~/.gnupg/secring.gpg [gpg-key-id] hs1...# If you want to check against an ssh keyhs-airdrop ~/.ssh/id_rsa hs1...
When you run these, you’ll see something like (I picked a random proof for an example):
Downloading: https://github.com/handshake-org/hs-tree-data/raw/master/proof.json...Attempting to create proof.This may take a bit.Downloading: https://github.com/handshake-org/hs-tree-data/raw/master/faucet.bin...Creating proof from leaf 430...JSON:{"index": 430,"proof": ["e036498172d4165ffe6c1ff4be0a7ef2dfb3ac866567810a08f4c8a407f18ceb","2604784c6438a4449cbe287bf91879ae51066f9340ee13fd5ed87a28b764718a","0b02d056f9e1c014652e6968635c98cfe09d36a123bb8d87b9e55df9a7130997","05d4bf358ddcded5e11e7308490e0aef510dfc320a76915a427eec2d92a521b9","f4e11b99bc068de96d819f98194ab2a7eec8b1b871b2375c2901f1db09e83528","3c26a2ab4edad8068c10f3e69716bd8d2ec771c6b07e0b5d0d705dc7831e9094","053c86c4237519f56a1915e5a2c843654cd571fe944ac49135ebc18af84dc586","8f57f108e8994f5b94b9aa280f0fb9b234e6317e2ef63b0f1380d3897be7682a","0ac39775f0fee6f0e9f1d836f3c36c65a7052299b2e8497fae2e7c137d658979","14daacaf73203e57e138c2a90f138092847a81680cc06d2c5d7621e716f01f00","5b0a3e491dae4390049bb15f46655e31e3da3253b29cf0104f59d0c630baed87" ],"subindex": 0,"subproof": [],"key": {"type": "ADDRESS","version": 0,"address": "6288445d85ba48ece08449ca8adacb4d09de0edc","value": 4246994314,"sponsor": false },"version": 0,"address": "6288445d85ba48ece08449ca8adacb4d09de0edc","fee": 100000000,"signature": ""}Base64 (pass this to $ hsd-rpc sendrawairdrop):rgEAAAvgNkmBctQWX/5sH/S+Cn7y37OshmVngQoI9MikB/GM6yYEeExkOKREnL4oe/kYea5RBm+TQO4T/V7Yeii3ZHGKCwLQVvnhwBRlLmloY1yYz+CdNqEju42HueVd+acTCZcF1L81jdze1eEecwhJDgrvUQ38Mgp2kVpCfuwtkqUhufThG5m8Bo3pbYGfmBlKsqfuyLG4cbI3XCkB8dsJ6DUoPCaiq07a2AaMEPPmlxa9jS7HccawfgtdDXBdx4MekJQFPIbEI3UZ9WoZFeWiyENlTNVx/pRKxJE168GK+E3Fho9X8QjomU9blLmqKA8PubI05jF+LvY7DxOA04l752gqCsOXdfD+5vDp8dg288NsZacFIpmy6El/ri58E31liXkU2qyvcyA+V+E4wqkPE4CShHqBaAzAbSxddiHnFvAfAFsKPkkdrkOQBJuxX0ZlXjHj2jJTspzwEE9Z0MYwuu2HAAAgBAAUYohEXYW6SOzghEnKitrLTQneDtyK/SP9AAAAAAAAFGKIRF2Fukjs4IRJyoray00J3g7c/gDh9QUA
The Base64 string in the very last line of the output above is what you’ll need to copy so you can send this claim script to the network.
Send your claim to the network
To send your claim to the network, you’ll want to go back to your hsd/ directory and do the following:
# In your hsd/ checkout./bin/hsd-cli rpc sendrawclaim "rgEAAAvgNkmBctQWX/5sH/S+Cn7y37OshmVngQoI9MikB/GM6yYEeExkOKREnL4oe/kYea5RBm+TQO4T/V7Yeii3ZHGKCwLQVvnhwBRlLmloY1yYz+CdNqEju42HueVd+acTCZcF1L81jdze1eEecwhJDgrvUQ38Mgp2kVpCfuwtkqUhufThG5m8Bo3pbYGfmBlKsqfuyLG4cbI3XCkB8dsJ6DUoPCaiq07a2AaMEPPmlxa9jS7HccawfgtdDXBdx4MekJQFPIbEI3UZ9WoZFeWiyENlTNVx/pRKxJE168GK+E3Fho9X8QjomU9blLmqKA8PubI05jF+LvY7DxOA04l752gqCsOXdfD+5vDp8dg288NsZacFIpmy6El/ri58E31liXkU2qyvcyA+V+E4wqkPE4CShHqBaAzAbSxddiHnFvAfAFsKPkkdrkOQBJuxX0ZlXjHj2jJTspzwEE9Z0MYwuu2HAAAgBAAUYohEXYW6SOzghEnKitrLTQneDtyK/SP9AAAAAAAAFGKIRF2Fukjs4IRJyoray00J3g7c/gDh9QUA"
The long string at the end of the command, is the string you should have copied from the last line in the step above. This will send your claim to the network, and if all goes well, it should commence sending your tokens to your newly created address.
If all went well, congrats, you have now claimed your HNS tokens to your wallet. It will take about 100 blocks before you will be able to use them, but they are safely yours.
Verifying your Handshake Faucet Tokens
If you signed up through the Handshake Faucet prior to launch, you’ll want to setup a wallet and verify that you have your tokens. All you need for this is the hsd daemon running, and to import your wallet, like so:
./bin/hsw-cli mkwallet [wallet-name] --mnemonic="seed words from your handshake faucet backup"./bin/hsw-cli rescan --id=[wallet-name]
Once it rescans (shouldn’t take long), your wallet should now show your balance:
./bin/hsw-cli balance --id=[wallet-name]
Hopefully you’ve got your tokens now
That’s it. You now hopefully have access to your HNS tokens, and can start bidding on name auctions, or hodl until you have better ideas.
I hope you found this helpful – let me know your thoughts on twitter either way.
My wife and I have now been locked down and working from home for 83 days since March 8th. One things I noticed after just a few days of was that I was feeling sluggish, lethargic, and mentally foggy. I started to add some walks into my daily routine whenever the weather was nice enough, and that definitely helped, but I knew I needed to find a way to get more substantive workouts in during quarantine. With gyms closed, and not knowing how long this situation would last, I decided to start doing bodyweight strength training at home.
View of Manhattan
After some googling and help from r/bodyweightfitness I decided to get a doorway pull-up bar, and some gymnastic rings. Of course, as you probably know, all fitness equipment has been sold out everywhere online for a while, but I did manage to find them in-stock after a bit of searching.
Pull-up Bar Gymnastic Rings Setup
Since getting them, I’ve been getting in some pretty amazing workouts, and have really been enjoying the rings a lot more than I thought I would – they make workouts fun. The workouts can be way more intense, and fun, than I expected, and many of the movevments are way harder than you’d imagine on the rings because of the lack of stability they provide. Dips and push-ups on the rings, for example, are much harder than their usual variants.
I also picked up a copy of Overcoming Gravity, which I think is the bible for calisthenics and bodyweight training. I would highly recommend this book if you’re interested in this.
You can work your entire upper body with the gymnastic rings, and increase the intensity (read: difficulty) of the excercises to almost any strength level. Here are just some of the excercises and progressions I’ve been working on:
Dips
Bulgarian (wide-arm) Dips
RTO (Rings turned out) Dips
Pull-ups
Muscle Ups
L-Sit Pull-ups
Front Tuck Lever (working towards front lever) holds
Rows
Horizontal Rows
Front Tuck Rows
L-Sit
Hand Stands
Frog Stand
Wall Hand Stands
Push-ups
RTO (rings turned out) push-ups
Pseudo-planche pushups
Archer / one-arm pushups
For a comprehensive suite of bodyweight and rings progressions for all skill levels, check out the charts from the Overcoming Gravity book – there’s enough to keep you going for quite a while.
After using the rings and doing only bodyweight work for ~60+ days now, I must say I am enjoying it much more than my prior barbell work at the gym. With barbell work, you do the same movements over and over, with the only “progression” being the increasing the weight. With rings, parallettes, and bodyweight excercises, you are progressing and learning new skills along the way. It really does feel like play, and when you get a new skill, you feel like you’ve accomplished something. The skills I’m working towards (though they will take me quite a while to achieve) right now are:
30 second free standing hand stand
30 second front lever
5 ring muscle ups
Touch my palms to the floor with straight legs (this is a flexibility goal as I’m very inflexible)
5 Bulgarian ring dips (achieved!)
10 Diamond pushups (achieved!)
I’ll report back as I hit these goals, but I know these will keep me busy for a while.
If you’ve been looking for a cheap, effective, space-efficient way to workout at home, or in your local park, I highly recommend trying out a pair of gymnastic rings – it’s possibly the best $30 piece of fitness equipment you can buy (coupled with a pull-up bar or something to hang the rings on at home, if needed).
I saw this near the Brooklyn Promenade today, and found it funny. So many people are walking around with a mask, but it’s draped around their neck, or in their hand. I see some folks taking the mask off, but putting it on again when they get near other people, which I think is fine and makes sense. Having a mask with you, and still not putting it on when you’re around others is a bit silly, though.