After my recent article on why you don’t need S2F to value Bitcoin, I had an interesting conversation with PlanB, and I’ve been following a lot of conversations on Twitter since then.

As a result, I’ve edited my original article to (I hope) more fairly present what S2F actually is, and make sure none of my arguments are based on setting up a straw man.

One point I made in my original article was:

What this means is, to some level, even though demand is not an explicit variable in the S2F model, the model must implicitly assume a consistent…


In 2019, PlanB published his Stock-to-Flow model for the Bitcoin price. This model essentially takes the following inputs:

  • The Bitcoin supply, which overall is fixed, but is componentized into “stock”, the existing mined supply, and “flow”, the supply yet to be mined.
  • The Bitcoin block reward schedule, which halves every four years, and dictates the future mining rate of Bitcoin for the next century.
  • The prior Bitcoin price, in the years since its public release in 2009.

Using these inputs, S2F uses a linear regression to model the future price of Bitcoin. In a nutshell, the model essentially says:

As…


The following is a copy-paste of a message I just sent to a friend. He wanted to know the basics of the Bitcoin technology and market. Figured I’d share it here too, since it ended up being a (potentially useful) wall of text!

So, the technology aspect of Bitcoin is what really drew me in in the first place.

You can understand Bitcoin in an afternoon or so of reading; but generally speaking you can think of it as just a giant list, or ledger, of transactions. That idea is nothing new; but the crucial thing that nobody had ever…


In recent months we’ve seen many digital artworks tokenized and sold as NFTs, or “Non Fungible Tokens”. In layperson’s terms, this just means that the item is unique. Any one bitcoin is the same as any other bitcoin. But an NFT, in in theory, can not be replicated, and is not interchangeable with any other.

The NFT market rose to a crescendo this week with Beeple’s “First 5000 days” being sold for the equivalent of $69 million.

I’m in favor of any experimentation and innovation using blockchain tech. I think Bitcoin has the store-of-value problem covered, but I’m still looking…


Probably don’t use the rainbow chart to tell you if it’s safe to sleep.

If you’re anything like me, you spent the last few crypto bull markets trading like crazy, and the years in between forgetting all of the lessons you learned.

The biggest part of crypto trading I always forget, is the psychology of it. That’s what I want to write about today: being able to trade and actually sleep at night. That is, without waking up at 4am, checking your phone, making a stupid trading decision, and feeling like a total idiot afterwards.

Fair warning: I’m on the ‘extreme amateur’ side of crypto trading, and the chance of me offering you any…


Hi all!

BrainBlocks was incredibly fun to run, while it lasted. Ty, Angus, Andrei and I had a blast building it, working with the Nano community, seeing real merchants using Nano payments to power their businesses, and real users store their coins in the BrainBlocks Wallet.

Things didn’t work out on the business side for BrainBlocks. I still fully believe the future of crypto is in real-world payments, and I think Nano is the right technology to make that happen. At BrainBlocks we were very early, to a market that hasn’t fully emerged yet. We’re still massively bullish though!

On…


Someone once made a great point about using Regex to parse XML and HTML. In short: don’t do it, you’ll release Zalgo, and suffer a horrible fate. XML and Regexes just don’t gel well together. Or… do they?

I was thinking about this and mulling over just how inconvenient regexes are.

  • You have to write this huge string of almost incomprehensible text
  • It’s very easy to make mistakes that only surface at runtime
  • It’s very easy to forget to escape special characters like . or $
  • It’s even harder to build regexes programmatically, if you have a lot of dynamic…


Tree shaking in JavaScript is becoming an essential practice, to avoid large bundle sizes and improve performance.

The principle behind tree shaking is as follows:

  1. You declare all of your imports and exports for each of your modules
  2. Your bundler (Webpack, Rollup, and so on) analyzes your dependency tree during the compilation step
  3. Any provably unused code is dropped from the final bundle, or ‘tree-shaken’.
This file exports two utility functions…


Earlier this year I gave a talk at FullStack conference in London about making iFrames cool again (sorry, you have to log in to see the video — if anyone is listening over at FullStack, it would be really awesome if you could make these videos public!)

Why even bother with iframes?

In a nutshell: iframes let you build user experiences into embeddable ‘cross-domain components’, which let users interact with other sites without being redirected. There are a metric ton of awesome uses for that other than tracking and advertizing. …


Functional programming is a great discipline to learn and apply when writing JavaScript. Writing stateless, idempotent, side-effect free code really does solve a lot of problems:

  • It’s easier to test
  • It’s easier to debug
  • It’s easier to reproduce issues

But there’s a growing impression in the community that functional programming is an all-or-nothing practice. It’s common to hear:

My entire codebase/app is stateful and full of side effects, so why bother trying to make it functional?

I don’t have time to learn what functors, monads or currying are, but I’ll get round to it eventually. …

Daniel Brain

works for PayPal, as a lead engineer in Checkout. Opinions expressed herein belong to him and not his employer. daniel@bluesuncorp.co.uk

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store