ūüéď

Crypto and Blockchain: An Introduction to Digital Currencies

Source:

Module 1: Introduction to Crypto

Lecture slides

  • Identify what is a Bitcoin and its rise to popularity
  • Discuss the methodology behind Bitcoin transactions
  • Analyze the growth of centralized intermediates and cash-alternative methodologies

Transacting in Bitcoin

  • if we want to understand why bitcoin might be popular, we need to ask what exactly is currency? Bitcoin is a cash-alternative to currency, so we're going to talk about cash-alternatives currently in use. Given that we have some pretty good cash-alternatives, and new ones all the time, we can ask why then cryptocurrency?
  • what you need is a wallet and your wallet can even be a physical wallet, though that's probably not ideal. What your wallet is, it's a place to store your Bitcoin credentials, which means your private key. Now what exactly is a private key? It's a 256 bit number expressed as a hexadecimal
  • this key is generated using cryptography. So if you lose your key there's no way to get it back. So when people say they've lost their Bitcoin, it's their private key that they've lost. So there's simply no way without the private key to access Bitcoin. On the other hand, if someone somehow takes your private key, then they have your Bitcoin, you have no recourse.
  • Using your private key you can generate your unique address which is public, and this allows you to sign off on transactions.
  • Current third party software such as Coinbase for example, which can be simply downloaded to your phone. It does all of this for you and stores your private key within its created digital wallet and then also access is for you a Bitcoin exchange. You can separately however choose a wallet and an exchange. And in the sphere of Bitcoin the wallet can doesn't need to be a third party can be peer to peer.
  • as a currency it has value as a medium of exchange. Now it doesn't need to have value as a medium of exchange at the moment.¬†But unless people believe that it can eventually function as a medium of¬†exchange in some states of the world, Bitcoin has no inherent value. So as we think about those opening quotes the idea that Bitcoin is a fraud or rat poison in the school yard. There is some truth to that because one possible value to Bitcoin is always zero.
  • might Bitcoin function someday as a generalised medium of exchange?
  • Many people think that merchants are required to take US dollars but that's not true. What it actually means is that the Treasury is required to take dollars as payment for taxes. And if someone owes you money you are required to take dollars as payment. So that's what's lying behind this fiat money, the fact that it's payment for debts, public and private. And that we can enforce the fact that it's payment for debts, public and private (by the authority of the US government)
  • these transactions occur, because we are in what the economists call a self-fulfilling equilibrium when it comes to US currency. Everyone agrees to take US dollars because they believe that everyone will take US dollars, now what does this rest on? Well ultimately it rests on the fact that dollars can pay taxes and discharge debt. And to the rule of law there's really nothing else other than the beliefs of all individuals that everyone will take dollar. So the bottom line is what makes a currency a currency, namely a medium of exchange, are the common beliefs of the individual users.
  • But in practice, the distinction between debt and¬†say a bank account is perhaps not very important.¬†Both credit card companies and your bank, which you may access with a debit card or¬†potentially with PayPal, are what's known as centralized intermediaries.
  • All the transactions are still done in terms of dollars, but¬†the credit card company or the bank keeps track of the accounts and¬†verifies the legitimacy of the transaction.¬†The intermediary in other words maintains a centralized ledger.¬†This is why stores take credit cards and debit cards instead of money.¬†They do not have to worry that they will not receive their funds because¬†the intermediary ensures that the centralized ledger is accurate.
  • So the credit cards are costly, yes, but it does avoid what used to happen long time ago in which merchants had to keep their own ledgers, and had to keep track of which customers checks would not bounce. And of course a big applications is that it allows anonymous transactions Internet transactions when you have no idea who you're transacting with.

