Reducing volatility for a linear and stable growth in a cryptocurrency

Page created by Scott Murphy
 
CONTINUE READING
Reducing volatility for a linear and stable growth in a cryptocurrency
EXAMENSARBETE INOM DATATEKNIK,
GRUNDNIVÅ, 15 HP
STOCKHOLM, SVERIGE 2021

Reducing volatility for a linear and
stable growth in a cryptocurrency
Encourage spending, while providing a stable
store of value over time in a decentralized
network

GUSTAF SJÖLINDER

CARL-BERNHARD HALLBERG

KTH
SKOLAN FÖR KEMI, BIOTEKNOLOGI OCH HÄLSA
Reducing volatility for a linear and stable growth in a cryptocurrency
Reducing volatility for a linear and stable growth in a cryptocurrency
Reducing volatility for a linear
and stable growth in a
cryptocurrency

Encourage spending, while providing a stable store
of value over time in a decentralized network

Reducering av volatilitet för en linjär
och stabil tillväxt i en kryptovaluta

Uppmana användning, samt tillhandahålla ett
värdebevarande över tid i ett decentraliserat nätverk

Gustaf Sjölinder
Carl-Bernhard Hallberg

Degree Project in Computer Engineering
First cycle,15 ECTS
Stockholm, Sverige 2021
Supervisor at KTH: Luca Marzano
Examiner: Ibrahim Orhan
TRITA-CBH-GRU-2021:047

KTH
The School of Technology and Health
141 52 Huddinge, Sverige
Sammanfattning

Internet gav människor möjlighet att utbyta information digitalt och har förändrat
hur vi kommunicerar. Blockkedjeteknik och kryptovalutor har gett människan ett
nytt sätt att utbyta värde på internet.

Med ny teknologi kommer möjligheter, men kan även medföra problem. Ett problem
som uppstått med kryptovalutor är deras volatilitet, vilket betyder att valutan
upplever stora prissvängningar. Detta har gjort dessa valutor till objekt för
spekulation och investering, och därmed gått ifrån sin funktion som valuta.

För att en valuta ska anses som ett bra betalmedel, bör den inte ha hög volatilitet.
Detta är inte bara begränsat till kryptovalutor, då till exempel Venezuelas nationella
valuta Bolivar är en fiatvaluta med historiskt hög volatilitet som förlorat sin köpkraft
på grund av hyperinflation under de senaste åren.

Med detta i åtanke föreslår vi en ny kryptovaluta; Dynamic Network Token, vars
uppgift är att reducera volatiliteten i en kryptovaluta genom att reglera utbudet
dynamiskt med hjälp av burning och minting. Denna implementeringsuppgift är att
minska hög volatilitet till fördel för en mer stabil och linjär tillväxt och samtidigt
uppmana användare att använda Dynamic Network Token mellan varandra i
nätverket.

Nyckelord

Kryptovalutor, Volatilitet, Burning, Minting, Dynamiskt, Värde, Investering,
Stabil, Tillväxt
Abstract

The Internet provided humans a new way to exchange information digitally and has
changed how we communicate. Blockchain and cryptocurrencies have given humans
a new way to exchange value over the internet.

With new technology, new possibilities arise, but not always without issues. One
problem that has risen with cryptocurrencies is their high volatility, meaning that
the currency has big price swings. It has made these currencies objects for
speculation and investment almost exclusively, and therefore they have lost their
functionality as a currency.

For a currency to be viewed as a good means of payment, it cannot be associated with
high volatility. This is not only restricted to cryptocurrencies, as for example the
Venezuelan Bolivar is a fiat currency with historically high volatility and has been
losing its purchasing power due to hyperinflation in the recent years.

In regard to this we propose a new cryptocurrency; the Dynamic Network Token,
which aims to reduce the volatility in a cryptocurrency by regulating the supply
dynamically with burning and minting. The implementation of this functionality will
strive to remove the high volatility in the token for the benefits of a more stable and
linear growth, and at the same time encourage users to transact with the Dynamic
Network Token between each other.

Keywords

Cryptocurrencies, Volatility, Burning, Minting, Dynamic, Value, Investing, Stable,
Growth
Acknowledgment

To whom it may concern, the authors are grateful for the aid received during the
work done in this thesis project.

 - Vires in numeris.
Glossary

Bitcoin - The first cryptocurrency. It uses proof of work for validating transactions
on its blockchain and has a hard cap.

Blockchain - A distributed digital ledger, storing blocks of transactions made with
the native currency related to the specific blockchain. It is maintained and validated
by nodes in a decentralized peer-to-peer network.

Burning - A method that removes tokens from the total supply.

Cryptocurrency - A digital currency recording transaction in a decentralized
network using cryptography.

Ether - The native token of the Ethereum protocol.

Ethereum - A cryptocurrency ecosystem powered by the EVM (Ethereum Virtual
Machine) allowing for the deployment of smart contracts and decentralized apps.

Ethereum test-net - Ethereum development network used for developing and
testing cryptocurrencies and other decentralized applications. Two examples are the
Goerli and Ropsten test networks.

ERC20 - A token deployed on the Ethereum blockchain as a smart contract.

EVM - Ethereum Virtual Machine.

Fiat Currency - A physical currency such as the U.S dollar and Swedish krona
controlled by the government.

Hard Cap - A cryptocurrency with a finite supply.

Market Cap - The total value of a fiat currency invested in an asset, often nominated
in dollars. In cryptocurrencies the market cap is calculated by multiplying price with
circulating supply.

Miner - A computer that solves a computational problem to verify Bitcoin
transactions.

Minting - A method that adds tokens to the total supply.

OpenZeppelin - A library provider for developing cryptocurrencies.
Residual - A measurement of how far a data point is from a regression line.

Smart Contract - A self-executing transaction protocol with terms of agreement
between a buyer and a seller being written in code that is deployed on a blockchain.

