Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c3bfd96
Beginning ebook generation scripts and files
treeman Feb 14, 2023
12aae76
Reformat sass files
treeman Feb 14, 2023
06e4301
Fix basic markup generation
treeman Feb 14, 2023
cb5775d
Use image of HN instead of funky html
treeman Feb 14, 2023
6db3de9
TOC generation tweaks
treeman Feb 14, 2023
f8e2ceb
Set thead as a block to prevent random p insertions
treeman Feb 14, 2023
ea3f757
No center tag in xhtml
treeman Feb 14, 2023
d5c4467
Don't keep % in href names
treeman Feb 14, 2023
e6d787a
Add id attribute to a (in addition to name)
treeman Feb 14, 2023
3725c86
Minor link updates
treeman Feb 14, 2023
e1c7cf2
Missing image and script
treeman Feb 14, 2023
0b52a01
Move out sidenote defs from li
treeman Feb 17, 2023
ec2ad50
Proper <br> in table
treeman Feb 17, 2023
16a98bb
Remove image links
treeman Feb 17, 2023
88b7973
More hacky fragment cleanups
treeman Feb 17, 2023
ff87f11
Simple gen script
treeman Feb 17, 2023
c56b6c4
Disable marginnotes
treeman Feb 20, 2023
e5ec116
Center images
treeman Feb 20, 2023
1700397
Remove published/updated dates
treeman Feb 20, 2023
406f48a
Use absolute links to internal things instead of absolute links
treeman Feb 20, 2023
f124c61
Remove favicon links
treeman Feb 20, 2023
e611bd7
Reformat scss files
treeman Feb 20, 2023
3fdd549
Restore toc formating
treeman Feb 20, 2023
3347055
Content metadata
treeman Feb 21, 2023
c352d4e
Restyle the opening page
treeman Feb 21, 2023
bbe9e48
Add pagespread info
treeman Feb 21, 2023
c03e454
Override sidenote p fontsize, otherwise they might diverge when p is
treeman Feb 21, 2023
7eb6c29
Reorder toc
treeman Feb 21, 2023
0845786
Remove sidenote top/bottom margin adjustments
treeman Feb 21, 2023
a2e4713
Fix changed subnav styling
treeman Feb 21, 2023
43d7aa1
Add short commit to version, for easy check during dev and release
treeman Feb 22, 2023
f54ed36
Update alt text for images
treeman Feb 22, 2023
64dbdb4
Use <main> and wrap content in <article>
treeman Feb 22, 2023
cff69c0
Cover page meta
treeman Feb 22, 2023
45be00d
Use section instead of div in stories and transcripts
treeman Feb 22, 2023
ae23d22
Aria roles for fake table
treeman Feb 22, 2023
478e9f5
Add aria note role
treeman Feb 22, 2023
0da196d
Fix sidenote tests
treeman Feb 22, 2023
6cee796
Sidenotes with note refs
treeman Feb 23, 2023
fc11bab
Add dedication page
treeman Feb 24, 2023
085ce89
Add epub:type to pages
treeman Feb 24, 2023
2d6b72c
Remove acknowledgements from toc and restyle it
treeman Feb 24, 2023
f3f1765
Wrap svg images in <object> with <img> fallback
treeman Feb 28, 2023
b1254f5
Readd marginnotes, but only for token img descriptions
treeman Feb 28, 2023
787dca8
Update sidenotes test with new tags and refs
treeman Feb 28, 2023
07043b8
Font obfuscation
treeman Mar 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions a_defective_system.html.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ If I did print money---a ◊strong{lot} of money---and spent it like this, what

For starters, if I just kept the money without spending it, nothing would change:

◊img[#:src "/images/counterfeiting1.png" #:alt "The counterfeiter can print a large stash of cash."]{
◊img[#:src "/images/counterfeiting1.png" #:alt "The counterfeiter can print a large stash of cash, but other people would not benefit."]{
The counterfeit money is colored yellow and the real money is green.
}

Then if I decided to buy a bunch of LEGO®, the store would get some of my money:

◊img[#:src "/images/counterfeiting2.png" #:alt "The counterfeiter buys LEGO."]{}
◊img[#:src "/images/counterfeiting2.png" #:alt "The counterfeiter buys LEGO, sharing the wealth with the store."]{}

After a while the store would use the counterfeited money to pay their supplier:

◊img[#:src "/images/counterfeiting3.png" #:alt "Money further trickles down to the supplier, but not to everyone."]{}
◊img[#:src "/images/counterfeiting3.png" #:alt "Money further trickles down to the supplier, but not to everyone. The poor people did not get more money than they had before, and now they're even poorer relative to the others."]{}

Who in turn will use it to buy other stuff, and in this way the counterfeited money slowly trickles out into the rest of the economy. This extra money has two important effects:

Expand Down Expand Up @@ -356,7 +356,7 @@ While taking out debt to fuel investments was only supposed to be a temporary me

◊; Actual source
◊; https://fred.stlouisfed.org/graph/?id=GFDEBTN,
◊img[#:src "images/usa-debt.svg" #:link #t #:alt "The federal debt of the United States, measure in trillions of dollars, since 1966."]{
◊img[#:src "images/usa-debt.svg" #:link #t #:alt "The federal debt of the United States figure"]{
The ◊link[usa-national-debt]{federal debt of the United States}, measure in trillions of dollars, since 1966.
After the ◊link[financial_crisis]{2008 financial crisis} the amount of debt skyrocketed, signifying a shift in economic policy.
During the COVID-19 pandemic the debt explosively increased at a pace unseen before.
Expand Down Expand Up @@ -444,18 +444,18 @@ It seems like we're moving away from the original Keynesian ideas to something e

There's a worrying trend in the world: ◊link[global-inequality]{global inequality is rising}. The rich get richer and the poor get... poorer.

◊img[#:src "images/income-inequality-world.svg" #:link #t #:alt "Top 10% income share between 1980 and 2015."]{
◊img[#:src "images/income-inequality-world.svg" #:link #t #:alt "World income share figure"]{
Top 10% income share between 1980 and 2015.
Source ◊link[inequality-data]{World Inequality Database}.
}

The inequality is on the rise in nearly every country. If we take a closer look at the United States, it paints a gloomy picture:◊mn{report}

◊img[#:src "images/income-inequality.svg" #:link #t #:alt "Income share in the United States between 1962 and 2014."]{
◊img[#:src "images/income-inequality.svg" #:link #t #:alt "United States income share figure"]{
Income share in the United States between 1962 and 2014.
Source ◊link[inequality-data]{World Inequality Database}.
}
◊img[#:src "images/wealth-inequality.svg" #:link #t #:alt "Net personal wealth in the United States between 1962 and 2014."]{
◊img[#:src "images/wealth-inequality.svg" #:link #t #:alt "Net personal wealth figure"]{
Net personal wealth in the United States between 1962 and 2014.
Source ◊link[inequality-data]{World Inequality Database}.
}
Expand Down
9 changes: 6 additions & 3 deletions about_the_book.html.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
◊(define-meta updated "2021-05-07T19:11:00+01:00")
◊(define-meta uuid "7ea80c78-aff2-46a1-8d05-1253d7033dc6")
◊(define-meta template "chapter.html")
◊(define-meta article-type "introduction")

◊(clear-sidenotes)

Expand Down Expand Up @@ -64,13 +65,15 @@ I must admit I'm also being selfish---writing a book is on my bucket list.
This book tries to describe what value cryptocurrencies have using several examples. In particular I'll argue that:

◊ol{
◊li{Cryptocurrencies aren't just scams.◊mn{scams} ◊note-pos{scams}}
◊li{Cryptocurrencies aren't just scams.◊mn{scams}}
◊li{It's more than just a speculative asset.}
◊li{They do many things better than any alternative.}
◊li{There are legal use cases.}
◊li{They have valuable use cases.}
}

◊note-pos{scams}

Of course, everything new brings positive and negative aspects with it. It's up to you to decide where on the global spectrum of good and bad cryptocurrencies lie.


Expand Down Expand Up @@ -103,8 +106,8 @@ A problem-centric view is great for an engineer or a problem solver, but it also

Instead of putting on blinders and getting stuck at these problems---which I believe can be addressed---we'll focus on the potential cryptocurrencies have. Only with this vantage point can we see if the problems are worth working on, or if we instead should scrap the whole idea.

center{
◊strong[#:style "font-size: 1.1rem"]{And of course, none of this is investment advice.}
div[#:class "not-investment"]{
And of course, none of this is investment advice.
}

Well, the only advice I'll give is to understand what you're investing in, and my hope is that this book can help with that.
Expand Down
1 change: 1 addition & 0 deletions acknowledgements.html.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

◊(define-meta title "Acknowledgments")
◊;(define-meta subtitle "A perspective beyond the hype")
◊(define-meta article-type "acknowledgments")
◊(define-meta published "2020-03-09T21:07:17+01:00")
◊(define-meta updated "2021-03-10T19:01:43+01:00")
◊(define-meta uuid "d33953be-5f6c-43b0-a700-eab1e1540447")
Expand Down
5 changes: 3 additions & 2 deletions antifragile.html.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
◊(define-meta updated "2021-05-07T19:11:00+01:00")
◊(define-meta uuid "9ce74583-fbbd-42d4-940e-3a9e44ed0658")
◊(define-meta template "chapter.html")
◊(define-meta article-type "appendix")

◊; https://unchained-capital.com/blog/bitcoin-is-antifragile/
◊; https://cryptofundamental.com/in-pursuit-of-lindycoin-212bacafc395?gi=416e2a7a461c
Expand Down Expand Up @@ -142,11 +143,11 @@ Cryptocurrencies work the same way. When a weakness is discovered developers wil

While you can argue that an individual cryptocurrency is antifragile, antifragility also applies to the cryptocurrency concept itself. People like to point at the thousands of cryptocurrencies as some sort of drawback, but it's actually the opposite. Cryptocurrencies being created and then dying off en mass is good as each time one fails we might learn something new and use that to improve the survivors.

◊img[#:src "/images/btc-hydra.png" #:alt "A hydra with one Bitcoin head"]{
◊img[#:src "/images/btc-hydra.png" #:alt "A hydra with one head looking like the Bitcoin logo."]{
Cryptocurrencies are like a Hydra.
}

◊img[#:src "/images/bch-xmr-hydra.png" #:alt "A hydra with two heads, one Bitcoin Cash and one Monero"]{
◊img[#:src "/images/bch-xmr-hydra.png" #:alt "A hydra with three heads; one cut off, one like the Bitcoin Cash logo and one like the Monero logo."]{
Cut off one head, two more shall take its place.
}

Expand Down
1 change: 1 addition & 0 deletions appendix.html.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
◊(define-meta no-side-space #t)
◊(define-meta no-section-chapters-header #t)
◊(define-meta extra-article-class "appendix")
◊(define-meta article-type "appendix")
◊(define-meta skip-feed #t)
◊(define-meta template "chapter.html")

23 changes: 16 additions & 7 deletions are_cryptocurrencies_money.html.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ To decide how well cryptocurrencies can function as money, we'll take a look at
◊ol{
◊li{◊strong{Acceptable}

Nobody's excluded from using cryptocurrencies---they're open to everyone by design. The drawback is that you need a device with internet connection.◊mn{crypto-acceptable} ◊note-pos{crypto-acceptable}
Nobody's excluded from using cryptocurrencies---they're open to everyone by design. The drawback is that you need a device with internet connection.◊mn{crypto-acceptable}
}
◊li{◊strong{Divisible}

There's no real technical limit to how much a cryptocurrency unit can be divided, and it's all automatic.
}
◊li{◊strong{Durable}

Coins can be used an infinite amount of times. The only drawback is keeping your private key secure, so you don't lose your coins.◊mn{backups} ◊note-pos{backups}
Coins can be used an infinite amount of times. The only drawback is keeping your private key secure, so you don't lose your coins.◊mn{backups}
}
◊li{◊strong{Fungible & Uniform}

Expand All @@ -59,6 +59,9 @@ To decide how well cryptocurrencies can function as money, we'll take a look at
}
}

◊note-pos{crypto-acceptable}
◊note-pos{backups}

All in all cryptocurrencies fulfil the properties excellently.

Cryptocurrencies can also be considered to be ◊def[sound-money]{sound money}---the value is entirely market driven and there's no manipulation of the supply.◊mn{backed}
Expand Down Expand Up @@ -96,19 +99,19 @@ This is a table of how I think cryptocurrencies compare to other forms of money.
I know this might be controversial, so let me motivate some of the entries:

◊ol{
◊li{Digital fiat gets a poor score on ◊strong{acceptable} because it requires a bank account to use. This ◊link[for_the_unbanked]{isn't something everyone can get} as banks have the right to ◊link[undesirable_businesses]{reject you if they want}.◊mn{acceptable} ◊note-pos{acceptable}
◊li{Digital fiat gets a poor score on ◊strong{acceptable} because it requires a bank account to use. This ◊link[for_the_unbanked]{isn't something everyone can get} as banks have the right to ◊link[undesirable_businesses]{reject you if they want}.◊mn{acceptable}
}

◊li{Digital money is inherently easier to ◊strong{divide} than physical variants. You can always send an exact amount without having to mix and match change.}

◊li{Paper notes can easily wear out or burn up. While cryptocurrencies cannot themselves burn up or deteriorate, the security backups and your phone can. Therefore they score lower than gold on ◊strong{durability}, which is near indestructible.◊mn{durability} ◊note-pos{durability}}
◊li{Paper notes can easily wear out or burn up. While cryptocurrencies cannot themselves burn up or deteriorate, the security backups and your phone can. Therefore they score lower than gold on ◊strong{durability}, which is near indestructible.◊mn{durability}}

◊li{I see no major problems with ◊strong{fungibility} or ◊strong{uniformity}.◊mn{again-monero} ◊note-pos{again-monero}}
◊li{I see no major problems with ◊strong{fungibility} or ◊strong{uniformity}.◊mn{again-monero}}

◊li{Both digital and physical fiat gets a poor score on ◊strong{limited supply}. Per the discussion in ◊link[prev-chapter]{the previous chapter} fiat money is unsound.
}

◊li{Cryptocurrencies are simply much more ◊strong{portable} than the other options. Carrying large amounts in cash or gold is cumbersome and digital fiat isn't easy to move across borders.◊mn{borders} ◊note-pos{borders}}
◊li{Cryptocurrencies are simply much more ◊strong{portable} than the other options. Carrying large amounts in cash or gold is cumbersome and digital fiat isn't easy to move across borders.◊mn{borders}}

◊li{While it's possible to check for fake cash and gold coins, it requires expertise and certain tools. Therefore they get a lower ◊strong{recognizable} score.
}
Expand All @@ -118,10 +121,16 @@ I know this might be controversial, so let me motivate some of the entries:
You could argue that because you need a device with internet access, cryptocurrencies should get a lower score on ◊em{acceptable}. But you could also argue that having to transact in person is another drawback, and to me they cancel out.
}

◊note-pos{durability}

◊ndef["durability"]{
The definition of ◊em{durability} is only concerned with reuse, where cryptocurrencies score excellently. I wanted to include the storage drawback that didn't fit anywhere else.
}

◊note-pos{again-monero}

◊note-pos{borders}

Even if you disagree about certain choices, it's hard to deny that cryptocurrencies come out of the comparison pretty well. Of course, this doesn't give the whole picture. There are other significant differences, for example:

◊ul{
Expand Down Expand Up @@ -203,7 +212,7 @@ We've looked at the properties---but how well do they function as money, today?

The valuation is highly speculation driven and has been notoriously volatile.◊mn{sov} ◊note-pos{sov}

◊img[#:src "images/btc-valuation.svg" #:link #t #:alt "Bitcoin closing price per month, between 2010 and 2019."]{
◊img[#:src "images/btc-valuation.svg" #:link #t #:alt "Bitcoin closing price per month, between 2010 and 2020."]{
◊link[btc-valuation]{Bitcoin price per week up to the beginning of 2020}.
The price peaked in December 2017 to $19,870, and some exchanges had it even higher. A year later the price had dropped to $3,177, a drop of over 84%.
}
Expand Down
1 change: 1 addition & 0 deletions bitcoin_whitepaper.html.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
◊(define-meta updated "2021-05-07T19:11:00+01:00")
◊(define-meta uuid "581c4917-d862-49cb-9d01-495a9106081b")
◊(define-meta template "chapter.html")
◊(define-meta article-type "appendix")

◊(clear-sidenotes)

Expand Down
7 changes: 4 additions & 3 deletions challenges.html.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
◊(define-meta updated "2021-05-07T19:11:00+01:00")
◊(define-meta uuid "c13d8405-fb3e-411c-b035-aae08eedddf1")
◊(define-meta template "chapter.html")
◊(define-meta article-type "appendix")

◊(clear-sidenotes)

Expand Down Expand Up @@ -97,12 +98,12 @@ Bitcoin, like most cryptocurrencies, uses a public ledger where all transactions
"https://www.chainalysis.com/"
"Chainalysis: The Blockchain Analysis Company"))

◊img[#:src "/images/coin-tracing.png" #:alt "Paying someone with allows you to see their funds."]{
◊img[#:src "/images/coin-tracing.png" #:alt "Image of John's address that has sent 1 BTC to the merchant and 13 BTC to another address."]{
After the merchant receives a payment from John, the merchant can see that John has sent 13 BTC to another address, out of an initial 40 BTC.
John appears to be quite rich.
}

◊img[#:src "/images/coin-tracing2.png" #:alt "You can trace coins back in history."]{
◊img[#:src "/images/coin-tracing2.png" #:alt "Image of how John's 40 BTC originates from a hacked exchange."]{
It's possible to trace coins further back in history. Here we see that John's coins come from a hacked exchange, whose address is known. It might mean John is the hacker or, more probably, that John has received ◊em{tainted} coins (coins associated with illegal behavior).
}

Expand All @@ -119,7 +120,7 @@ You can explore the Bitcoin blockchain, and see all transactions and addresses,

In an attempt to make Bitcoin more private "mixing" services such as ◊link[coinjoin]{CoinJoin} can be used. They work by mixing together your coins with the coins of others, in an attempt to obscure where the coins are coming from:

◊img[#:src "/images/coinjoin.png" #:alt "Obfuscation by mixing coins with other addresses."]{
◊img[#:src "/images/coinjoin.png" #:alt "Image of mixing coins by sending them to and from various addresses."]{
A mixing service makes several addresses send to each other, in order to obfuscate the history. Although not shown here, because it would be too messy, all addresses and amounts are still visible.
}

Expand Down
72 changes: 29 additions & 43 deletions chapter.html.p
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@
◊(define side-space? (not (select-from-metas 'no-side-space here)))
◊(define section-chapters-headers? (not (select-from-metas 'no-section-chapters-header here)))
◊(define article-class
; This used to be on <article> but is now on main. Meh.
(let ((extra (select-from-metas 'extra-article-class here)))
(if extra
(string-append "chapter " extra)
"chapter")))
◊(define article-type
(let ((type (select-from-metas 'article-type here)))
(if type
type
"chapter")))

◊(define prev-page
(let ((p (previous here)))
(if (equal? p 'index.html)
Expand All @@ -46,59 +53,38 @@
(->html
(make-link #:title title (string-append "/" (symbol->string page)) txt)))
<!DOCTYPE html>
<html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<meta charset="utf-8" />
<title>◊|head-title|</title>
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="/feed.xml" />
<link rel="stylesheet" type="text/css" href="main.css"></link>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0' />
<meta name="keywords" content="◊|keywords|" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
</head>
<body>
<article class="◊|article-class|">
<main class="◊|article-class|">
<nav class="where">
<a href="/toc.html" tilte="Table of contents" class="home">Why Cryptocurrencies?</a>
<a href="/toc.xhtml" title="Table of contents" class="home">Why Cryptocurrencies?</a>
◊when/splice[parent-page]{
<span class="divider">/</span>
◊(ref parent-page parent-title parent-title)
}
</nav>
<header>
<h1>◊|title|</h1>
<h2>◊|subtitle|</h2>
◊(when side-space? (->html
`(div ((class "date"))
(span ((class "published")) ,published)
,(if updated
`(span ((class "updated")) ,updated)
""))))
</div>
</header>
<article epub:type="◊|article-type|">
<header>
<h1 epub:type="title">◊|title|</h1>
<h2 epub:type="subtitle">◊|subtitle|</h2>
</header>

◊(->html doc #:splice? #t)
◊(->html doc #:splice? #t)
</article>

◊(->html (make-section-nav #:section-header? section-chapters-headers?
here))
</article>
</main>

◊(when side-space? (->html `(div ((class "side-space")))))

<nav class="edge-wrapper">
◊when/splice[prev-page]{
<a class="prev-pan" href="/◊(symbol->string prev-page)" title="◊|prev-title|">
<span class="content"> ‹ </span>
</a>
}
◊when/splice[next-page]{
<a class="next-pan" href="/◊(symbol->string next-page)" title="◊|next-title|">
<span class="content"> › </span>
</a>
}
</nav>

<footer>
<nav class="movenav">
◊when/splice[prev-page]{
Expand All @@ -115,7 +101,7 @@
</span>
}
<span class="home">
<a href="/toc.html" title="Table of contents">~ Home</a>
<a href="/toc.xhtml" title="Table of contents">~ Home</a>
</span>
</span>

Expand All @@ -127,17 +113,17 @@
}
</nav>

<div class="buy-wrapper">
<div class="buy">
<p>This is a book that tries to explain the utility of cryptocurrencies in a beginner-friendly manner.</p>
◊;<div class="buy-wrapper">
◊;<div class="buy">
◊;<p>This is a book that tries to explain the utility of cryptocurrencies in a beginner-friendly manner.</p>

<p><a href="/" title="Print or ebook">Check out the print or ebook!</a></p>
</div>
</div>
◊;<p><a href="/" title="Print or ebook">Check out the print or ebook!</a></p>
◊;</div>
◊;</div>

<div class="follow-wrapper">
◊(->html follow-section)
</div>
◊;<div class="follow-wrapper">
;◊(->html follow-section)
◊;</div>

</footer>

Expand Down
Loading