Why Crypto?

  • So what Bitcoin allows one to do is to perform online transactions and for that matter, offline transactions that do not require physical cash because that's very difficult to deal with online. So potentially any transaction for which a credit card is used or debit card or PayPal could be a Bitcoin transaction. But it accomplishes this while being decentralized. So there is no centralized intermediary. There is no centralized ledger.
  • why would we want an alternative to credit cards or other intermediaries? So let's go through some possible reasons. So reason one a centralized intermediary has a lot of power. For instance, it can charge fees. Should we worry about the potential for abuse given the near-monopoly power for intermediary? For example, perhaps the credit card company might be tempted to tamper with its centralized ledger. Might it say remove some funds for enemies or reward friends.? So that's certainly a possibility, but probably this would not happen. Any credit card company or a bank that was caught doing something like this would not last very long and it is very profitable to be a centralized intermediary. Centralized intermediaries have what is known as franchise value. It's because of these fees that they can charge.
  • So the current system is in a sense ensures its own safety by allowing intermediaries to have this high franchise value. So I don't think reason one is really a good reason for Cryptocurrency.
  • Perhaps you are an extreme libertarian or an anarchist. So this describes some people, but it's probably not universal. So if we're looking for, why Bitcoin might have say, widespread adoption? Reason two is not very good either.
  • reason three is, you don't want to use the centralized intermediary because you do not want anybody to know what you're up to. The centralized intermediary keeps records. Those records could be accessed by the government under certain conditions. Perhaps you do not trust the government for some reason, maybe you are doing something specifically against the law
  • for Bitcoin, there are what we could call multiple equilibria in terms of its value. So one equilibrium for Bitcoin and the one that our commentators at the beginning seemed to think is going to persist is that no one uses it. If this is the case, then actually it's true worth really is zero. This is possible for a currency, but not say for stocks. A currency that nobody uses has no intrinsic worth.
  • a potential other equilibrium is that it is used by a narrow group of people and this is what seems to prevail more or less at the moment. Now, the future of money argument suggests that perhaps it will become a dominant medium of exchange.
  • there's another reason that people might want to use cryptocurrency and that is, cryptocurrency really is a currency alternative to dollars. Now at the moment, that's somewhat of a disadvantage because the value of Bitcoin is very volatile. But that's at the moment. So what if dollar themselves were to somehow become untrustworthy? Well, we're far away from that at the moment, but the value of the dollar does rest in the hands of the Federal Reserve. The Federal Reserve is in principle independent, it should be but the president of the United States is also the commander in chief who for that matter, controls the army. Even if everything is working well, the value of the dollar depends on everyone's expectations. It is not entirely in the hands of the Federal Reserve. So what could go wrong that would make cryptocurrency an appealing alternative?
  • Well, two things. Currently, we are in a very low inflation regime, but that might change. What if we had some level say, let's say five percent inflation? So five percent inflation doesn't sound so bad, but it is in effect a tax on everybody who has to use the currency. in that sense, having a competitor to dollars means that perhaps for the first time in history residents of a country are not trapped by the seigniorage this is what this is called.
  • Now, of course, there's a scarier alternative which is the currency truly becoming unstable and there are, of course, famous examples of this like the Weimar Republic from 1921 to 1923 and Venezuela starting in 2016. So Bitcoin is specifically designed with protection against these. So these events, especially the second, are remote, but it's their possibility that fuels interests in Bitcoin at least in part.
  • It is not enough for Bitcoin to have some advantages. There must be a critical mass of users who see these advantages as important.

Module 2: Rules and Structure of Bitcoin

Lecture slides

  • Examine how Bitcoin utilizes digital signatures in their transactions
  • Analyze how Blockchain employs Hash Functions to create a tamper-proof ledger
  • Discuss Distributed Consensus Protocol and Proof of Work

Introduction

  • CyberCash was a company in the 1990s that pioneered an online currency called CyberCoin. Now, one of the features of CyberCoin is that every user needed to obtain a certificate to verify their identity, and apparently nobody really wanted to do this. So CyberCash eventually filed for bankruptcy in 2001. The technology that was part of CyberCash was eventually acquired through several steps by what is now known as PayPal.
  • So DigiCash patented a blind signature scheme that has some similarity to bitcoin's protocol. Now, there was a divide between merchants and clients, which is very unlike bitcoin. Merchants were not anonymous, they needed to register with the bank. So it was not cumbersome for customers, but it was cumbersome for merchants. There was no user-to-user transactions. So CyberBucks failed when merchants did not want to register and then there were no clients that could trade among themselves. DigiCash filed for bankruptcy in 1998.
  • enter Satoshi Nakamoto. In a bitcoin forum, he writes, ''A lot of people automatically dismiss e-currency as a lost cause because of all the companies that failed since the 1990s. I hope it's obvious it was essentially controlled nature of those systems that doomed them.''
  • if you have a truly decentralized currency, what that decentralized currency must achieve is a system of ownership rights. That system has to be self-enforcing because it can't rely on a state. We discussed this in the previous lecture. There's no sovereign. There's no police department. So this decentralized currency must also maintain a ledger of transactions that is secure and accurate. This maintenance must also be self-enforcing because there's no profit-making intermediary behind the scenes. So we need to somehow have a currency that avoids the sovereign and the centralized intermediary.
  • if that were not enough, it also must maintain trading in the currency because currencies do trade, and it has to have rules governing the supply of the currency. So we need a sovereign, we need a centralized intermediary, and we need a central bank. All of this has to be decentralized.
  • how bitcoin meets these challenges using cryptography and using blockchain. So here are the topics that we will be covering

The Digital Signature

  • the first problem a cryptocurrency must solve, is it must develop a system of property rights. So previous digital currencies established property rights in somewhat cumbersome way and this is perhaps why they failed. Now governments established a system of property rights for their citizens. Transferring between two systems of property rights is inherently difficult, it's like you have to go through a no man's land and that's why it's expensive.
  • in Bitcoin and other cryptocurrencies, the system of property rights must somehow arise on its own and they must be self enforcing. So how is this done? so the first question is who is it that possesses the property rights anyway?
  • So Bitcoin has quite an elegant answer. It just dispenses with the notion of the human being in the background entirely. As far as Bitcoin is concerned, you are your signature. And by a signature, I mean something quite precise that I'm going to explain shortly. And you can have as many signatures and hence as many identities as you want, there's nothing wrong with that. The signature has a private component, sometimes called the private key and a public component. And this public component, the public signature is synonymous with another term that's often used in Bitcoin which is the address.
  • one key ingredient is one's ability to authenticate transactions, and this is why linking identity with the signature is so powerful. Now this authentication is especially important when there's no physical cash or a check book as in an online currency. So our first question thus is, how is authentication enforced in a decentralized system?
image
image
  • So when you transact with Bitcoin, your wallet automatically affixes the signature. And then the Bitcoin exchange, automatically verifies the signature. So as I said, it's very important that no one can forge your signature. And this really needs to be impossible here because there is no police department or course that can come in and say well, this was a forged signature.