Stable Coin - A cryptocurrency, which is pegged to a fiat currency, i.e., has a 1:1
ratio.

Tether - A stable coin with a 1:1 ratio to the U.S dollar.

Token - A type of cryptocurrency representing an asset residing on a blockchain. It
is fungible and tradable, meaning that one token is always equal to another making
it suitable for transactions.
Table of contents
1 INTRODUCTION ................................................................................................... 1
 1.1 PROBLEM .................................................................................................................................... 1
 1.1.2 SUPPLY AND DEMAND ............................................................................................................... 2
 1.1.3 VOLATILITY IN CRYPTOCURRENCIES ........................................................................................... 3
 1.1.4 HYPERINFLATION ...................................................................................................................... 4
 1.2 GOALS ........................................................................................................................................ 5
 1.2.1 THE DYNAMIC NETWORK TOKEN ............................................................................................... 5
 1.2.2 CAUSES FOR VOLATILITY IN CRYPTOCURRENCIES ....................................................................... 6
 1.2.3 CONTROL OF VOLATILITY IN CRYPTOCURRENCIES ....................................................................... 6
 1.2.4 REGULATE GROWTH IN CRYPTOCURRENCIES .............................................................................. 7
 1.2.5 SELECTION OF PARAMETERS ..................................................................................................... 7
 1.3 DELIMITATIONS ............................................................................................................................ 8
 1.4 CONTRIBUTION OF AUTHORS ........................................................................................................ 9

2 THEORY AND BACKGROUND ......................................................................... 11
 2.1 INFLATIONARY CURRENCIES ....................................................................................................... 12
 2.2 DEFLATIONARY CURRENCIES ...................................................................................................... 12
 2.3 BITCOIN .................................................................................................................................... 13
 2.4 ETHEREUM ................................................................................................................................ 14
 2.4.1 SMART CONTRACTS ................................................................................................................ 14
 2.4.2 ERC-20 TOKEN ...................................................................................................................... 15
 2.4.3 BURNING AND MINTING IN AN ERC20 ....................................................................................... 16
 2.4.4 DEPENDENCY OF ETHEREUM................................................................................................... 17
 2.5 TETHER .................................................................................................................................... 17
 2.6 BLACK-SCHOLES PRICING MODEL ............................................................................................... 18
 2.7 REAL WORLD USE CASES............................................................................................................ 18
 2.7.1 IMPLICATIONS OF DYNAMIC NETWORK TOKEN .......................................................................... 19
 2.8 RELATED WORK ......................................................................................................................... 20
 2.8.1 BURN AND MINT IN CRYPTOCURRENCIES .................................................................................. 20
 2.8.2 BURN MINT EQUILIBRIUM ......................................................................................................... 21
 2.8.3 RELATED PRICE MODELS ......................................................................................................... 22
 2.8.4 EVALUATION MODELS .............................................................................................................. 22
 2.8.5 RELEVANCE OF RELATED WORK ............................................................................................... 22

3 METHODOLOGY ................................................................................................ 25
 3.1 ROAD MAP ................................................................................................................................ 25
 3.2 LITERATURE STUDY ................................................................................................................... 26
 3.2.1 WHITEPAPERS AND REPORTS .................................................................................................. 27
 3.2.2 DOCUMENTATION ................................................................................................................... 27
 3.3 TOOLS ...................................................................................................................................... 28
 3.3.1 OPEN-ZEPPELIN ..................................................................................................................... 28
 3.3.2 INTEGRATED DEVELOPMENT ENVIRONMENTS ............................................................................ 28
 3.4 BURNING AND MINTING ............................................................................................................... 29
 3.4.1 BURNING................................................................................................................................ 30
 3.4.2 MINTING................................................................................................................................. 33
 3.5 ALTERNATIVE METHODS FOR CONTROLLING THE VOLATILITY ......................................................... 35
 3.6 SIMULATION OF PRICE ................................................................................................................ 36
3.6.1 JAVA PROGRAM ......................................................................................................................36
 3.6.2 VOLATILITY AS STANDARD DEVIATION .......................................................................................37
 3.6.3 GEOMETRIC BROWNIAN MOTION ..............................................................................................37
 3.6.4 BLACK-SCHOLES MODEL .........................................................................................................38
 3.6.5 GEOMETRIC BROWNIAN MOTION PROGRAM...............................................................................39
 3.7 ALTERNATIVE SIMULATION METHODS ...........................................................................................40
 3.7.1 CONSTANT ELASTICITY OF VARIANCE ........................................................................................40
 3.7.2 SABR VOLATILITY MODEL ........................................................................................................41
 3.8 LINEAR REGRESSION MODEL .......................................................................................................41
 3.8.1 R-SQUARED AND RMSE..........................................................................................................42
 3.9 TESTING OF THE TOKEN ..............................................................................................................43
 3.9.1 METAMASK AND ETHERSCAN ...................................................................................................43
 3.9.2 TRUFFLE AND GANACHE ..........................................................................................................44

4 RESULTS ............................................................................................................ 45
 4.1 PRICE SIMULATION .....................................................................................................................45
 4.1.1 UNREGULATED PRICE ..............................................................................................................45
 4.1.2 REGULATED PRICE ..................................................................................................................45
 4.2 COMPARISON OF PRICE SIMULATIONS ..........................................................................................46
 4.3 EVALUATION OF LINEAR REGRESSION ..........................................................................................49
 4.3.1 LINEAR REGRESSION WITH REGULATION ...................................................................................50
 4.3.2 LINEAR REGRESSION WITHOUT REGULATION .............................................................................51
 4.3.3 COMPARISON OF REGRESSION MODELS ....................................................................................53

