H&R Block is ass for crypto, but they got me a $1,390 refund

I filed with H&R Block for a $1,390 refund. Their crypto reporting is ass, but I made it doable by aggregating my 377 RH trades (1099) and the 45 buys/sells from Binance into three big trades for DOGE, BNB, and LTC. This turned out to be the right move, because whatever I missed from HIFO optimization, I got back from a Homestead Credit that I would have missed. It brought me up from owing Michigan $195 to a refund of $695.

Learn what "Supply-Adjusted Coin-Days Destroyed" (SACDD), "Median Value of CDD" (MVOCDD), and the "HODL Bank" are to understand the "Reserve Risk" metric

Glassnode guy uses three indicators to build a macro-indicator of market strength: the Reserve Risk. The three metrics to compute the Reserve Risk are: (Supply Adjusted) Coin Days Destroyed: Spent coins x number of days each coin existed (divided by the total supply) Analogy: Letting go of a worker who’s been at the company five years vs. releasing a new hire (Median) Value of Coin Days Destroyed: Price x Coin Days Destroyed Does it consider all coin-days destroyed ever?

With Binance, Fee Assets are the type of currency you use to pay Binance; Base Asset is the type of currency offered; Quote Asset is the type of currency received

Binance has three accounting categories for assets: “Fee”, “Quote”, and “Base”. When I first looked at the table, I got fixated on “Buy” and “Sell” operations and looked at Base and Quote through those lenses. It’s an overcomplication though, because “buy” and “sell” are the same coin looked at from different angles. In both cases one item is given for another; an exchange is made. Regardless of Buy or Sell operation:

Jacek builds a REST API with three layers: db, handler, and route

In Learn Reitit Pro, Jacek Schae has a three-layered approach to building a REST API. The three layers: db, handler, and route. For the db, he uses next.jdbc with a Heroku-hosted PostgreSQL instance. For the routing layer he uses Reitit and Ring (which uses Java-built’s Jetty). The second layer is just Clojure functions–simple. The routing layer is Ring powered with Jetty assisted with Reitit. Ring’s just a Clojure wrapper for the Java Jetty web server, which accepts http requests and returns http responses.

Authorization: Bearer TOKEN

You can authorize http requests in four main ways: Two involve the Authentication header, two involve request parameters. You can use a 1) Basic or 2) Bearer Authentication header, or you can pass a token/un-pass combo to a 3) query paramater or 4) form parameter. The value of the Authorization header is a space-delimited tuple. As an http newbie, I wondered how to pass authorization tokens in. Do I pass another token in?

Bitcoin/Dogecoin use a UTXO model to see how much you have

Crypto is weird. With it, you really spend transactions labeled with coin values (UTXOs) and not coins themselves. The blockchain uses an Unspect Transaction Outputs model a.k.a. a UTXO model to calculate what a person’s able to spend. Assume a brand new network which genesises three transactions–1BTC, 0.5BTC, 2BTC–for 3 UTXOs. Someone else joins the network, and you decide to pay him 0.25BTC. Like pulling a $5 from your wallet, you pull one UTXOs and give it to the network, probably the 0.

Paper wallet fundamentals

A wallet is a container for pairs of strings. You can have 2, 4, 6… 2n strings in a valid wallet. The two strings of each pair are a public hash string and a private hash string. Why both and not just private hash strings? Without the public, the software it’ll eventually work with won’t know which address to unlock coins for (“key” is a bad metaphor; the public key is more like a lockbox, and the private key is more like a key).

Reitit course starts with a Hello World app template, not the Cheffy app template.

I handled three misconceptions with Jacek’s Reitit course: It’d use the Re-Frame cheffy files off the bat, showing a proper webpage on Heroku; that the Heroku server’d use the latest Leiningen; and that heroku create initialized the git repo. lein new app cheffy creates a hello world project from the “app” template. It doesn’t pull cheffy as a template. Leiningen defaults to 1.7 which does not use https when pulling from Clojars or Maven causing checksum errors when the servers 501 (https required).

Re-Frame interceptor errors prevent app state updates

One error in any interceptor prevents the second Re-Frame domino from falling. Either I wrote an error or clojure.spec changed since Jacek recorded his course, but my spec saw the db and threw an error. My spec function was in an interceptor, and this interceptor error prevented Re-Frame from updating the app-db, causing nothing to load in the app. Any error in any interceptor (including after interceptors) of an event handler will prevent app state updates and further effects.

When an event-fx dispatches to an event-db, pull the event-db's op to the original event-fx and change it to event-db

In Re-Frame, I removed effect events for db events. Pure db events represent low cognitive-overhead functional programming: db in, db out. Side effect fx events necessarily complicate the program, but per Jacek Schae’s instruction, I removed unnecessary cases: I.e. fx events that dispatched to db events. I changed these db-dispatching fx events to a db event and have it modify the db one more time in a db event instead of dispatching.