image
  • many programs have in them random number generators. This is software that produces a string of random numbers. It's software that produces a string of random numbers, really? No, of course not, right? How could it actually be random? It's not random, right? It is an algorithm for producing a series of numbers that look random, but really are not random at all, right? How could a deterministic process which is what a software is, produce randomness? Answer, it can't. So in fact, there is no such thing as a random number generator when applied to coding.
  • Bitcoin uses a very good source of randomness for generating signatures, but no computer generated randomness is perfect. Now, this is not proven to be a problem, so far.
  • Summary: Bitcoin is a decentralized system of property rights. And key to this notion of property rights is a notion of identity. Now, the way we verify our identities is through the use of a signature, that's in the real non-digital world. And what Bitcoin does is it makes a signature in the identity one and the same. So a digital signature defines each Bitcoin transactions. These signatures at the core of Bitcoin require randomness and the randomness is imperfect, but so far this imperfection has not proved to be problematic.

A Tamper Proof Ledger

  • So the ledger contains a record of all Bitcoin transactions. So it's a memory system, and in fact this equivalence between money and memory was proposed by the macro-economist Narayana Kocherlakota back in 1998. And his point is that money and memory are the same. If you had perfect memory, you could implement any system that you could implement with money.
  • along with the digital signature, the accurate ledger is required for the existence of property rights in Bitcoin.
  • in his Bitcoin whitepaper, Satoshi Nakamoto realizes the problem with previous decentralized ledgers and proposes a solution. In previous attempts to decentralize, creators focused on making it impossible to tamper with the ledger.
  • What Satoshi realized is that it was sufficient to have incentives not to tamper with the ledger. And it was potentially much easier to create incentives not the tamper than to forbid tampering per se. And I think this is a nice example of how from the very beginning Bitcoin combined computer science with economic reasoning.
  • we make it easy to detect that the ledger had been tampered with. And thus any dishonest participant would be dissuaded from even trying. So, not only would any attempt be detected, there would actually be no attempts.
  • tampering with the ledger in Bitcoin is what in economics we call a, quote, off the equilibrium path. Nobody's going to do it, but we still need to design incentives, so that it remains off the equilibrium, as in not equilibrium behavior.
  • here's the solution, we make the ledger recursive.
  • in order to truly tamper with the ledger in a way that could not be detected, Bob would have to first tamper with the entry at stage two. Then the digest at stage three, then digest of the digest at stage four.
  • the digest that I've created here is created using cryptography, not, say, just the first initial of the names. And what that means is it's virtually impossible to change the transaction in such a way that it still matches the digest.