5 ANALYSIS AND DISCUSSION .......................................................................... 55
 5.1 INTERPRETATION OF PRICE SIMULATIONS .....................................................................................55
 5.1.1 RELIABILITY OF SIMULATED RESULT ..........................................................................................55
 5.2 ACCURACY OF REGRESSION MODELS ..........................................................................................56
 5.3 IMPACTS OF THE DYNAMIC NETWORK TOKEN...............................................................................56
 5.3.1 ECONOMICAL IMPACT ..............................................................................................................56
 5.3.2 SOCIAL AND ETHICAL IMPACT ...................................................................................................57
 5.3.3 ENVIRONMENTAL IMPACT .........................................................................................................58
 5.4 ASSUMPTIONS ...........................................................................................................................58
 5.5 BLACK-SCHOLES FOR CRYPTOCURRENCIES.................................................................................59
 5.6 CHOICE OF BURN AND MINT METHOD ...........................................................................................59
 5.7 CHOICE OF SIMULATION METHOD ................................................................................................60
 5.8 REALISTIC PRICE SIMULATION .....................................................................................................61
 5.9 RESTRICTIONS AND LIMITATIONS .................................................................................................61

6 CONCLUSIONS .................................................................................................. 63
 6.1 FUTURE WORK ...........................................................................................................................63

7 REFERENCES .................................................................................................... 65
APPENDIX A - LINEAR REGRESSION MODELS ................................................ 77
APPENDIX B - BLACK SCHOLES AND GBM CODE .......................................... 79
APPENDIX C - REMIX TRANSFER FUNCTION ................................................... 81
1 Introduction | 1

1 Introduction

This chapter intends to lay out the introduction of this paper as well as presenting
the problem set to solve for this thesis project. In section 1.1, the problem regarding
volatility will be presented along with crucial concepts related to the problem.
Section 1.2 will formulate the goals of the work and section 1.3 will set the
delimitations to reduce the workload to something comprehensible. To finish this
chapter, section 1.4 will discuss the contribution of the authors.

A digital currency seems less unintuitive today than ever before. Humans have gone
from using physical means of payments such as metals commodities or cash, to
almost paying everything with credit cards [1].

With Bitcoin becoming a household name and the rapid growth of adoption for
cryptocurrencies [2], the birth of a new form of transacting value emerges. This
new way of transacting contrasts with the traditional credit or debit card, fully
decentralized and uses the distributed ledger of a blockchain with no middle hand
intervening, delaying, or taking a percentage on the transaction [3].

The functionality and capabilities of the blockchain and cryptocurrency technology
seems promising, but it still is in its infancy and needs improvement.

As with most new technologies, for example as with the electric car manufacturer
Tesla, their cars were more inclined to catch on fire in the early days than they are
now. According to their vehicle safety report, the rate of a fire related accident has
dropped from one each 170 million miles to one each 205 million miles between 2018
and 2020 [4]. This is a good example of how new technologies may experience
problems in the beginning, but still have great use cases which will improve and
bring benefits for the world in the long run.

This is the case with cryptocurrencies as a means of payment. Bitcoin, which was
intended as a means of payment or “electronic cash” [5], is almost solely viewed as a
store of value because of its deflationary properties [6].

1.1 Problem

In recent years, the popularity and interest in cryptocurrencies has grown rapidly
and it is not slowing down. As this asset class is in its infancy, its place in society is
not clear nor well defined. Today we view cryptocurrencies as currencies and not as
2 | 1 Introduction

securities or commodities [7], which put them in the same category as any other fiat-
currency such as the Swedish krona or the U.S dollar.

But even though cryptocurrencies are viewed as a form of currency, they share many
attributes of commodities and securities, as they are subject to volatility and price
speculation. In most cases the volatility is greater than that of commodities like gold
or oil [8]. This creates a problem for the asset class, as it is not a property suited for
a currency.

According to Gresham's Law [9], bad money will drive out good money in a society.
This means that currencies with the same face value in a society will experience a
higher circulating supply (i.e., higher spending) of the currency that is viewed as less
good, as the good money will be more desirable to keep [10]. This principle can in a
way be applied to cryptocurrencies against fiat currencies when it comes to spending
because of the volatility associated with cryptocurrencies. This is because it creates
an opportunity to capitalize on volatility to the upside, as well as lose purchasing
power if the cryptocurrency experiences volatility to the downside.

To create more of an equilibrium and to get users of cryptocurrencies to spend the
currencies, the volatility must be removed or reduced significantly to encourage
spending. For example, if you look at Bitcoin which as of 8th of April 2021, is the
number one cryptocurrency by market cap [11], it has gone from being created with
an intention to be used as a means of payment between two parties without a middle
hand [5], to now be viewed as a store of value similarly to gold or an investment
opportunity. This is a direct consequence of its high volatility to the upside and has
led to less spending and more holding and trading of the asset.

Another consequence is when the volatility is high to the downside, as Bitcoin loses
its purchasing power. Meaning that the holders of Bitcoin cannot buy as much as
before due to high drops in value compared to its fiat pairing. The result of volatility
to the upside and the downside is the discouragement of spending, as the stability of
Bitcoins value becomes speculative and unpredictable.

1.1.2 Supply and demand

Volatility arises consequently from an uneven balance between buyers and sellers in
any given asset. When there are more buyers than sellers, the price goes up and vice
versa. This phenomenon is what is known in economic theory as supply and demand,
and it is the standard model used to evaluate the price of any commodity or asset of
today. The supply and demand theory states that; if the demand is high, but the
supply is scarce or getting scarcer with the same demand, it will increase the price of
the asset in the upwards direction. The same goes for the opposite; if the supply is
1 Introduction | 3

high and the demand is low or the demand is low and the supply is increasing, this
will create an uneven balance of the price in the downwards direction [12].

When it comes to commodities like gold for example, the supply can be viewed as
limited. This is because the process of extracting gold is not only time consuming but
also hard due to the rarity of the metal [13].

This restriction of supply is one of the main factors making gold historically looked
upon by most people and societies as a store of value or an investment [14]. As the
supply is low and the demand is high, this creates a rise in price.

