-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexperiments.tex
332 lines (304 loc) · 18.6 KB
/
experiments.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
\section{Experimental results}\label{sec:experiments}
Having established our theoretical framework, we now provide experimental
results on the egalitarianism of various cryptocurrencies. Our experiments
utilize the \emph{egalitarian curve} definition of Section~\ref{sec:definition}
in order to concretely confirm --- or disprove --- the egalitarianism claims of
some of the major, both proof-of-work and proof-of-stake, cryptocurrencies.
In conducting our experiments \textbf{we assume a static environment}.
Specifically, we assume that the token prices, as well as the distribution of
funds which are available for purchasing mining hardware are static and follow
the snapshot of the world which we took at the time of writing. Furthermore, we
assume that our mining operation would not substantially affect these
parameters if it were to be applied on this environment. Finally, we assume
that the set of available strategies $\mathcal{B}$ comprises of the honest
strategies, \eg not including selfish mining which could provide better ROI
by diverging from the protocol.
\noindent\textbf{Proof-of-work.}
\noindent
We have experimentally analyzed the egalitarianism of the following
proof-of-work coins: Bitcoin, Litecoin, Ethereum, and Monero. These
cryptocurrencies act as a representative sample among the thousands of existing
cryptocurrencies. Bitcoin is the largest and most successful cryptocurrency by
market cap. Litecoin is the first cryptocurrency aimed at becoming more
egalitarian by replacing Bitcoin's SHA256 work function with scrypt~\cite{percival2016scrypt}, a
memory-hard function~\cite{DBLP:conf/eurocrypt/AlwenCPRT17}. Ethereum is one of the most promising alternative
cryptocurrencies, the first to support smart contracts, and the second largest
by market cap; its proof-of-work function is different from both Bitcoin and Litecoin.
Finally, Monero is special with claims of strong egalitarianism due to its
memory-hard mining function, Cryptonight~\cite{van2013cryptonote}. Furthermore, its protocol is often
updated to maintain
egalitarianism~\cite{monero-hard-asic}.
As expected, our experiments show that Bitcoin is the least egalitarian of the
four, with Ethereum following next. Monero is more egalitarian than both, with
Litecoin being the most egalitarian among the proof-of-work coins
we have studied. \todo{why?}
For our experimental setting, we worked as follows. First, we collected
empirical data which describe the available mining hardware options in the
market. For each machine choice, we determined the cost of investment. This is
comprised of its initial price (in USD) as well as its energy cost of operation
(in Watts). The cost of operation was translated to USD per hour by considering
the electricity cost of KWh. As a reference, we used the lowest average KWh
cost in the United States, \ie $\$0.08$ per KWh~\cite{energy-cost}. This reference electricity cost is an estimation which
can vary depending on the country of operation.
Second, we use the reported hash rate of each mining hardware machine to
extract an expectation of the freshly mined coins it would generate per hour,
if it were to run continuously. This expectation is taken over the randomness
of all honest blockchain protocol executions. As such, each party is awarded
block rewards in proportion to their computational power. The difference
between revenue per unit of time and cost of operation per unit of time
produces an \emph{income rate}, which is measured in USD per hour.
For our experiments, we use an interval of investment with $|d| = 1$ year. Although
this choice is arbitrary, it corresponds to the usual definition of ROI in
traditional finance.
Our investment strategy is as follows. The
initial available capital is allocated to an upfront technology
investment, in which an integer instance of the Unbounded Knapsack problem
\cite{mathews1896partition} is solved using dynamic programming\footnote{The
source code of our implementation for this calculation is available in our
repository.} to optimize the total cash flow.
Subsequently, as long as the cash flow is positive, the purchased machines
operate for the indicated total duration, reinvesting part of the freshly
minted coins in electricity costs, in order to generate more coins. Eventually,
this strategy produces an income of freshly generated coins, which have not
been spent and are reported as the strategy's income.
To calculate our concrete numbers, we employ the constants shown in
Table~\ref{tbl:work-constants}. We use the expected block generation rates for
each cryptocurrency, as well as the reward per block, token price, and mining
difficulty at the time of writing, all of which we assume remain constant.
The variance of electricity cost, the duration of
investment, as well as small fluctuations in price and difficulty do not qualitatively change the shape of our egalitarian curves (see Appendix~\ref{sec:appendix-qualitative-difference}).
% Although small
% changes in the constants' values will not affect the relative comparison, we
% note that extreme changes may reorder the currencies in terms of
% egalitarianism. For example, consider the case of Bitcoin where all mining
% products, except a relatively cheap one, are unprofitable, a plausible scenario
% in case \eg the price of Bitcoin drops significantly. In this case, Bitcoin
% could become as egalitarian, or even more, as \eg Litecoin. Thus, identifying
% the ``breaking points'' of egalitarianism for each cryptocurrency, compared to
% others, is an interesting problem which needs be considered in future work.
\begin{table}
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline
Variable & Description & Unit & BTC & ETH & LTC & XMR & DCR\\
\hhline{|=|=|=|=|=|=|=|=|}
$|d|$ & duration of investment & years & \multicolumn{5}{c|}{$1$} \\
\hline
$\ec$ & electricity cost & USD / kWh & \multicolumn{5}{c|}{$0.08$} \\
\hline
$\bgr(c)$ & block generation rate & blocks / s & 1 / 600 & 1 / 14.7 & 1 / 150 & 1 / 120 & 1 / 298\\
\hline
$\thr(c)$ & total hash rate & Thash / s & 34,727,437 & 179.50374 & 174.537 & 0.00033859 & 178,760\\
\hline
$\br(c)$ & reward per block & tokens & 12.5 & 3 & 25 & 3.37 & 11.38\\
\hline
$\tp(c)$ & token price & token / USD & 4,074.25 & 126.12 & 32.10 & 47.27 & 18.62\\
\hline
\end{tabular}
}
\caption{A list of the parameters used in our proof-of-work mining simulations. Some parameters are system-agnostic, whereas others depend on the cryptocurrency $c$.}
\label{tbl:work-constants}
\end{table}
\dionyziz{confirm that changing the total hash rate maintains curve shapes and argue about it in the main text}
Let $\mathcal{M}$ denote the set of
all available mining machines. For each machine $m \in \mathcal{M}$, our empirically
collected data specifies the following parameters:
\begin{inparaenum}[i)]
\item the energy consumption rate $\ecr(m)$ in Watts,
\item an initial cost of purchase $\ic(m)$ in USD, and
\item a hash rate $\hr(m)$ in Terahashes per second.
\end{inparaenum}
Given the above, we can now calculate the expected income rate per hour
$\mathbb{E}[\ir(m)]$ for a given machine $m$ and a cryptocurrency $c$. In the
following equation, the first part identifies the income per hour, \ie the
amount of tokens (denominated in USD) which the machine produces per hour,
whereas the second part of the equation identifies the electricity cost, \ie
the product of the consumed electricity multiplied by the price of a single
KWh:
\[
\mathbb{E}[\ir(m)] = 3600 \cdot \frac{\hr(m)}{\thr(c)} \cdot \br(c) \cdot \bgr(c) \cdot \tp(c) - \ecr(m) \cdot \ec
\]
There are many possible configurations for technology investments. Each
configuration comprises of a number of copies $n \in \mathbb{N}$ of every
machine type $m \in \mathcal{M}$. Therefore, we define each configuration as
$\overline{m} \subseteq \mathcal{M} \times \mathbb{N}$, with
total initial cost of investment for such configuration being
$\ic(\overline{m}) = \sum_{(m, n) \in \overline{m}}{n \cdot \ic(m)}$.
The above figure is given in USD per hour and, since the initial capital should
suffice to buy the machines of the configuration, we require that
$\ic(\overline{m}) \leq v$,
where $v$ is the initial available capital at the beginning of the simulation.
Now, in order to identify the strategy's optimal net income for the
interval $d$, we iterate over all possible machine configurations, for which
the above inequality holds, and choose the one with the maximum returns:
\[
B_\textsc{OPT}(v)
=
\max{
\{
\sum_{(m, n) \in \overline{m}}
{|d|\mathbb{E}[\ir(m)]}:
\overline{m} \subseteq \mathcal{M} \times \mathbb{N}
\land
\ic(\overline{m}) \leq v
\}
}
\]
We note that this is only an approximation to the optimal (in our limited model)
solution, which we used in our simulations. We consider this sufficiently close
to optimal to allow for the calculation of egalitarianism. We give an integer
programming formulation of the optimal strategy for capital allocation in
Appendix~\ref{sec:ip}. We remark here that the general problem of mining hardware
allocation (including our simplified approximation) is computationally
hard~\cite{karp1972reducibility}, as both the Knapsack and the Integer
Programming problems are NP-complete.
As the simulation parameters are many and diverse, in order to allow others to
run the experiments with different values, as well as for reasons of
reproducibility and falsifiability, we openly release our mining investment
optimizer as well as our data for public use\ifanonymous\footnote{The link to our mining investment calculator and our mining hardware data,
which are available under an open source license, has been redacted from this
version for anonymity purposes.
}\else\footnote{Our mining investment calculator and our mining hardware data are available
under the MIT license and a Creative Commons 4.0 Attribution License
respectively at \url{https://github.com/decrypto-org/egalitarianism}.
}\fi.
\begin{figure}
\placesubfigure{btc_dp_10K_12_months.pdf}{fig:btc_dp_10K_12_months}{Bitcoin}{0.9}{0.5}
\placesubfigure{eth_dp_10K_12_months.pdf}{fig:eth_dp_10K_12_months}{Ethereum}{0.9}{0.5}
\placesubfigure{ltc_dp_10K_12_months.pdf}{fig:ltc_dp_10K_12_months}{Litecoin}{0.9}{0.5}
\placesubfigure{xmr_dp_10K_12_months.pdf}{fig:xmr_dp_10K_12_months}{Monero}{0.9}{0.5}
\placesubfigure{dcr_dp_10K_12_months.pdf}{fig:dcr_dp_10K_12_months}{\emph{Proof-of-work} Decred}{0.9}{0.5}
\caption{Egalitarianism curves of the proof-of-work cryptocurrencies analyzed in this work.}
\label{fig:egalitarian_curves_pow}
\end{figure}
The egalitarianism of Bitcoin, Ethereum, Litecoin and Monero are shown in
Figures~\ref{fig:btc_dp_10K_12_months}, ~\ref{fig:eth_dp_10K_12_months},
~\ref{fig:ltc_dp_10K_12_months}, and~\ref{fig:xmr_dp_10K_12_months}
respectively.
Decred is a hybrid proof-of-work/proof-of-stake cryptocurrency, in
which block generation is a collaboration between miners and minters.
Specifically, each block which is mined via proof-of-work needs to be
``vouched for'' by a certain number of minters, who give it a vote of
confidence. Both the miners and the minters who participate in block
generation are rewarded. An investor can therefore choose to participate in
Decred by either investing in mining hardware and performing proof-of-work, or
by purchasing stake and performing proof-of-stake (or a combination thereof).
We note that the choice of whether to mine or mint Decred is not always clear.
While mining may be more profitable for a certain initial capital, it can also
carry various risks. For instance, if the difficulty increases, the mining
hardware may be rendered inefficient and also hard to sell. Proof-of-work also
carries the operational overhead discussed in Remark~\ref{rmk:pow-scale}. On
the other hand, stake can always be sold, although the price may fluctuate, and
carries negligible operational overhead. As the decision between the two is not
obvious, we analyze both strategies independently. The egalitarianism of
proof-of-work mining for Decred is shown in
Figure~\ref{fig:xmr_dp_10K_12_months}.
It is evident from all figures that the ROI is ``capped'' by a maximum value,
which is observed in specified intervals. Indeed, this value identifies the
ROI of the \emph{best available} machine and is in line with Lemma~\ref{lem:sybil}. In other words, as long as an
investor is able to buy the machine which returns the most profits, then they
achieve the best possible ROI. In case an investor does not have enough capital
to buy the best mining product, they may buy a less profitable machine and
achieve less, though still positive, ROI. This observation explains the small
spikes in ROI which may be seen \eg in Bitcoin's figure for capital in the
range $[0, 2000]$. Also, in case the capital is \emph{more} than the cost of
the machine, then the remaining capital is effectively discarded. Therefore,
although two investors $A, B$ may start with initial capital $v_A < v_B$, if
their returns, in absolute terms, are the same, then the ROI
of $B$ will be smaller as a percentage compared to the ROI of $A$. This
observation explains the decrease in ROI after the spikes. Finally, we observe
that, as the capital increases, the ROI converges to the cap. This is
explained by the fact that the ``discarded'' capital, \ie the capital which
cannot be invested in mining hardware, is a significantly smaller percentage of
the total capital for large investments.
\begin{figure}
\placesubfigure{decred-stake.pdf}{fig:decred-stake}{\emph{Proof-of-stake} Decred}{0.9}{0.5}
\placesubfigure{pure-pos.pdf}{fig:pure-pos-stake}{\emph{Pure} proof-of-stake Ouroboros}{0.9}{0.5}
\caption{The egalitarianism curves of the proof-of-stake systems analyzed in this work.}
\label{fig:egalitarian_curves_pos}
\end{figure}
\noindent\textbf{Proof-of-stake.}
\noindent
We now analyze the proof-of-stake egalitarianism in two settings. First, we
consider pure proof-of-stake, which can be applied on top of a protocol like
Ouroboros. In this case, \emph{pure} is in opposition to \emph{delegated}
proof-of-stake, a setting where the stakeholders are required to delegate their
stake to other parties, namely ``stake pools'' and is deployed in
cryptocurrencies such as EOS, Bitshares, and others. Second, we consider the
case of minting Decred via its proof-of-stake mechanism.
The egalitarian curve for \emph{staking} Decred is illustrated in
Figure~\ref{fig:decred-stake}.
% The curve is almost perfectly egalitarian.
As mentioned above, Decred is an opt-in staking cryptocurrency, where staking
occurs by purchasing so-called \emph{tickets}. Since the price of a ticket is
quantized, egalitarianism is harmed for capitals which are not multiples of
ticket prices. However, one can see that the envelope of maxima of this curve
is perfectly egalitarian. The spikes that cause the discontinuity of the curve
are due to the large ticket price (currently $\$1756$), which in Decred is
determined by the market and is high due to the limited supply of tickets
available per ticket pool, a parameter inherent in their protocol. Perfect
egalitarianism could in principle be achieved by making the ticket price
approach $0$.
In the case of Ouroboros, every coin has the same probability of
being chosen for extending the chain~\cite{C:KRDO17}. When a coin is eligible for block
generation, its owner can create a block by providing a proof of ownership of
the chosen coin. Consider the case of a cryptocurrency with $N$ coins in
circulation. When a block needs to be created, a coin is chosen at random from
the set of $N$ coins. Therefore, each coin may be chosen with $1 \over N$
probability. Then the address which owns the chosen coin, in other words the
stakeholder which controls this coin, is eligible to generate a block and
receive the block rewards associated with it.\footnote{In~\cite{C:KRDO17}
the payout does not explicitly include
freshly minted coins and is comprised of transaction fees. We consider an identical
reward schedule as~\cite{C:KRDO17} but comprised only of freshly minted coins.} In our experiments, we assume that every block is associated with a
constant reward, which pertains to newly minted coins. Furthermore, since
computational power does not affect the rate of block production, it is
reasonable to assume that both the electricity and the hardware equipment's
price is constant for all users, regardless of stake accumulation, so all users
can participate using --- relatively --- cheap resources (cf. Remark~\ref{rmk:pow-scale}).
Figure~\ref{fig:pure-pos-stake} depicts the simulation of a pure proof-of-stake
system. In this case, the users pay a set transaction fee\footnote{As of January $2019$, according to
\url{https://cardanoexplorer.com/}, in the Cardano implementation of Ouroboros
these fees are in the order of $\$0.01$.} for the
purchase of the initial stake. The rest of their capital is allocated as stake.
The figure suggests that this system is closer to perfect egalitarianism
compared to the rest of our case studies.
\noindent\textbf{Summary.}
\noindent
Our findings are summarized in Table~\ref{tbl:egalitarianism}. We find that
Bitcoin is the least egalitarian, followed in turn by Ethereum, Monero, and
Litecoin\footnote{Litecoin may appear to have better egalitarianism
compared to Monero due to limited availability of mining machines.
More data are needed to economically compare scrypt and
CryptoNight mining.}. The latter two are the
most egalitarian due to their use of CryptoNight and scrypt respectively. Mining
with Decred provides the worst egalitarianism of all tested coins. \todo{why?}
However, the most egalitarian coins involve staking. Decred staking, due to its
quantized ticket pricing, is only approximately egalitarian and comparable to
the performance of mining Litecoin. Pure proof-of-stake, which allows continuous
staking, is \emph{almost perfectly} egalitarian, its small divergence from
perfect egalitarianism stemming from the small capital which is required to pay
the transation fees to participate in the staking process.
\begin{table}
\centering
\begin{tabular}{|c|c|c|}
\hline
Name & Consensus mechanism & Egalitarianism \\
\hhline{|=|=|=|}
Bitcoin & Proof-of-work & -0.034490298 \\
\hline
Ethereum & Proof-of-work & -0.006926114 \\
\hline
Litecoin & Proof-of-work & -0.000271822 \\
\hline
Monero & Proof-of-work & -0.002206135 \\
\hline
Decred & \begin{tabular}{c} Proof-of-work \\ Proof-of-stake \end{tabular} & \begin{tabular}{c} -0.412524642 \\ -0.000348280 \end{tabular} \\
\hline
Ouroboros & Proof-of-stake & -0.000000295 \\
\hline
\end{tabular}
\caption{A comparison of the egalitarianism values of the cryptocurrencies explored in this study.}
\label{tbl:egalitarianism}
\end{table}