What is Blockchain?

  • So a tamper-proof ledger is crucial for creating a system of property rights. So in my example in the previous lecture, I created such a ledger recursively and the key trick is that every entry contains a little copy of the previous entry in the form of a digest.
  • Blockchain is the same idea but with cryptography so that it is hard to work around. Also, another key difference instead of transactions appearing one at a time, Blockchain stores transactions into blocks. That's important for efficiency.
  • Linked list: important to this idea of a linked list is something called a pointer. So a pointer in computer science, is a language object that stores the memory address of another value located in the computer memory. So the idea is it's not the object itself, but it tells you where to find the object. It's like an index entry.
  • A linked list is a linear collection of data elements such that each element contains a pointer that points to the next. So the elements might be entirely different places but they are connected by pointers. So what these pointers do is they turn what is a random collection of objects into an ordered list.
    • For example, it could be a list of financial transactions in which case, a list of financial transactions with a system of pointers is a ledger.
    • we replace the pointer with something called a hash pointer. Now, what this hash pointer does is turn the linked list into a block chain.
    • function is simply something that takes an input and returns an output. Now, what makes a function a function is that you can't have more than one output per input. Namely, if you put in the same input, however many times you put in that input, you get the same output. That's the defining characteristic of a function. However, you can have more than one input per output.
    • Now, imagine a function that maps an enormous space into a very small space. That's what a hash function is. It takes an input of virtually any size and returns an output of a fixed size and we will be interested in particular kinds of hash function, a cryptographic hash function. In this case, the hash function will return a 256-bit number.
    • SHA-256 is a cryptographic hash function. It really produces very random looking output. We can make this precise. The fact that it's a cryptographic hash function means two inputs are very unlikely to produce the same output.
    • you can get the sense that even a tiny amount of tampering will produce an enormous inconsistency between the statement and the hash.
    • collision-resistance and hiding means that one cannot cleverly tamper to produce the same hash. Recursivity means that one has to tamper all along the chain to not be discovered. So just to go back here, if any one of these hashes are wrong, all the rest of the hashes will not match. So this makes it extremely difficult to tamper with this type of ledger.
    • what then is a Blockchain? It is a linked list but instead of a pointer, it has what's called a hash pointer. Now, the objects are not individual transactions but they are blocks. The hash pointer is simply the hash function applied to the previous entry where it was created combined with the pointer to the previous elements. So it's just pointer plus hash function.
    • So thus it really is tamper-proof in the strongest sense. No one has an incentive to even try.
    • Examples

      image
    • there are no safeguards in this system to prevent Sophie from taking the coin and spending it twice (double spend attack)
    • image
    • All transactions in the ledger must be signed by a person named James, let's assume it's a very specific person to be valid.
    • But there are some problems. I mean, James does sound a little bit like a centralized intermediary. He's not quite a centralized intermediary, but it's not as decentralized as one might want. For example, James might decide to sign off on his friend's transactions but not on others. Also, it's a little unstable, right? We'd better hope that nothing happens to James. If something happens to James, we don't have a currency anymore. So this is not something that BitCoin wants. So with BitCoin, we are seeking a more decentralized system to avoid the double-spend attack.
    • image

      Distributed Consensus

      image
      image
      image

      Proof of Work

    • to ensure a system of property rights, nodes need to reach a distributed consensus on what can constitute a correct set of transactions.
    • Bitcoin must also replace the need for a central bank. So it must manage currency supply. Interestingly, these two problems turn out to be related.
    • Our initial digital consensus protocol, the thought experiment, was to pick nodes at random. By picking nodes at random, we make it hard for any single node to control the blockchain. This automatically disincentivizes malicious behavior by making malicious behavior difficult. However, it does require picking a node at random.
    • there's no such thing as computer-generated randomness. Recall a computer can only generate pseudo-random numbers. Even if there were, it would require a centralized computer to generate the randomness, and everyone would need to agree on it. So there would be some degree of centralization. So really we have two problems to solve: generating randomness and incentivizing honest behavior.
    • If randomness is not good enough, it makes it more likely that a malicious node will take over the system. But if we incentivize honest behavior, then fewer nodes are malicious to begin with, therefore, decreasing the need for true randomness.
    • Bitcoin's proof-of-work, proposed by Satoshi Nakamoto is a truly ingenious way of dealing with these problems.
    • Assume for the moment that we can pick a node at random to propose a block. Now, let's say that we give the node that proposes the blocks some extra bitcoins to transact with (a reward)
    • As part of the block, the node gets to include a transaction with these bitcoins, presumably to pay itself, but we don't know that. Now, this is going to act to keep the blocks honest. Why? It might seem strange, because they get the block reward even if they behave dishonestly. Well, here's how it works. The only way they actually get to receive their reward is if future nodes accept their block. So recall that future nodes except a proposed block by including a hash pointer to the block in the next block they propose.
    • image
      image

      Mining and Currency Supply

    • bitcoin mining is a resource-intensive activity that results in the discovery of new coins. Thus the analogy to precious metals implicit in the word mining. So here's how it works. Nodes compete to have a chance to propose the next block, they succeed if they are the first to solve what is called a hash puzzle, the hash puzzle is essentially a cryptographic puzzle. Puzzle-friendliness, which if you recall, is a property of the hash function, implies that such puzzles can be found. Now, the only way to solve the cryptographic puzzle is through trial and error, lots and lots of trial and error, think perhaps of hacking into a system by choosing passwords at random. The greater the computing power of the node, the more likely it is to be able to solve the hash puzzle because the faster it can do this trial and error. When it solves the hash puzzle, it proposes the block, with the potential to receive the block reward if the block is accepted.
    • Now, the block reward means it has mined new bitcoins. Now, here's something that's important, all nodes can verify that a given node has solved the puzzle, so the system is truly decentralized. Proof of work is, therefore, the solving of a hash puzzle for which the node is rewarded by being able to propose a block, but that may not be much of a reward, the main reward, is the block reward which is given in bitcoins.
    • For two competing nodes, let's say, with roughly equal processing power, there is simply no way to predict which node will solve the puzzle first, and get to propose its block. Does this mean that block selection is random? Well, if by random you mean unpredictable? Then yes.
    • Now, if by random you mean non-deterministic? Then no. Because given a set of initial conditions of the competing nodes, the process of which one gets to win is completely deterministic.
    • What this illustrates is actually a deep point about randomness that a process can both be deterministic and random, Henri Poincare made this point in the 19th century, and it's pretty useful for our purposes here. Block rewards are the only way within the bitcoin reference software for new coins to be mined. However, even block rewards are limited. For every 210,000 blocks, the block reward is cut in half because the blocks are created at a deterministic rate, this occurs approximately every four years. So because the block reward is cut in half, there is an exponential rate of decay in the growth rate of blocks. It means that the total number of bitcoins will converge to 21 million.
    • image
  • so we've passed the first inflection point. So the creation of new bitcoins allows the currency to be in limited supply at the beginning and then the supply to grow and then to converge to a fixed amount. what it does imply is that the bitcoin supply cannot be manipulated.
  • They also include the receipt of something called a transaction fee. The node proposes transactions in which the value of the bitcoins coming in exceed the value of the bitcoins going out. The remainder get to be paid to an address of the nodes' choosing. So what the transactions fees do is they ensure continuing incentives for trade in bitcoin. So here's a graph of the transaction fees, fees skyrocket in late 2017, but are now back to being negligible.
  • image
    image