1.1.3 Volatility in cryptocurrencies

Bitcoin is known to be an asset associated with high volatility. In 2017 it experienced
a 1318% increase in price, making an unforgettable impact in the financial world
when reaching its high of 19114 U.S dollars in late 2017.

 Figure 1.1: Chart of Bitcoin in U.S Dollars between Sep-16 to Jan-18, Source: Thompson, 2021.

In mid-2018 the price of Bitcoin dropped 72.6% from its peak, creating a yearly range
from 16477 down to 3314 dollars. As can be seen, both the positive and negative years
when it comes to price for Bitcoin can be considered extremes. Even the average
annual return from Bitcoin is 408.8%, which also can be considered extreme [15].

Bitcoin is not the only cryptocurrency experiencing this extreme price volatility. Both
the number two and three cryptocurrencies Ethereum and Binance Coin, behave in
the same way in regard to volatility [16] which can also be seen in figure 1.2. For
instance, Binance Coin, which is a relatively young currency in comparison to
Bitcoin, has experienced an increase in price like Bitcoin in its infancy. In the span
4 | 1 Introduction

of three years, Binance Coin has had a 4635% increase in price which furthermore
proves the volatility in the cryptocurrency market [11].

Figure 1.2: Chart of Ethereum and Binance Coin’s volatility between Feb-17 to Mar-20. Source: Cryptoz.ai,
 2018.

1.1.4 Hyperinflation

Cryptocurrencies are custom to volatility as described in section 1.1.2. This can be
seen on the price over time graphs for most of the cryptocurrencies [17]. But
cryptocurrencies are not the only currencies experiencing high volatility, as
traditional types of fiat currencies can experience what is known as hyperinflation.

All fiat currencies of today experience inflation to some degree, due to the
government's ability to print more money. This means that the purchasing power of
the currency weakens over time, resulting in a price increase of goods and services
[18]. Hyperinflation can be viewed as inflation, with the main difference being the
rate of the weakening of the currency. If the rate of inflation grows with more than
50 percent per month, the currency is experiencing hyperinflation [19].

A good example of hyperinflation in a fiat currency would be the Bolivar, which is
the national currency of Venezuela. In comparison to the U.S dollar, the Bolivar has
gone from being worth 0.232558 per one dollar in 2012, to zero per one dollar as of
April 20th, 2021 [20].
1 Introduction | 5

 Figure 1.3: 10-year chart of the Bolivar in comparison to the U.S Dollar. Source: Xe.com.

This is not exclusive to the Venezuelan bolivar, as there have been many cases of
hyperinflation in history. For example, the Zimbabwe dollar experienced it a decade
ago, peaking out in 2008, resulting in the discontinuation of the local currency the
Zimbabwe dollar [19]. When a nation experiences hyperinflation, the usual response
is that the people seek to store their wealth in some other currency, commodity, or
asset. But as no fiat currency is immune to inflation and commodities or assets do
not provide a good way to transact in day-to-day life, the cryptocurrency developed
in this thesis can provide a solution to the problem.

1.2 Goals

This section intends to present the goals for this thesis project, giving a clear insight
into what needs to be done when developing the cryptocurrency in regard to the
problem of volatility postulated in section 1.1.

In 1.2.1 the presentation of the token developed called the Dynamic Network Token
will be laid out, and by narrowing down the theoretical work needed to four specific
topics presented under 1.2.2, 1.2.3, 1.2.4 and 1.2.5, the goals of the thesis become
more tangible for the development of the cryptocurrency.

1.2.1 The Dynamic Network Token

The practical goal for this thesis is the development of a cryptocurrency that will be
called Dynamic Network Token or in short, DNT. This development will be done with
the aim of trying to solve the problem of volatility in cryptocurrencies described in
1.1. For the development to succeed, the topics brought up in the other subsections
needs to be addressed and studied. If these topics can be answered and implemented
6 | 1 Introduction

in the Dynamic Network Token, the practical goal of creating a less volatile
cryptocurrency will be achieved.

To summarize the goals that needs to be achieved in the implementation of the
Dynamic Network Token, which are separately described in the subsections 1.2.2,
1.2.3, 1.2.4 and 1.2.5, the following questions and its relevant concepts must be
understood and studied:

 ● What causes the volatility in cryptocurrencies?
 ○ Hard caps
 ○ Supply and demand

 ● Can the volatility be controlled in a cryptocurrency?
 ○ Burning
 ○ Minting

 ● Is it possible to regulate the growth so it becomes more linear and stable?
 ○ Linear growth
 ○ Wiener process and geometric Brownian motion
 ○ Burn-to-mint ratio

1.2.2 Causes for volatility in cryptocurrencies

For the project to succeed, the question of what factors causing the volatility in
cryptocurrencies must be derived. Concepts such as supply and demand discussed
in section 1.1.2, in combination with concepts such as hard caps and deflationary
currencies described in 2.1, will bring more clarity to the causes behind the volatility.

The goal of identifying the reasons behind the volatility will make it possible to focus
on controlling these aspects when implementing the functionality for the Dynamic
Network Token. This results in us understanding regarding what creates or does not
create the volatility in other cryptocurrencies.

1.2.3 Control of volatility in cryptocurrencies

As cryptocurrencies can be viewed as programmable money [21], the reduction of
the volatility will be achieved through taking the methodological approaches using
functionalities such as minting and burning in the smart contract protocol governing
the Dynamic Network Token. Minting and burning itself is adding and subtracting
tokens from the total supply of the token, which will create a possibility to regulate
the price of the token.
1 Introduction | 7

Minting implies as with traditional central banks, following the monetary banking
system [22], the printing of money. In the case for a cryptocurrency, the minting
implies adding coins or tokens to the total supply.

