Showing posts with label money. Show all posts
Showing posts with label money. Show all posts

Monday, October 3, 2016

Problems with big numbers in crypto - how Bitcoin dodged a bullet

Problems with big numbers in crypto - how Bitcoin dodged a bullet

Recently, the infamous OneCoin made news once more in the Bitcoin circles after their OneLife mastermind stream. One of the more interesting things mentioned was the previously announced blockchain reset, coin doubling and increase in coin generation speed. This is supposed to mean that OneCoin is getting more valuable, but once again, that's not how blockchain works - big numbers don't mean big money. But let's start from the beginning.

Bitcoin coin cap


As everyone knows by now, Bitcoin has a coin cap of around 21'000'000 coins. Each coin can be broken down into 100'000'000 satoshis, and that number can be further sub-divided in the future should the need arise. So for practical needs, Bitcoin has a final supply, and a nigh-infinite divisibility, as opposed to fiat currencies that are often nigh-infinite in supply, but finitely divisible.

The hidden genius of Bitcoin is very subtle when it comes to its coin cap and its precision that a lot of coin developers often miss entirely.

Sure, Bitcoin might not have a mathematically beautiful block reward (say, a power of 2 that halves every four years so that we can get a beautifully round number in the end), but it's still easy for programmers to work with. In financial computer science, precision is everything. A balance of $3.50 would not be represented in a database as a floating point number - those are imprecise. It would be an integer number, like 350 cents, or 35'000 hundredth of a cent if you need to get more precise. This makes sure that you can add, subtract and multiply those numbers all day long and you will always be right down to a penny.

Same goes for Bitcoin. Every transaction specifies exactly how many satoshis to transfer and to whom. The number is encoded in a 64 bit unsigned integer, meaning it can precisely express numbers between 0 and 2^64 (18'446'744'073'709'551'615). Even if you take all of the bitcoins that will ever exist and subdivide them into satoshis, you will get a number smaller than 2^51, meaning no matter how many coins you move back and forth, you will never lose precision or overflow the system. Moreover, the numbers can also be represented precisely with double-precision floating points (which has a precision of 2^52 for a fraction).

Other coins and their supply


Other coins have often toyed with different block reward schedules and thus different amount of coins.