Future Challenges

  • But critical to Proof-of-Work is the solving of a hash puzzle.
  • This process enables randomness only if no one node can accrue¬†enough power to monopolize the network.
  • And it also means that Bitcoin trading in its current implementation¬†is potentially slow and limited.
  • 51% Attack: What if a node succeeds in gaining a majority of the CPU power across all¬†nodes?
    • This node would then be the first to solve all the hash puzzles.¬†And then this node could build the longest chain in the blockchain.¬†So this system would then revert to being partially centralized.¬†You could think about it a little bit like James coin from the few lectures ago.¬†So let's discuss the situation.
    • First note that if a node were to obtain a majority of CPU power it would have to act as a benevolent dictator. Now, this may not be much comfort to have a benevolent dictator, but let's foresee why it would have to act as a benevolent dictator. The only possible reward to gaining CPU power and to proposing blocks is bitcoins. Now, a malicious 51% attacker could include lots of bitcoin payments to him or herself through their address. But actually, no other nodes would let this attacker spend the coins, so it'd be a little bit pointless. So any 51% attack is limited in its profitability, and this will already reduce the incentives for such an attack.
    • key is the fact that any attacker is going to have a very large incentive to maintain trading in bitcoins because probably, this attacker has a lot of bitcoins through all the block rewards received over time.
  • a weaker version of the 51% attack is what would happen if a small number of nodes were to control all the mining power. As bitcoin mining has become industrialized, this has been occurring. So it appears that mining power is concentrated in perhaps a small number of nodes
    • here's a worry, these miners could form a cartel. Now I'm not saying that the credit card companies are like a cartel but if they were, maybe the same thing could happen to the small number of nodes. They could then charge high transaction fees because transaction fees are as we discussed, part of the reward for creating blocks. This is also like seigniorage, which is essentially the tax from the sovereign to inflation seigniorage, under another name. It hasn't yet occurred though, and perhaps one reason for that is that, all involved have a stake, a very large stake perhaps in the continued success of bitcoin as a currency.
  • Resource Intensity: bitcoin mining uses lots of electricity. Maybe uses too much electricity.¬†Well actually, it doesn't use that much.¬†At most at the moment,¬†it uses only 6% of the energy used in the global banking sector.¬†And it's way, way, way tiny compared to the energy use of total consumption.¬†Now, why is this?¬†Mining takes place where energy is not a scarce resource, and¬†it can continue to do so.
  • Can the network scale? So blocks are limited in size. Blocks are limited in how quickly they can be created. And this puts pretty much a hard upper limit on the number of transactions per second, and there are not very many. This is not seem sufficient to be a large scale medium of exchange and this would really cap bitcoins usefulness. This is really, I think the part of Nouriel Roubini's critique in his congressional testimony that carries the most weight. it's safe to say that given this problem achieving scale is the most discussed issue in cryptocurrency.
    • logs on cryptocurrency point out the following trilemma, that blockchain systems can have at most of the three, being decentralization, scalability, and security.
    • Ethereum, for example, has a different version of Proof-of-Work. It uses many of the same underlying principles that I just described, but it seems perhaps to scale better.
  • Summary: Bitcoin, and perhaps other established cryptocurrencies, create a system of property rights that does not depend on enforcement by centralized authorities. These property rights can span jurisdictions, thus allowing for trades in ways that was previously expensive or difficult, or illegal. Cryptocurrencies enable this feat through technology, mathematics, and what I would call philosophical innovation. Property rights need not hold with certainty, it is sufficient that they hold probabilistically.
    • In one of the previous lectures, I pointed out that a money system is really a memory system. The Bitcoin system is a problem of collective memory. So like any society, the Bitcoin society relies on the truthfulness of this collective memory to function well. Is it possible to tamper with collective memory? Yes, it can be given enough power and a willingness of people to behave maliciously, collective memory can be tampered with. And in the 20th century, actual collective memory has been tampered with two disastrous effects. Think Stalin, or Hitler, or Mao.
    • Now interestingly, Bitcoin is not actually completely decentralized.
    • It requires that nodes agree on what's called the reference software.¬†Now, when there is agreement about what should be the reference software,¬†something called a hard fork is created.¬†So that's Bitcoin can flexibly accommodate dissent without dissolution.
    • But there does need to be widespread agreement about what Bitcoin means.¬†And there also must be some level of commitment to the continuation of the network.¬†In other words, malicious behavior for its own sake could destroy Bitcoin.

Module 3: Crypto as an asset class

Lecture slides

  • Discuss the theory and data perspectives of traditional finance
  • Describe the Capital Asset Pricing Model, Tangency Portfolio, and Sharpe Ratio
  • Compute the Beta and Alpha of Bitcoins

Introduction

  • the Gordon Growth Model and the CAPM are both in line with the views expressed at the start of the lecture, cryptocurrency should be worth zero.
  • However, suppose we take a purely data-driven perspective. Let's construct returns on cryptocurrency and look at the empirical properties of these returns. Let's treat these returns as if they were returns on any traditional investment and ask, if we saw an investment with returns like these would we want to hold it as part of our portfolio?
  • The first view that I've described using the capital asset pricing model and the Gordon Growth Model, is a theory-driven view, and we might be missing something important in our assumptions. View two, is a purely data-driven view, but there might be serious limitations to the data. So we might ask, is there a third view?