Burning is the concept of reducing the total supply by sending coins or tokens to a
“black hole” address [23], making these coins or tokens non-retrievable. This will
create a regulation in the supply of the currency, making it scarcer.

By the knowledge gained from studying causes for volatility in other
cryptocurrencies as mentioned in section 1.2.1, the practical focus can be targeted at
developing functionality preventing volatility in the Dynamic Network Token.

1.2.4 Regulate growth in cryptocurrencies

To regulate the price growth and to reduce the volatility, a model for achieving this
must be created for the Dynamic Network Token. The goal of creating linear growth
for the price of the token will be achieved by controlling the volatility as mentioned
in 1.2.2.

To see if the functionality of the algorithm for minting and burning tokens works,
development of a Python script implementing the geometric Brownian motion
formula using the Black-Scholes model [24], simulating price growth over time and
studying the results obtained is a good approach. Implementing the script with the
use of geometric Brownian motion came to be because of its use in the traditional
financial markets for pricing options [25], giving an idea of where price is going
based on the three factors of starting price (s0), interest rate ( ) and volatility ( ). By
studying the results with different values for these three parameters; starting price,
interest rate and volatility, a better understanding of how the price will behave in
different scenarios can be derived. This will give insights regarding how the price
growth will hypothetically look like over time and if the burn-to-mint ratio is
sustainable.

1.2.5 Selection of parameters

The different parameters needed for the geometric Brownian motion program
utilizing the Black-Scholes model for price simulation, will govern how the price and
volatility will behave in the simulation. This section therefore intends to present the
selection process of these parameters.

The first parameter is the starting price or s0. Selecting the starting price can be done
8 | 1 Introduction

somewhat arbitrarily, because it is not known in the simulation stage what the price
will be when deploying the Dynamic Network Token. It is also the parameter which
sets the starting point for the random walk of the Brownian motion, thus only
dictating the start of the walk and will not interfere in the studying of volatility.

As the Dynamic Network Token does not yield interest simply by holding the token
in a standard cryptocurrency wallet, the interest rate parameter or will be chosen
based on the average yield from Bitcoin, Ethereum and Tether as of the 26th of April
2021, from holding the cryptocurrency in an interest account with the company
BlockFi [26].

Standard deviation is seen as the statistical measure of volatility in a market or asset
[27]. Therefore, the volatility parameter should be calculated from the standard
deviation of price over iterations. To obtain this parameter, an iterative Java-
program will be developed and then the standard deviation can be derived from the
total number of transactions from the iteration.

1.3 Delimitations

The delimitations set in the thesis intend to restrict the theoretical work to the
studies of a few cryptocurrencies and concepts such as Ethereum's ecosystem, smart
contracts and the ERC20 token standard [28].

The ERC20 standard offers a secure and interoperable way to implement a
cryptocurrency with well documented and audited libraries provided by
OpenZeppelin [29]. This will reduce the practical work surrounding the
development, so it can be more directed at implementing functionality handling the
volatility in the Dynamic Network Token.

The following bullet points provide a summary of the delimitations set:

 ● Deeper studies of other cryptocurrencies will be restricted to:
 ○ Bitcoin
 ○ Ethereum
 ○ Tether

 ● Cryptocurrencies with burning and minting will be restricted to:
 ○ Binance Coin
 ○ Helium
 ○ Factom
|9

 ● Development of the currency will follow the ERC20 standard for minimizing
 the risks associated with un-audited code.

 ● Development using the ERC20 standard will also reduce the amount of code
 to be written, so the focus can be targeted at implementing the functionality
 solving the postulated problem.

 ● Dependencies and libraries used during development will solely come from
 OpenZeppelin, as they provide the most secure and audited libraries in the
 cryptocurrency space.

1.4 Contribution of authors

The distribution of the workload between the authors has been divided equally, from
writing the code, to the testing and writing the report. During programming of the
Dynamic Network Token, the method of couple programming was used. This method
makes it easier to detect errors in the code, as one person programs and the other
supervises the code live. It also makes it easier to find better solutions, as a discussion
on implementation can be had simultaneously as programming.

For testing of the token, both the authors have been active as users of the token in
the network. Gustaf has been deploying the smart contract on a Ethereum test-net,
mainly Ropsten and Goerli which are the names of two of the most common test-
nets for developing, then sending tokens to Carl-Bernhards wallet on the same test-
net. This made testing of the practical functionality of the token possible, as we could
evaluate if the token behaved as we wanted.

Work that was done separately was the detailed study of different coins. As Gustaf
had a lot of prior experience using the Ethereum network and transacting ERC20
tokens, he focused on the details of Ethereum, Ethereum’s whitepaper, its ecosystem
and the ERC20 standard. Carl-Bernhard focused on the study of the stable coin
Tether, its whitepaper, and its stabilization mechanisms, as it was needed for a better
understanding of how a low to non-volatile cryptocurrency can be created.
10 |
2 Theory and background | 11

2 Theory and background

This chapter intends to lay out the theory and background regarding the problem
with volatility in cryptocurrencies and how it came to be, as well as presenting the
theoretical framework proposed for the solution. The choice of the coins mentioned
in this chapter has been carefully selected because of their respective functionality,
contributing to the implementation in this thesis project.

The first two sections 2.1 and 2.2, intend to explain the two main types of currencies
in use today. These are inflationary currencies, which are the most common type of
currencies used by any government today in the form of fiat-currencies [30]. The
other type of currencies are deflationary currencies, which are often not only
currencies, but rather a means of payment.

In section 2.3, a summary regarding the first cryptocurrency Bitcoin, inflationary
currencies and deflationary currencies will be presented. Bitcoin was chosen because
it has the most history and has some properties of a deflationary currency i.e., it has
a hard cap and a regulated supply due to the halvening mechanism [31]. It has also
experienced high volatility historically, making it the most suitable deflationary and
volatile coin to study.