Ripple is perhaps the most popular coin with a high coin supply, capping off at 100B XRP even. Their coins subdivide into 6 decimal places rather than 8 - this gives them an upper bound of under 2^57 units (if they instead went for 8 decimal places, they would be under 2^64 and wouldn't fit into signed integers). So they are fine in that regard, but they start to run into a problem when trying to express the units as floating points - they are only precise up to 2^52, or about 15 significant digits.

Same story with Dogecoin - currently sitting at 106B units with 8 decimal place precision, which is enough to start breaking the JSON API developers use. Bytecoin, sitting at 181B coins barely fits into 64 bit integers and FedoraCoin, the coin with the highest listed coin supply on CoinMarketCap breaks that limit with 438B coin supply, needing at least 66 bits to be fully represented.

OneCoin


So where does OneCoin sit in all of this? Lets assume they are like Bitcoin with 8 decimal places (and not just some made-up numbers in a spreadsheet...). They currently boast having 2B coins and mining 2.19B coins per month, giving us less than 2^58 - too big for doubles, but still manageable for ints. In about 85 months of mining, their coin supply will reach 185B and cross over 2^64. That is a long after they plan on "going public with their coin" in Q2 2018, whatever that would mean.

Conclusions


When designing a cryptocurrency, there are many hidden pitfals one has to keep in mind and try to avoid. One might be tempted to create a currency with large numbers to give off an illusion of value where there is none. However, for practical reasons, you want to keep the numbers in your system within a reasonable range so the developers working with your coin won't have to deal with numbers too big to represent.

OneCoin might still be in the clear, at least as clear as Dogecoin is, but one more "blockchain restart" coupled with increased mining speed and they will be soon crossing the computer science boundary, at least assuming the system is legitimate to begin with.

Next up - why big numbers don't mean big money...

Monday, December 22, 2014

The need for a new measurement of value

The need for a new measurement of value

As many of you might be familiar, there are a few key functions money needs to perform in our society. While the exact list may vary, here are some of the functions listed:

  1. Medium of exchange
  2. Measurement of value
  3. Standard of deferred payments
  4. Store of value

Today, I would like to talk to you about the measurement of value function of money in the context of the "Currency Wars".

Measurement of value


Money being used as the measurement of value (or a unit of account) means that we use the money units to denominate how much other things are worth. It is useful to have this standard reference because then we can compare things that would be otherwise hard to compare. While it might be easy to estimate that a loaf of bread is worth about a few buns, since they both fulfil a similar role and are essentially interchangeable, it is much harder to compare how many loafs of bread would be equivalent to a book in a pure barter system.

With money, everything is compared to the same unit of money, be it dollars, euros, bitcoin or otherwise. As such, everything has its own price and all of the prices are easily comparable, making everyone's life that much easier.

Currency wars


The topic of currency wars is rather big, and I don't think this post will do it justice. I recommend the book "Currency Wars" by James Rickards to learn more about this subject.

The short of it is, that a currency war, also known as competitive devaluation, is a competition between countries to achieve a relatively low exchange rate for one's own currency in comparison to everyone else. While at first it may sounds like a silly idea, after all, the stronger your currency is the more you can buy after all, it does make sense when you think about the state of your domestic industry.

If one's currency is going up in value relative to everyone else's, you will have more imports (you can buy more), but less exports (your products will become more expensive for everyone else and thus less attractive). In order to stay competitive on the global market, you want to reduce the cost of producing your goods. You can either do that through a long process of technical innovation and so on, or you can go the fast route and make your currency worth less. Since your money will be worth less, the wages you have to pay your employees are smaller, the cost to run your company are smaller, and thus your product gets cheaper.

This can be quite insidious, as it essentially means cutting everyone's wage without their consent or knowledge. One dollar today is worth less than one dollar last year and so on. Here is some rough overview of how much $1 is worth as expressed in 1913 dollars:


New measurement of value


As the money all over the world is fluctuating in value, its use as a measurement of value is a bit ridiculous once you think of it. You could compare it to trying to measure a height of a wave on a stormy sea in relation to other waves. We need a new form of measurement of value that would form a solid ground amidst the currency wars storm.

The reasoning as why we would want something like this is simple - for a lot of people, they would want to be earning the same value performing their jobs and pay the same value for their goods and services, no matter how much their local currency is fluctuating. This would allow them to detach themselves from the monetary policy of their countries that are doing their best to run it to the ground. Having an absolute measurement of value would promote real growth and innovation in becoming more and more competitive, rather than fake growth brought about through inflation.

As for what this measurement would be, this might be a bit complicated. If it was a commodity like gold, everyone would start hoarding it and its value swings would affect the economy. It cannot be a national currency, since those are too easily printed and manipulated. It cannot be a currency like Bitcoin, since it can be too easily gamed through a cycle of hoarding to increase its value and releasing to flood the market. I doubt there is anything that could be used as money in traditional sense that could be used for this purpose.

At the same time, none of this matters if we don't make it a currency. If instead, we take the VALUE of anything, be it $1 today, 100 years ago, 1BTC from January 1st 2015, or some handful of magical beans, and use that VALUE as a new standard for measurement of value of everything else, it would become like a metre stick (of for folds on imperial system, a yard stick) for the economic world. A metre is not a measurement of anything in particular, it's not a metre rod of iron, or a metre of water, it's a metre no matter what it's measuring. Similarly, our new Value Stick could be use to measure how much a dollar is worth and how much a euro is worth without actually being anything in particular.

So instead of seeing tags with dollar prices, we could see tags with Value prices, and an exchange rate of Value to dollars or any other currency, perhaps computed on the spot, like in BitTag:



Conclusions


In a world where countries go out of their way to change the value of their currency, we need a new standard for the measurement of value that is independent of any national currency, commodity or otherwise.

Tuesday, November 26, 2013

Peter Schiff and Bitcoin

Peter Schiff and Bitcoin

Recently, Peter Schiff has been in the Bitcoin news for a series of videos and talks involving him on the topic of Bitcoin. The ones I am familiar with are:

Bitcoin vs. Gold - http://www.youtube.com/watch?v=0L7SOPDOvvI

Ed & Ethan 86 Bountiful Baskets of Bitcoin Banter, Blather, and Bluster. - http://www.youtube.com/watch?v=IaBREg5rzlI

Bitcoin vs. Gold: The Future of Money - Peter Schiff Debates Stefan Molyneux - http://www.youtube.com/watch?v=mFcTJAQ7zc4

I would like to address a few points made through those videos and hopefully nip a few misconceptions in the bud.

Difference between gold and bitcoins

The "Bitcoin vs. Gold" video sums up Peter's view on the difference between gold and bitcoins rather neatly. In his view, gold is better since it has intrinsic value. In the second video, Erik Voorhees counters that argument stating that there is no such thing as an intrinsic value (since value in itself is an abstract concept), but we should be rather talking about the value of how useful an object is. I also heard an argument about having to distinguish "intrinsic value" of gold from its "historical value". Lets debate those points.

Intrinsic value

Intrinsic theory of value article on Wikipedia states talks about a value of an object contained in the item itself. We also get "Most such theories look to the process of producing an item, and the costs involved in that process, as a measure of the item's intrinsic value.". In this view, gold's intrinsic value is the cost to mine it, and with Bitcoin - also the cost to mine it. The value of gold being useful to various people will be debated below, as I wouldn't call it "intrinsic" into gold - it's subjective to a given person and not a property of the material itself like density or conductivity would be.

So the process of mining is similar between both Bitcoin and gold. Early people mining gold had it easier - they could come across big veins of the metal and mine it much easier than people nowadays have to. All the easy gold was mined out early, and the process is getting harder and harder. With Bitcoin, the early coins were easier to create, but with increased interest everyone has taken their digital shovels and started to compete against one another. There are differences between those processes - there isn't much chance gold mining would get easier any time soon (until asteroid mining becomes a thing), while it could get easier to mine bitcoins if the network would lose a lot of miners, but that is unlikely to happen.

So clearly, both Bitcoin and gold have intrinsic value as defined by the cost of creating them. Lets look at the historical value and the usefulness value.

Historical Value

Gold has been viewed as money and a desirable commodity for thousands of years. Bitcoin has been around for almost 5 years now. This obviously gives gold the status of a safer store of value over a long period of time, provided the trend holds. Similarly, Bitcoin has the same historical value advantage over other cryptocurrencies - it has been the first to be created, the most widely adopted and has a story behind it - mysterious crypto wizard driven by the ineptitude of banks creates a new currency to end the banks. All other things being equal, Bitcoin is superior to other cryptocurrencies in this way.

Usefulness value

Food has value since we need it to survive. Land has value since it is used to grow food. Steel has value since it can be used to make durable tools and so forth.

Gold is useful in electronics (good conductor), chemistry (doesn't easily react with a lot of things), jewellery (looks pretty). All of those properties add to its value. At the same time, the high value of gold detracts from its usefulness - as lovely as it would be to make full electronic circuits out of gold, it's not as cost-effective at the current price.

Bitcoin is useful in electronic transactions. It is cheap, fast and can't be taken down without taking down the Internet. Unlike gold, Bitcoin's usefulness does not diminish with it's value, but increases. If Bitcoin is worth less, then the maximum amount of money one can transfer is smaller, but if they are worth more, one can always divide them up even further (8 decimal places of precision). Barring the currently high default fees in the program (0.0001BTC per 1kB of transaction), Bitcoin is getting more useful all the time.

However, Bitcoin's usefulness relies on it having value. It is by definition a way of transferring value, so without it bitcoins would be useless. Bitcoin's value is kept strong by a few factors - it's scarcity, cost to create them (the "intrinsic value"), its wide adoption and so forth, but one can recognize that "if everyone wanted to cash out", bitcoins would become worthless, barring someone giving Bitcoin a "floor".

The story isn't much brighter for gold however. If "everyone decided to cash out", it's value might drop down to something comparable to perhaps copper - $7 per kg. That's not much compared to the current price of gold. One can say, that the usefulness value is what gives gold floor value, not current value. Those are quite different.

Fundamental property of money

In the second video as far as I remember, Peter was discussing the fundamental properties of money in the context of Bitcoin lacking one of them - not being backed by anything, nor having a value onto itself.

Some people claim money has 7 characteristics, others that it has 6. Lets look at them. They both agree that money should be:
  • durable - it can't change properties over time. This is why we don't use food and other perishables
  • divisible - one needs to be able to make smaller fractions of it. This is why we don't use art
  • portable / convenient to use - one needs to be able to carry it around and use it conveniently. This is why we don't use granite as money
  • fungible - different pieces of money should be worth the same, they should be interchangeable - one coin shouldn't be worth different amount than another coin of the same denomination. This is why we don't use real estate
  • limited in supply - money can only retain worth if there is a limited amount of it. If everyone can print money, it's not money
  • acceptability - everyone needs to accept it, otherwise trade is harder
The extra characteristic that is named by some is:
  • intrinsic value - money needs to have value unto itself
With the last one usually being used by people that maintain that only gold and silver is money since it possesses that characteristic.

Gold is durable, divisible, fungible, limited in supply and has intrinsic value. I am not sure how many people accept would accept it - probably some store clerks couldn't take it. Gold is portable in the real world, but fails in the digital world of today. If a company was to issue gold currency online, they would need to hold onto it for people to redeem it, not issue money without backing and hope not to get shut down by a government. Electronic version of gold would have the portability for online transactions, but its durability would suffer should the company be in a threat of being shut down.

Bitcoin is durable, divisible, portable, fungible, limited in supply and is gaining more and more acceptance by the day. Peter has asked for a list of merchants that accept Bitcoin, so here is a modest list of them, and a map of physical places that accept Bitcoin. I would certainly like to see one for gold (where one can spend gold, not buy it or sell it). As discussed before, bitcoins have intrinsic value of cost associated with creating them. They are not backed by a physical commodity like gold certificates would be if one is going by that definition of intrinsic value.

Bitcoin has at least 5 of the 6 characteristics of money, and is gaining the 6th, acceptance, by the day. If one is going by the 7 characteristics, it also depends on the definition of intrinsic value - it might or might not have it.

Gold by some standards can have 5-7 characteristics, depending whether one is dealing with transactions online or offline and the definition of acceptance.

Exchange fees

In the third video, Stefan brought up a few examples of large value transactions being transferred over Bitcoin for next to nothing. Peter countered that statement saying that it's not next to nothing - one would need to pay exchange fees to get bitcoins, and another exchange fee to get fiat back, and the buying and selling itself would move the price due to the big volume.

One can agree to the last part when it comes to transactions of more than a few million dollars worth. Currently looking at the market depth of one of the exchanges, a sale of $3M would drive the price down from the current drive up to 973 USD/BTC to 900 USD/BTC. A similar buy would drive the price up to 1013 USD/BTC. The daily volume of bitcoins traded on MtGox today is about $500M, on BitStamp - $480M, on BTC China it is about one and a half of that worth of CNY. One can say that bitcoin doesn't have the volume to handle such multi-million dollar purchases and sells, but at the same time the daily volume is big enough to handle that.

As for the exchange fees, while they certainly might not be zero (on BitStamp they are between 0.5% and 0.2%), they are still over an order of magnitude smaller than what Peter himself is charging (from the end of his video on CombiBar - 6.95%-7.85% over spot price). PayPal falls somewhere between that - 2-3%+$0.3. Bitcoin is still cheaper than the alternatives.

Bitcoin is a Ponzi Pyramid Scheme

Peter's biggest blunder came up during his talk with Ed and Ethan in the second video. First, he was very adamant about Bitcoin being a Ponzi Scheme. When faced with a clear definition of what it actually is and why Bitcoin is not a Ponzi Scheme, he quickly switched his statement to "Bitcoin is a Pyramid Scheme then".

Clearly, someone hasn't done their research into the subject and is just parroting whatever they heard. Peter, if you are proven wrong, don't jump from one accusation to another, be humble enough to at least say that you are not sure and you might look into that. Being uncertain about something is not a bad thing - we all learn and make mistakes, but claiming something for certain without proof or thought behind it shows that there is no use trying to have a debate with someone.

To put an end to such accusations - European Central Bank has looked into Bitcoin and whether it is a Ponzi or Pyramid Scheme in 2012. Their conclusion is "Moreover, the scheme does not promise high returns to anybody. Although some Bitcoin users may try to profit from exchange rate fluctuations, Bitcoins are not intended to be an investment vehicle, just  a medium of  exchange.". Later it also states that "[...] the current knowledge base does not make it easy to assess whether or not the Bitcoin system actually works like a pyramid or Ponzi scheme [...]". So the facts are that the ECB has looked into it, did not find indications that it is a Pyramid or Ponzi Scheme, but they are not completely certain since it is not easy to know for sure. Unless one has something new facts to bring to the table, there is no proof that Bitcoin is either of the two.

Cashing out

Around the same time Peter made the above accusations, he also brought up a point about the system collapsing when early adopters decide to cash out. A similar notion was stated by ECB - "[...] it can justifiably be stated that Bitcoin is a high-risk system for its users from a financial perspective, and that it could collapse if people try to get out of the system and are not able to do so because of its illiquidity.". Nobody is claiming otherwise. But think about the kind of people that are the early adopters of Bitcoin that can have a big amount of bitcoins.

First people that found out about Bitcoin were tech-savvy programmers that knew a lot abour cryptography. We have people like Hal Finney, Gavin Andresen or Dan Kaminsky. Being a programmer myself, I can try relating to how they are feeling about Bitcoin - an elegant solution using strong cryptography to solve a problem in a novel way. To gold bugs the Bitcoin system would be like a whole country issuing gold-backed currency. Sure, some people would want to cash in their gold stashes and live rich, but a big number of them would want to see it grow. A few early adopters might cash their bitcoins in, get rich quick while the price of Bitcoin would go down and possibly kill people's confidence in the system, but that would be destroying what Bitcoin can become.

I personally have faith in the early adopters of Bitcoin not to do that, but I understand people that have concerns. Then again, Bitcoin has survived two big bubbles and is stronger than ever. It might not be possible at this point to damage it permanently even with the price dropping a lot. But this is getting to the realms of psychology and speculation, so lets move on.

Gold-backed cryptocurrency would be superior

Another one of Peter's arguments is that a gold-backed cryptocurrency would be superior to Bitcoin. Well, there are ways to start issuing a currency like that even today, so if you're interested in running something like that Peter, let me know ;). At any rate, there is one big problem with a cryptocurrency like that.

It has to be centralized by definition.

Again, we have the example of Liberty Dollar. One company holds the precious metals and issues currency backed by it. That company has to have a physical location and is thus an easy target for a government seizure, theft and the like. Gold was made illegal in the US once already, it can happen again, ruining the value of such a currency overnight.

Sure, you can have many locations that would be issuing such currency, but that would essentially be multiple centralized currencies, each prone to default and corruption.

With a system like Bitcoin, nobody can seize your coins. Heck, I can hold millions of dollars in my head. Bitcoin can be made illegal in a country, but that won't make it impossible to spend the bitcoins somewhere else, or use them despite that.

Peter made an argument that a government could stop Bitcoin by spying on people. Not really. It is possible to operate Bitcoin over TOR or use node-to-node encryption, making the Bitcoin traffic unreadable. While people could try breaking into your computer and spying on you that way, that is a problem of privacy onto itself and should be addressed before you address the issue of using Bitcoin.

Other cryptocurrencies

Last argument of Peter's that I want to discuss is him stating that anyone can make another cryptocurrency like Bitcoin, and thus they aren't really scarce. Well, we already have more alt-coins than I care to count, and most of them get no traction. But lets discuss the issue anyway.

Bitcoins are scarce by definition. If your client enforces the protocol, there will never be more than 21M BTC. If someone changes that, you don't have to follow them, and most people will likely stick to the 21M limit present from the inception of Bitcoin. Gold can be mined from asteroids in the future, and currently it is possible to synthesize it if you have huge amounts of energy, so in theory Bitcoins are more strictly scarce than gold.

Bitcoin's protocol is changeable. It can be adjusted to address any issues one would have in the future. If the cryptography behind it gets weakened, it can be switched. If quantum computers become a reality, the algorithms can be switched. Until then, Bitconi's cryptography is secure "until computers are built from something other than matter and occupy something other than space.".

As such any Bitcoin copy does not have much advantage in the long run. There are notable technologies build on top of Bitcoin (Namecoin's distributed domain name service for example), but as for currencies themselves, Bitcoin has similar advantage as gold has to other metals - historical value, as described above. Bitcoin was the first, is more adopted and has been worth a lot more over the time than any other currency. The notion that Bitcoin can be easily replaced by another cryptocurrency like it is similar to gold being replaced by another metal. Sure, people with deep pockets could say that Ruthenium or XenCoin are the new "it", but it is unlikely to happen. Bitcoin is more prone to such change due to smaller market cap than gold, but as time goes on, there will be less doubts as to whether or not Bitcoin is here to stay.

Summary

To sum all up, Peter Schiff has all the right to be sceptic about Bitcoin and some of his arguments make sense, but at the same time others are false.
  • Both Bitcoin and gold have intrinsic value as defined by the cost to mine them
  • Gold has bigger historical value (thousands of years), but similarly Bitcoin has the strongest historical value of all cryptocurrencies
  • Both Gold and Bitcoin have usefulness value
    • Usefulness value only gives gold a floor value, not current value
    • Gold's usefulness value diminishes with price, Bitcoin's increases with price
  • Bitcoin with more and more adoption will be closer and closer to having all characteristics of money, gold is losing those characteristics with online transactions
  • Fees are lower in Bitcoin, but the market volatility and depth are not useful for really big transactions
  • Bitcoin is not a Pyramid or Ponzi Scheme
  • People cashing out can ruin the value of Bitcoin
  • Gold-based cryptocurrencies are centralized by nature and vulnerable to government seizure
  • Bitcoin is very likely to remain the top cryptocurrency due to its historical value, just like gold is likely to be the metal of choice for storing wealth