Risk and Return to Crypto

  • the price of Bitcoin tracks the volume pretty closely.
  • You can also look at the number of active addresses of Bitcoin which is some measure of how it's used. What's interesting about active addresses is that they in some ways actually predict the price of Bitcoin. So active addresses started to go up way before the price of bitcoin went up. This is an interesting fact that perhaps could be used in evaluation model.
  • Active address = number of users
  • to summarize, from these simple plots, we see that currency prices have stabilized at the time of this recording, following the crash from early 2018. We see that prices track volume and that they also track active addresses. We see that active addresses appear to have stabilized which is something we might expect. We see that currency prices for these three are very high relative to where they began. However, we also know that many cryptocurrencies have failed.
  • Now, cryptocurrency is a store of value and as such, we can think of it as an asset. So we're going to refer to the price of Bitcoin as the number of dollars it takes to buy one Bitcoin. So the price of Bitcoin right now is about 4,000.
  • image
    image
  • an important piece of information to keep in mind when you think about those returns. What I reported are statistical averages known as means. How are they calculated? What I did was I summed up the daily returns and divided by the length of the sample. So that's what statistics tells us is the best measure of what you can expect. However, what's very interesting about cryptocurrency is your returns on a day-to-day basis might look very different. So what your returns on a day-to-day basis look like, that's best described by the daily median return.
  • in all cases, the median return lies well below the mean return.
  • image
  • in technical terms, when the median lies below the mean, what it means is that cryptocurrency returns are positively skewed. Most of the time you lose money or you don't make much money, but you make it up on some really big outliers.
  • We see that actually most of the time Ripple returns lie well within the normal distribution, which is to say that that daily volatility is a little bit misleading. In fact, your volatility is lower than that most of the time. However, we compute such a high daily volatility because of the outliers. So you can see that the red line, which corresponds to the normal distribution, completely leaves out both the negative and the positive outliers for Ripple.
  • the prices of cryptocurrency, to summarize, appear to have stabilized. Active addresses have grown, and prices seem to rise with them. The top three cryptocurrencies have positive mean returns, but Ripple and Ether have negative medians, which means most days you would lose money, but there are positive outliers. Finally, returns are subject to survivor bias. We really need to keep in mind that we're looking at the three survivors whereas many coins have failed. What this means is that the returns are going to be inflated, though it's a little bit unclear by how much.

Portfolio theory

  • the most important insight from this theory that there are gains from diversification transcends the assumption of normally distributed returns. It's just a little more complicated to do this theory when returns are not normally distributed. I will then review the main consequence of this theory, which is the capital asset pricing model. So both are going to be very useful in the results that follow.
  • here are the assumptions of portfolio theory. The first is that investors prefer more to less, the second is that investors are risk averse, and finally, strictly speaking, we do assume the normal distribution for returns. Now, what this gives us is that investors care about the mean and the standard deviation of returns, but they don't care about higher order moments.
  • image
    image
  • Now let's introduce a riskless asset like a treasury bill. The tangency line from the riskless asset to the frontier tells you the best possible risky asset portfolio.
  • image
  • the tangency portfolio, the M, what's so special about it? Well, it has the highest possible slope. Any portfolio that has a lower slope will be sub-optimal, namely; you can get a better mean for the same level of risk by going to the tangency portfolio line. Now, portfolios with a higher slope would be wonderful, but they cannot be attained because you need some connection to the risky asset frontier. So this slope, which is the expected return minus the risk-free rate divided by the standard deviation, has a name. It's called the Sharpe ratio
  • image
  • what makes the capital allocation line so special is its the line that has the highest Sharpe ratio
  • Bill Sharpe in the 1960s realized an amazing consequence of the mutual fund theorem. If all investors hold the same risky asset portfolio than the market portfolio, which is the weighted average of everyone's portfolio, is the best possible portfolio, namely; the market portfolio is the tangency and the market portfolio is the efficient portfolio. So in other words, you don't even need to do statistical analysis to find the tangency, you can find the tangency just by looking at the market weights of all assets relying on the wisdom of crowds to have found the tangency for you.
  • the consequences of this insight, which is called the capital asset pricing model? Well, the first is that the market portfolio, the portfolio that holds assets according to their market weights, is an efficient portfolio, namely; all investors should combine the market portfolio and the risk-free rate. The second closely related is that the market portfolio has the highest Sharpe ratio possible.
  • image

Asset Allocation with Cryptocurrency

  • Beta of 1 = moves exactly as market moves. <0 = moves inversely to the market. between 0 and 1 = volatility less than market, but broadly moves with the market. Beta >1 = extremely dependent on market returns. High beta = more risky (in general).
  • another fact about cryptocurrency is that they have relatively low Betas.
  • image
  • Sharpe ratio is telling you how good is the risk return trade off of this asset.
  • image
  • So Bitcoin and Ripple have about the same Sharpe ratio as the S&P 500, and Ether has a slightly higher Sharpe ratio.
  • if we are going to base our asset allocation on the Sharpe ratio comparison, I would say this argues against investing in cryptocurrency. So whereas it's true that these cryptocurrency returns are high, if we look at the risk, the return per unit standard deviation is not very high.
  • So whereas it's true that these cryptocurrency returns are high, if we look at the risk, the return per unit standard deviation is not very high. So once we take issues of survivor bias and trading costs into account, the Sharpe ratio analysis argues against investing in cryptocurrency.
  • I would argue though that we don't want to base the analysis on the Sharpe ratio comparison. Instead, we want to use another measure. We should use the Alpha. What is the Alpha on an asset? Alpha measures something called the abnormal return. To understand abnormal return, we need to think about the capital asset pricing model