In section 2.4, the Ethereum cryptocurrency and ecosystem will be presented, along
with the concept of smart contracts and ERC-20 tokens. Ethereum was chosen for
its ability to host another token, making it suitable as a platform for our project, as
it reduces the development time and provides greater interoperability between our
token and other ERC-20 tokens.

Section 2.5 presents the concept of a stable coin and Tether, the stable coin issued by
Tether Limited, which is of current time the most used stable coin. The choice of
studying a stable coin seemed to be the most natural contrast to a highly volatile coin
such as Bitcoin, as it is a coin with low volatility in comparison.

Under section 2.6 the Black-Scholes model is presented, which is a model used for
pricing of stocks and options. This model was chosen because of its wide usage in
traditional finance and wide recognition.

Section 2.7 will address the potential use cases for the Dynamic Network Token and
what impacts it could have in the real world. These use cases being that it is
inflationary resistant, provides a vehicle for investment and is fair in regard to its
users.
12 | 2 Theory and background

In the last section, 2.8, the related work surrounding the choices made for the
methods implemented will be acknowledged. This includes the studies of other
cryptocurrencies, price simulation models and evaluation models.

2.1 Inflationary currencies

Today every country is using some form of physical cash or currency backed by a
government [32]. These currencies are known as fiat-currencies and share two
important aspects; centralized governance and are by nature inflationary.

In economics, the concept of inflation is simple. It can be viewed as a growth of the
general price level, resulting in less purchasing power for any given currency. A
currency experiences inflation when more of it is added to the circulating supply,
resulting in a devaluation of the currency itself [18]. As the process of creating new
fiat currency is relatively easy and does not have the same uncertainties as for
example gold mining [33], the possibility to add fiat currency is quite simple in
comparison.

Figure 2.1: Graph of the total money supply of the U.S dollar from 1959 to 2021. Source: fred.stlouisfed.org

2.2 Deflationary currencies

The most known asset that can be used as means of payment and can be considered
deflationary is gold. Throughout history, gold has been one of the main metals used
in coins because of its rarity, practicality, and sustainability against the elements
[34]. This was what made it valuable and accepted among different societies.

What makes gold deflationary is the long and hard process related to the extraction
of the precious metal [33], making the minting of new gold to the total supply an
2 Theory and background | 13

uncertain and difficult process. As the chance of finding gold makes the metal scarce,
it is considered an asset that has a finite supply or a hard cap.

Bitcoin is another example of a currency with deflationary properties [31]. As
opposed to traditional currencies (fiat-currencies), Bitcoin has a built-in mechanism
in its protocol known as the halvening, that cuts the reward that miners receive for
each block that has been mined in half. Miners are the nodes validating transactions
through solving cryptographic puzzles, keeping the Bitcoin blockchain and its
distributed ledger secure [35].

This mechanism impacts the supply in a predictable way and reduces the adding of
the circulating supply, i.e., slowing down the growth rate for Bitcoins in circulation
[36]. The effect of the halvening results in a deflationary behaviour, making the
supply of bitcoins less available over time.

Bitcoin also has what is known as a hard cap, meaning that there will never be more
than a certain number of coins in circulation. This function in tandem with the
halvening, contributes to deflation as the supply gets scarcer and there is only a finite
number of coins, resulting in demand only being the factor that can drive the
purchasing power [37].

2.3 Bitcoin

In the ashes of the financial crash of 2008, Bitcoin emerged seemingly from nowhere
as a means of payment with the vision to be resistant against inflation and centralized
governance. In Bitcoins whitepaper, it is stated in the abstract that the idea of Bitcoin
is to act as a pure peer-to-peer electronic means of payment to rule out the middle
hand, i.e., financial institutions [5]. Bitcoin provides an optional way to exchange
value, but as its protocol is programmed to be deflationary in regard to supply, there
is no encouragement to spend as there would be in an inflationary currency losing
its purchasing power over time. Therefore, Bitcoin has become a store of value rather
than being a means of payment which was the intention of Satoshi Nakamoto when
presenting Bitcoin’s Whitepaper in 2008.

The evolution for Bitcoin has thus gone from being intended as an electronic cash
system, to a currency used as an asset similarly to gold. And by every means, the two
assets share many attributes such as: it has a finite supply, i.e., scarcity, it is fungible
and divisible, thus it can be used as a means of payment and its supply behaves
deflationary. This has led to the minting of the terms “Gold 2.0” and “digital gold”
[38] as reference to Bitcoin because of its similarities to gold.
14 | 2 Theory and background

2.4 Ethereum

Ethereum in comparison to Bitcoin, is vastly different. The intention the Ethereum
initiative had with proposing the idea for Ethereum in 2013 was to create an
alternative protocol for building decentralized applications where anybody could
execute scripts, deploy a smart contract containing immutable code and run
decentralized applications on the Ethereum Virtual Machine.

In Ethereum’s whitepaper, it is stated that the design behind Ethereum is intended
to follow five core principles. The first principle, simplicity, is Ethereum’s way of
saying that the protocol should be as simple as possible and that optimization that
adds complexity should only be implemented if it provides substantial benefit for the
network.

The second principle that is stated in Ethereum’s whitepaper, universality, is the idea
of providing a programming language which a programmer can use to construct any
smart contract or transaction type that can be mathematically defined.

The third principle, modularity, where Ethereum’s protocol is designed to be as
modular and separable as possible. This leads to better security and less need for
modification for the application stack when one has modified a small protocol.

The fourth principle, agility, is there for constant changes in the Ethereum protocol
if it is beneficial for the network. In short, the details of the Ethereum protocol are
not set in stone.

The final principle, the non-discrimination principle simply means that anyone can
use the protocol without restriction or prevent specific categories of usage. For
example, a programmer could run a program that infinitely increments a variable by
one in an infinite loop if the programmer pays the per-computational-step
transaction fee in Ether [39].

2.4.1 Smart contracts