image
image
image
image
  • Crypto, as we saw with the Ripple plot, has a low covariance with the market, and that makes the returns more impressive because it can be used to diversify the market portfolio. So in other words, if we're talking about a specific asset, we don't want to look at the Sharpe ratio which is the measure for the overall portfolio, we want to look at the Alpha.
  • Alpha. Now, these are closely related, because if you have a high Sharpe ratio portfolio and if you include an asset that has a positive Alpha in that portfolio, what that does is it pushes the investment opportunity set outward and increases the slope
  • if you have you start with the highest Sharpe ratio portfolio you can find and then if you include an asset that has a positive Alpha, what that asset does is it will make your Sharpe ratio even higher. So by this discussion, what should happen is that if you include cryptocurrency along with the S&P 500, you can actually get a higher Sharpe ratio portfolio by combining these cleverly together.
image
image
  • how can we think about this Beta? Well, if we want to really get to what's driving Beta, we have to think about what's driving the price of cryptocurrency. So let's for a moment go with a substance, a simpler and more basic benchmark theory called the Gordon Growth Model. (theoretical view below)
image
  • However, if Bitcoin might be useful someday as a medium of exchange, then maybe we can think about the dividend a little bit differently. The dividend reflects the convenience of exchange.
  • For example, it is typical to have a bank account even though the rate paid by a bank is often below that of the treasury bill rate and the treasury bill rate itself is often below the rate paid on say AAA corporate bonds which are very safe. So it's pretty well established empirically, that there's something called a convenience yield for cash-like assets. So one way to think about this dividend is it's a convenience yield should Bitcoin ever become a cash-like asset.
image
  • On the other hand, when is it likely that cryptocurrency would become a medium of exchange? Related, when might people really consider cryptocurrency as a store of value? I would argue that the times when those things might occur are likely to be times that are not very good. They might be times of disruption, times of high risk, times when governments are not reliable, namely bad economic times when the market is doing poorly.
  • This is going to be what pushes the covariance and the Beta lower thus it is likely that a Beta of 0.5 reflects these two forces. What it means is that cryptocurrency possibly has a role on a portfolio as a hedging security.
  • to conclude, cryptocurrency returns implies Sharpe ratios close to those of the market. They have positive Alphas, abnormal returns, which suggests that they are good investment. No, this does not take into account survivor bias. Now, the traditional theory says, do not hold cryptocurrency no matter what, it pays no dividends, it has no role in the market portfolio. But traditional theory says, don't hold money of any kind. So crypto's role as a hedge against bad economic times makes it intriguing as an investment. But what's needed is a quantitative theory of cryptocurrency to take this into account.

Conclusion

  • to summarize, cryptocurrency is a highly controversial and very risky new asset class. Now, the big question that many focus on is will cryptocurrency some day function as a medium of exchange? But actually, that's not quite right. Here's a more nuanced and correct version. Will enough people believe that enough people believe that enough people believe, etc, that cryptocurrency will someday function as a medium of exchange? If this is the case, then beliefs can be self-fulfilling, and without cryptocurrency ever really being a medium of exchange, it can function as a store of value.
  • to summarize, cryptocurrency is a highly controversial and very risky new asset class. Now, the big question that many focus on is will cryptocurrency some day function as a medium of exchange? But actually, that's not quite right. Here's a more nuanced and correct version. Will enough people believe that enough people believe that enough people believe, etc, that cryptocurrency will someday function as a medium of exchange? If this is the case, then beliefs can be self-fulfilling, and without cryptocurrency ever really being a medium of exchange, it can function as a store of value.
  • why people might think cryptocurrency could be a medium of exchange because that's the key to its value?
  • blockchain is fundamentally and advanced based on economics not computer science. So the breakthrough is one of an idea. The idea is that, rather than make tampering impossible, create incentives so that tampering is unprofitable. In fact, at all levels, Bitcoin, for example, employs incentives so that all players work for the good of the system as we discussed in the second module. However, I would argue that the main advance even goes beyond this fundamental change and understanding. Beyond incentives, crypto relies on probabilistic thinking. So previously, the notion of transaction validity, say the non crypto world, requires a 100 percent certainty. If you make a transaction with your credit card, that transaction is verified with a 100 percent certainty, but crypto replaces this with near but not a 100 percent certainty. So thus, crypto creates probabilistic property rights that are decentralized, and in some sense aversion of probabilistic truth. So this requires a new way of thinking. So it's not as if you own something, you just you something with near certain probability. So it's a really big change in the way we think about property rights, and the way we might think about, say, transactions and how we interact with each other.
  • how does this come into valuation asset allocation? the traditional finance view understates the importance of cash for transactions and as a store of value. So a richer view could allow for valuation of crypto based on transaction advantages. On the other data side, crypto returns we have to acknowledge our inflated by survivor bias. So how can we put all of this together to build potentially a new finance view that would allow for crypto?
  • One thing to keep in mind that's important is that crypto is a natural hedging asset that suggests certain advantages. So the times when people believed that crypto is going to function as a medium of exchange are likely to not be the most stable states of the world. So this tells us a little bit about what we might expect from investing in crypto. First of all, it's going to be very volatile because of the potential for multiple equilibria, we're relying on the beliefs of everybody as opposed to a stream of dividends. We also should think about the returns as likely to not be very high. Even so far, on most days, one would lose money by investing in ether or an ripple. But on a deeper level, if cryptocurrency is a hedging assets the returns should be low. So the high average returns that we've observed might be anomalous. But that's okay. A hedging asset can have lower returns because you are using it because it pays off in not-so-good states of the world. Now, based on what we've seen in the data and based on this concept, one thing that we might expect for cryptocurrency is when we least expect it, we might see some very large positive surprises.