Smart contracts can be viewed as a protocol or program, governing transactions by
executing them according to the terms defined in the contract.

The objective of a smart contract is to rule out any third-party governing
transactions, i.e., a trusted intermediate who has the role to create trust between the
two parties transacting. As every transaction is stored publicly and all users oblige to
the same rules in the protocol, smart contracts create a way of transacting between
arbitrary participants without the need of trust from a third party.
2 Theory and background | 15

To execute a smart contract, it must be compiled and stored on a blockchain. Often
associated with the compiling and storing of the smart contract on a blockchain, is a
transaction fee. In the case with Ethereum, the smart contract will be executed on
the EVM after the payment of this transaction fee made in Ether. This transaction
fee is also known as “gas” [40].

2.4.2 ERC-20 token

The ERC20 (Ethereum Request for Comments 20) token is a fungible Ethereum
based token, meaning that one token is always equal to another token from the same
smart contract, creating a means of payment when utilizing the token between two
parties.

To be viewed as an ERC20 token, it must have some standard functionality related
to it. This incorporates the following functions and events:

Functions needed for an ERC20 token:

 ● function name() public view returns (string)
 ● function symbol() public view returns (string)
 ● function decimals() public view returns (uint8)
 ● function totalSupply() public view returns (uint256)
 ● function balanceOf(address _owner) public view returns (uint256 balance)
 ● function transfer(address _to, uint256 _value) public returns (bool success)
 ● function transferFrom(address _from, address _to, uint256 _value) public
 returns (bool success)
 ● function approve(address _spender, uint256 _value) public returns (bool
 success)
 ● function allowance(address _owner, address _spender) public view returns
 (uint256 remaining)

Events needed for an ERC20 token:

 ● event Transfer(address indexed _from, address indexed _to, uint256 _value)
 ● event Approval(address indexed _owner, address indexed _spender, uint256
 _value)

The ERC20 standard also provides interoperability between different ERC20 tokens,
as they all are built upon the Ethereum blockchain, making it easier to interact with
different types of ERC20 tokens [28].
16 | 2 Theory and background

2.4.3 Burning and minting in an ERC20

The ERC-20 token is the standard for smart contract tokens deployed on the
Ethereum blockchain. By implementing the functions and events mentioned in
section 2.4.2, a token can be defined as an ERC-20 token.

The ERC-20 standard thus creates a possible base for every token in the Ethereum
ecosystem, making it possible to transact [41]. The ERC-20 standard alone will not
make it possible for a token to become volatility resistant, therefore the concepts of
burning and minting must be added to the implementation.

Burning and minting are two concepts related to smart contract development,
making it possible to control the number of tokens in existence. Burning is the
functionality that will reduce [42] the number of tokens and minting is the
functionality creating new tokens, adding them to the supply in the same way as
traditional mints add to the supply of a fiat currency [43]. The implementation of
burning and minting is something that is unique to every token, as the developer(s)
must come up with algorithms or protocols for the functionality suiting the goals for
their specific token.

It is common to implement burning so it will interact with the transfer function of
the ERC-20 standard. In this way, burning can be achieved when transferring a token
or some conditions regarding the transfer(s) of ERC-20 tokens.

When a burn is called in the protocol of the smart contract, the number of tokens set
to be burned will be sent to the 0x0 address, also known as the “black hole address”
[23]. This address can be viewed as an address that is consuming ether and tokens,
never to be retrievable again, making it a “black hole”.

 Figure 2.2: Overview of the 0x0 Address as of 28th of April 2021. Source: Etherscan.io.
2 Theory and background | 17

Minting is the opposite of burning, as it adds new tokens to the supply. Every smart
contract, and therefore every ERC-20 token, must do at least one minting when the
contract is deployed [44]. This will create the initial supply, setting the balance of the
wallet address deploying the smart contract equal to the amount minted.

As minting new tokens to the supply of a cryptocurrency is in practice the same thing
as governments printing fiat currency, most cryptocurrencies will not use minting
functionality embedded in the protocol as it will increase inflation of the token.

2.4.4 Dependency of Ethereum

As all ERC20 tokens are deployed as smart contracts on the Ethereum blockchain,
the dependency of Ethereum is inevitable. This implies that the functionality for any
ERC20 relies on the Ethereum project and its ability to function properly.

If the Ethereum network would stop working, become insecure or the value of the
Ether in dollars would go to zero, the miners on the Ethereum network would no
longer have an incentive to keep the network running because there would not be
any value in the reward earned from fees. This would result in exposure to problems
such as double spending which would devalue the network or even destroy it [45]. If
things like an insecure Ethereum blockchain or a low to zero value of ether in dollars
would occur, all ERC-20 tokens would be affected as they reside on the Ethereum
blockchain. It could even result in making the transacting of any ERC20 token
impossible, thus removing the value in the tokens.

Alas Ethereum makes it easier for the deployment of a cryptocurrency with great
interoperability potential, but at the same time it also creates a dependency where
faith in the value of Ether is necessary.

2.5 Tether

Tether Limited is a company behind the Tether cryptocurrency whose purpose is to
have a one-to-one ratio with the U.S Dollar in contrast to Bitcoin whose vision is to
be resistant against inflation and centralized governance. In their proposal of the
Tether cryptocurrency, the main benefit is the ratio to the dollar and the possibility
for world assets to migrate to the Bitcoin blockchain since Tether is running on top
of Bitcoin’s blockchain via the Omni Layer protocol [46].

Since it is hard to match the dollar with a one-to-one ratio, Tether states in their
whitepaper that proof of reserve is the way to ensure a one-to-one ratio. This means
that for every US Dollar transferred to Tether Limited’s bank account, they will issue
18 | 2 Theory and background

the same amount of dollars transferred into Tether. This ensures a one-to-one ratio
to the dollar and makes Tether a so-called “stable coin” [47].

However, the proof of reserve method does not come without any problems that need
to be solved. In Tether’s whitepaper it is stated that four weaknesses have been
identified and handled by Tether Limited to ensure the security of their assets.
Tether Limited, the company that issues Tether’s could go bankrupt but the assets
that are in circulation would still be safe and redeemable. Their bank could go
insolvent, but Tether’s assets are insured by the banks that they use, as the banks
accept Tether’s business model. The most dangerous weakness with Tether is the fact
that their bank could freeze or confiscate the funds which would lead to Tether’s
being worth absolutely nothing [48].

2.6 Black-Scholes pricing model

The Black Scholes model is a model for pricing options and stocks in the traditional
financial markets [24]. Since its inception, it has become a standardized way to
predict and simulate the price of different assets. The model itself makes use of what
is known as a geometric Brownian motion [25] to create a continuous stochastic
process. Using a Brownian motion or wiener process in combination with the
parameters (interest rate) and (volatility), the Black-Scholes model makes it
possible to simulate the behavior of a financial asset such as an option or a stock.

The model provides a way to simulate and predict prices of assets in the financial
markets, it is used heavily by economists and large companies around the world. For
example, PricewaterhouseCoopers (PwC) stated in their Stock Compensation report
from 2017 that over 82% of large companies solely relied on the Black-Scholes model
for predicting prices of stock compensations [58].

2.7 Real world use cases

Postulated in section 1.1, the problem of volatility is not only restricted to
cryptocurrencies. A fiat currency experiencing hyperinflation, is also experiencing
high volatility. In 2.1 and 2.2 the concept of inflationary and deflationary currencies
was postulated. These concepts are somewhat opposites of each other. The
inflationary approach taken in fiat currencies diminishes the purchasing power of a
currency by adding more of it, i.e., adding to the supply.

In contrast, a deflationary currency like Bitcoin regulates the supply by making it
scarcer with mechanisms such as the halvening and by having a hard cap. This brings
up a dilemma. That in theory, deflationary money should be preferred over
2 Theory and background | 19

inflationary types of money, as it increases the purchasing power over time. But the
problem that arises with deflationary money is that it demotivates spending in
accordance with Gresham’s law [10] and by the definition of deflation, as it will
presumably be more valuable over time.

As the goal of the Dynamic Network Token is to remove high volatility coming either
from deflation or inflation, this creates a real-world use case where users get the best
of the two; a growing value over time with incentive to spend the token as a means
of payment.

2.7.1 Implications of Dynamic Network Token

The Dynamic Network Token which is proposed as the solution to volatility within
cryptocurrencies can be used in several ways. Not only as a means of transacting to
other entities in the network or store for financial gain. But more importantly it could
be used as an exchange of value without being affected by inflation and deflation.

Stated in 1.1.3, the problem with the national currency of Venezuela experiencing
hyperinflation, could seek a solution in the use of the Dynamic Network Token or a
currency with the same functionality, as it is inflation resistant. The usage of such a
currency would result in slowing, reducing, or removing the possibilities of
hyperinflation, bringing back the purchasing power to the Venezuelan people. By
exchanging their national fiat currency for the Dynamic Network Token or begin the
development of their own national digital currency with the same properties as the
Dynamic Network Token, they can avoid losing purchasing power.

Besides looking at the possibilities of helping troubled countries with their inflation,
the project also provides investors seeking to gain capital an opportunity by holding
the Dynamic Network Token. Even though the token’s utility is highly based on using
the token as a currency, investors can still use it as a means of capital gains by holding
the token until they are satisfied with the results.

Since the Dynamic Network Token will be built upon its community,
implementations within real world scenarios are endless depending on what the
community needs and what it wants to be developed. In case the community wants
to use the token for online purchases, it can be developed for the satisfaction of the
community.
20 | 2 Theory and background

2.8 Related work

This section intends to bring up the related work. Section 2.8.1 will address related
work regarding the implementation of burning and minting in other
cryptocurrencies, section 2.8.2 will address other hybrid solutions using burning and
minting. Section 2.8.3 will bring up related work regarding other pricing models that
could have been used for simulating price, and 2.8.4 will acknowledge relevant work
done regarding evaluation models for cryptocurrencies. Lastly, the relevance of this
related work will be stated in section 2.8.5.

2.8.1 Burn and mint in cryptocurrencies

Prior to this work, research in the cryptocurrency field regarding burning and
minting was done. The focus of the research targeted projects using this type of
functionality, and how these projects had implemented it. With different goals and
ambitions, projects use different approaches to this area.

The projects chosen for studying these functionalities are Binance coin and the
Helium token. Both projects are considered well established and have drawn a lot of
capital to them and reside in the top 100 rankings by market capitalization as of April
2021 [11]. Helium was chosen mainly for its minting functionality, while Binance
coin was chosen for its unique approach to burning.

Other projects under consideration for the studying of the functionality were
Dogecoin and Safemoon Protocol. Dogecoin was considered as it mints 10,000 new
coins for each block mined, which leads to approximately 14 million new coins being
minted every day [49]. Safemoon Protocol was considered due to its burning fee
functionality that both locks liquidity and distributes a percentage of the transaction
to all its token holders.

However, these were disregarded due to the projects being considered unserious. For
example, Dogecoin developers have recently started working on the project again
due to its media attention and its creator admittingly says it was created as a joke
[50]. Dogecoin also as of May 2021 has the highest volatility of all cryptocurrencies
[51], making it very unstable and therefore also making the study of the mintings
impact on volatility hard. In the case with Safemoon, it has functionality
implemented preventing some users in the network from paying the burning fee
when transacting, making it an unfair network and is therefore unserious [52].

Binance coin is the native coin of the Binance blockchain, whose approach to burning
their coins is interesting. From the initial coin offering of Binance coin, the company
announced that they would burn 50% of its total supply by buying back Binance coins
You can also read