Module 4: Blockchain Ecosystem

Lecture slides

Building the blockchain

  • Blockchain provides the means for recording any transaction or track the movement of any asset, not just digital currency. The assets recorded on blockchain can be tangible such as cash, gold or real estate, or they can be intangible such as intellectual property, copyrights or even licenses.
  • Proof of stake serves as an alternative to this proof of work process. Proof of stake is a process whereby the amount held in a particular cryptocurrency determines the amount that can be mined by that holder of the cryptocurrency.
  • For example, if an individual holds three percent of a cryptocurrency, that individual can mine three percent of the blocks in a proof of stake process. Proof of stake is premised on the assumption that individuals with an economic stake in the cryptocurrency would not want to devalue their holdings, so they will always act in the best interests of the blockchain network.
  • Interoperability refers to standards that ensure that different blockchain implementations can work with each other, and there are many blockchain companies working in this space. Currently, the only way to move value across block chains is to move tokens into a centralized token exchange, trade on the exchange's in-house records, and then withdraw the asset onto a different blockchain. Interoperability standards could potentially speed up this process and derive the creation of value.
image
  • a smart contract is actually a set of digital promises including protocols within which the parties perform on the promises of the contract. In other words, a smart contract is a computer algorithm which performs the contract. Smart contracts can be written to be executed both on and off of a blockchain. An oracle is an agent that finds and verifies real-world occurrences and submits the information to a blockchain to be used by the smart contracts. Essentially, an oracle is a data feed provided by a third party data service. There are many types of oracles; software oracles, hardware, inbound data, outbound, and consensus-based where multiple parties would have to agree in order to verify a real-world occurrence.
  • Blockchain security companies conduct security audits of decentralized applications. For example, they might review a systems architecture and code and then provide a report on action items for the issues that are discovered. Blockchain legal and audit companies also comprise an important part of its development. They audit the compliance of a company's use of the blockchain. Privacy is also an important consideration in the development of the blockchain. Brockchain privacy companies are distributed data privacy platforms. How do they work? If an individual stores data on the blockchain encrypted with their own public key, they can actually delegate access to another individual using a privacy company. That data is then rekeyed to the second individual's key in storage, who can download the data and decrypt it.

Crypto Finance

  • Crypto finance includes payments, privacy, wallets, exchanges, and other components known as stable coins, different types of storage, and merchants that use the cryptocurrency to operate their businesses.
  • Cryptocurrency payments allow us to manage the ownership and transfer of cryptocurrencies. These payments companies that work in the crypto space, effectuate real-time, non-cash payments between entities.
  • Cryptocurrency privacy companies are another important part of crypto finance. These privacy companies create privacy by obscuring the identity of the sender of a payment. They use what are known as ring signatures or digital signatures that can be performed by any member of a group. As a result, the transactions on cryptocurrency cannot be linked to specific real identity.
  • A stable coin is a cryptocurrency with price stable characteristics. The stable coin is pegged to something else like the US dollar, but it can also be linked to a basket of currencies or even an index like the Consumer Price Index in the United States. Stable coins are important because they can potentially avoid the price volatility that many cryptocurrencies experience.
  • Crypto lenders allow individuals to lend against their digital assets as collateral. For example, if one wanted to take out a $10,000 loan they might pay an interest rate, for example 15 percent. But in the crypto space the ratio of assets to the loan is very important. These companies have to require a high amount of assets in order to make the loan, maybe 50 percent. So for example, for a $10,000 loan, $20,000 worth of digital assets might be required as collateral. Finally, an important area of crypto FinTech is investment.

Business cases

  • Reputation systems address a risk known as counterparty risk. For example, if I'm conducting a transaction with someone else, I face the risk that that person won't fulfill their obligations under that transaction. That is counterparty risk. So for example, if we're lending money to one another, we face the risk that party A might not lend the money or party B might not pay it back. The blockchain can be used to create a reputation system that encourages and rewards accurate information about those parties. Together, that data can be used to create what's known as a reputation score. Today, companies are using the blockchain to create these reputation systems and leverage them within their business community.
  • Companies are working to use the blockchain to allow individuals to own and control their own healthcare information. Using blockchain technology, patients can potentially decide who would get access to their information in a secure fashion. For example, the data on the blockchain could be used by patients to be sold to a drug trial of their choice. In this way, the blockchain can be used to transform the way we control and distribute our healthcare information.
  • Authenticity within the blockchain ecosystem, refers to the integrity and validation of data. Within authenticity, data and title is one very important business use case. An example, real estate. Currently, we face problems with the data and storage of real estate information. For example, title is stored on paper, sometimes in a town or county hall and it can take days, even weeks to trace the use of a title over time. Blockchain can be used to facilitate the storage and the validation of this data. In addition, in a real estate transaction, blockchain can be leveraged to secure the integrity of the customer or the buyer of an asset. Blockchain can also be used to create an audit trail for certain business processes or create proof of an event or a transaction.