Thursday, August 10, 2017

Chain Death Spiral - A Fatal Bitcoin Vulnerability

Back in Bitcoin history, when Argentinian millionaire Wences Caseres ( Xapo, Paypal) came across Bitcoin he saw it as a potential solution to the periodic financial turmoil that totally wipes off the wealth of hard working Argentinians. In what I consider a very prudent act of due diligence, he paid a couple of hackers a sizable amount of money to hack and break the fledgling Bitcoin. Their conclusion was that it was unbreakable and that has remained true until today. The Bitcoin protocol has never been hacked. The vulnerabilities were the trusted infrastructure around it like the exchanges. The most memorable being MT Gox.

However on the 1st August 2017, Bitcoin main chain forked and a new coin Bitcoin Cash (BCH) came into existence. Some argue that it is closer to Satoshi's vision than the current Bitcoin (BTC) which separate the data portion from the address portion of the data structure. BTC became the main coin because it was supported by the majority of users, developers, Bitcoin businesses and miners in what is now knows as the New York Agreement.

Chain Death Spiral. (CDS)
After Bitcoin fork on 1 August it became obvious that Bitcoin the protocol did have an inherent vulnerability. This was that if the chain loses mining power it will have to wait a full 2016 blocks before the difficulty can be adjusted to bring the block time back to the normal 10 minutes. This vulnerability was never considered or analysed because until now the miners had no choice but to keep mining on the Bitcoin chain. After the fork however, the whole landscape has changed. Miners have a choice and power to influence the fate of the chain they are mining on.

This was brought clearly into focus when the blocktime of the BCH fork went as high as 15 hours per block in the beginning. BCH however was designed with Emergency Difficulty Adjustment (EDA) which adjusted the difficulty even before the 2016 block adjustment period is up. Bitcoin (BTC) does not have this safety feature and cannot have one unless a hardfork is performed to include it.

A Chain Death Spiral occurs when the block time increases leading to some miners switching chain. As more miners leave the problem gets worse and a feedback loop results in the dreaded Chain Death Spiral.


Bitcoin (BTC) mempool been increasing since after the fork on 1st August. It is currently 52MB which means it will take 52 blocks to clear without any additional transactions. The record was in May 2017 when it reached 120MB. The whole community was in an uproar resulting in a move towards other competing coins for transacting.


Looking at the hashrate distribution and starting from the 6th August we get the following


    (Peta Hash)         BTC         BCH       TOTAL  (Block Time)  BTC       BCH

6 August 2017        7473         143            7617                           8.13         110
7 August 2017        6023         499            6612                         10.28           22.15
8 August 2017        6637         551            7188                           9.41           18.46                    
9 August 2017        6835         154            6989                           8.78           62
10 August 2017      6200         541            6741                          10.43          15


A picture is forming. Between 8 to 10 August roughly 400 petahashes moved out of BCH which triggered the EDA adjustments then move back in. In addition there was a loss of 200 Peta Hashes on the 9th August and a further 200 Peta Hashes loss on the 10th August.

The current BTC mempool is 50MB and blocktime is 10.28 minutes. There is clearly a development and it will get clearer today. Will the 400 Peta Hashes leave BCH again or will the hashing power on BTC decrease further. What happened to the 400 Peta Hashes missing since 8th August. The BTC chain cannot afford further loss of hashing power. Its' blocktime must come back to within 10 minutes and soon.

What is certain is that the current price of BTC is not justified with this inherent vulnerability, risk of the dreaded Chain Death Spiral. Have investors totally abandoned any thought of immutable economic security and due diligence? It is incredible how we lose sight of the risks when we bamboozled with riches, hype and misinformation through censorship.

It is other peoples' hard earned money and other peoples' investments. Even the possibility that this "black swan event" can happen must be addressed. It should never be censored speech.

Related Articles

BTC is Dead - Long Live BTC - Here

BTC is Dead - Long Live BTC Updated and Explained ELI5 - Here

Why is Bitcoin Price Rising - It May Not Be What You Think - Here

Bitcoin Fork - Smoke. Mirrors and a good game of Poker - Here

Bitcoin Cash Will regain the mantle to be Bitcoin - Here

Intelligent Comments
from coinsinspace via /r/Bitcoin sent 
It's a textbook black swan because majority dismisses it automatically as impossible, yet it's unlikely but possible, and it would be very likely fatal.
If bitcoin was the only viable sha256 coin that would be a much smaller danger. In that case the mining power would have to completely disappear for long. It's much more likely if miners can switch, especially if the other chain is more profitable.
Once that happens there are several factors all accelerating the problem:
(1) Mining rewards can only be spent after 100 blocks. Normally that's about 17 hours. If 90% of mining power disappeared that would take a week. So that's a strong incentive to mine something else (if available) in itself.
(2) Bitcoin economy grinds to a halt, as transactions become increasingly impossible. This leads many people with coins on exchanges to buy other coins just to be able to transact, which lowers the price, making the alternative chain even more attractive for miners.
Which means that, as miners leave, the higher incentive the remaining miners have to also leave. In the event that almost all miners leave the difficulty reset never happens as chain dies.

Monday, August 7, 2017

BTC Is Dead, Long Live BTC - Updated and Explained ELI5

I asked to be proven wrong but sadly nobody did. Blinded by the rise in price of both BTC and BCH nobody cared enough to look back to take stock. Let me explain as clearly as I can.

1) Mining Difficulty Adjustment.

Bitcoin mining recalculates and adjust the mining difficulty so that it produces a block every 10 minutes on average. This recalculation and adjustment is done after every 2016 blocks. Approximately every 13 days.


2) What happens if there is a sudden drop of hashing power?

Imagine that we have 10 computers contributing computing power to solve a problem every 10 minutes. If 1 of the computer fails then the problem will be solved every 11 minutes because there are only 9 computers working on the problem.

If there is a catastrophic failure such as 9 computers failing then it would take at least 100 minutes for the remaining computer to solve the problem. This was the situation when BCH forked, where it took from 12 to 15 hours in the beginning to find a block instead of the expected 10 minutes. Fortunately for BCH the developers knew of this problem and built in an Emergency Difficulty Adjustment (EDA) which adjusted the difficulty down by 20% if less than 6 blocks were found in the last 12 hours.

3) How does a loss in mining power affect the current situation?

Before the fork
Block times would get longer but after 2016 blocks the difficulty will adjust and block time will get back to the normal 10 minutes.  Miners will keep mining BTC because their equipment can only work on this coin. They will continue mining until their equipment is no longer profitable. They don't have a choice.

After the fork
The miners now have a choice. Should they be mining BTC or BCH and we can assume that they will make this profitability calculation and decision everyday. So the miners will be keeping an eye on the price, difficulty and transaction fees. At 3300 dollars for BTC and 300 dollars for BCH it is just about 55%  more profitable to mine BTC.  Mining profitability of BCH is getting close to BTC and can flip any time, especially with the enormous potential for BCH price to approach BTC.

If BCH is less profitable, why are any miners mining on that chain?

Well, for every chain there are miners who mine at a loss because they want to support the chain or they believe that the coins will be worth more in the future. These are the supporter miners and they exist on both chains.

Now what if there is a drop in mining power because some miners decide to switch chain for whatever reason or if there is a power failure ( hydro dam goes dry or fire at power plant taking it out for several months) that wipes off 10%  of mining power on that chain.

If it happens on the BCH chain, EDA will kick in and readjust the difficulty downwards by 20% to arrive at the targeted 10 minutes block time. In addition to EDA, BCH also allows up to 8MB blocks, which means that the transactions in the mempool can be cleared at the rate of 8MB per block if necessary.

If it happens on the BTC chain, there is no EDA built in, so block time will get longer than 10 minutes. How much longer depends on the amount of hashing power lost. It will have to complete the whole 2016 blocks cycle before the difficulty can be readjusted to bring the block time back to 10 minutes. Instead of 13 days to readjustment it could take much longer. If the block time gets to 20 minutes it could take about a month before the difficulty is readjusted. This increase in block time affects the mining profitability. At the same time the transactions in the mempool are backing up and users will be getting increasingly frustrated with long confirmation times and high fees because of competition to get into the next block, and only 1MB of the mempool can be cleared at a time. ( At time of writing BTC mempool is 45MB ) This decrease in the profitability of mining may cause miners to switch to mining on the BCH chain because they now have this option. As more miners leave the problem gets worse and this can result in the dreaded Chain Death Spiral.

That can never happen? Well if the price of BCH goes up by another 300 dollars it will become more profitable to mine and miners will switch. This is real and not hypothetical. 600 dollars for BCH is not an unreachable figure. After all it is closer in design to the original Bitcoin.

Transaction fees

     On the BTC chain, transaction fees gets higher as competition to get into the block intensifies. Miners are happy to earn this extra revenue but users are not. We can say that the BTC chain is elitist and only those who can afford the fees are welcome to use it. Those that can't or wont pay are encouraged to leave, and leave they will, perhaps for the BCH chain which is cheaper and faster.

On the BCH chain transaction fees are kept low because there is ample space in each block to accommodate all users. We can make an argument that if users don't have to pay a fee, they wont. However in reality the majority of users will pay and it appears that most people consider 5 cents to be a reasonable fee. Some are happy to pay more and some will pay less and in this way the BCH chain caters more for the masses. The rich don't mind subsidising their poorer cousins in India and Africa.

What about the lightning network where the users need only pay very small fees to use the network. Firstly the lightning network is not here yet. Secondly the miners don't get this fee and so will not be concern with the fees collected there.

Remember that more users means more value. This means that in the long run the BCH chain will gain users and grow value faster.

User Economics

Now we will switch to the investor point of view. A majority of users treat BTC and BCH as a store of value. Most are investing hoping that the value of their investment will increase over time.

Whether you can afford to invest 100 dollars or 1 million dollars it probably represents a significant part of your wealth and you want to invest it as wisely and as safely as you can.

So these are the questions you should ask

1) "Can miners leave the chain you want to invest on?" 
   
       The answer to both BTC and BCH is YES.

2) "What happens to the chain in question if miners leave?"
     
       The explanation is above. On the BCH chain nothing much. It will slow down awhile but will adjust and get back to normal. However on the BTC chain it is possible and not a non zero possibility, that the chain could come to a grinding halt and become unusable.

It is your hard earned money so the thought of it being subjected to loss, even if it is only a small chance, should sway you to the safer choice or not invest at all. If you are investing for your family and friends or your investors, the question of risk and safety becomes more acute as reputations and legal implications are involved.

3) What happens if you are already invested and you just found out about this existential risk?
   
        If it is your own money you could decide to accept the risk and remain invested. However if it is not your money then you have a legal duty of care. You have a fiduciary duty to make sure that the funds you are entrusted to look after are safe. You have been made aware of the risk, and even a small amount of known risk cannot be acceptable for you legally. If you are invested in BTC, you will be waking up everyday checking BCH prices, the mempool and difficulty and mining profitability, to see if any miners have or could possibly leave initiating the Chain Death Spiral.

If you are invested in BCH you have peace of mind because the dreaded Chain Death Spiral is not a possibility.

4) What would you do if you are heavily invested say hundreds of millions or billions and you decided that the risk is unacceptable and you need to get out?

If you had both BTC and BCH at the time of fork then your position is neutral.

If you have sold your BCH allocation or if you invested in BTC after the fork, it gets interesting. Because if you were to sell quickly you will crash the market. So you will need to do it slowly and at the same time keep the conditions as "normal" as possible until you exit completely. To do this you will have "manipulate" the market directly or through user forums, to keep the BTC price high and the BCH price low until you exit your positions.

Wonder why the BTC price is so high and bullish. It is not just because of demand and the selling of BCH to buy more BTC but those that did, now have a mission to keep BTC prices high with rosy predictions like 5000 and 25000 soon. They are now bias and invested in BTC price staying high. Be wary.

Conclusion

Do not be fooled. By now the people invested know what is happening. Before the fork it was hard to see. But now they can clearly see the implications and how events will unfold and play out. Some will see it before others. Some will take advantage of what they see to make a profit. Arm yourself with knowledge so as not to be caught at the wrong end of the stick.

There is a continuing competition for the services of miners to secure their chain. In this scenario the BTC chain always carries the possibility of going into a Chain Death Spiral. The BTC chain is doomed because it does not have the protection of EDA and the problem is magnified by the 1MB limitation. It is only a matter of When and not If.

How do you know if I am not favoring one side against the other?

I am telling it like it is. I am not comparing the technical merits of each technology or the capabilities of their developers. If the chain fails these merits do not matter one iota. The fact is one side, BCH has immunity against loss of hashing power. The other chain does not, When the "disease" hits, the chain without the immunity will get "sick" and can even die. When it does the chain that survives, BCH becomes the new "Bitcoin". This is the reality.

So why can't the developers of the BTC chain program in EDA or something similar?

It is a hard fork! And therefore not really in their control. It took nearly 4 years to get BCH to hard fork to bigger blocks and only really made possible because a soft fork UASF threaten to split the chain. The miners promised to support and not to attack the new BCH chain as insurance and security against UASF to which they were oppose. It is actually an unexpected bonus that the BCH chain has immunity against the dreaded Chain Death Spiral, and only because that protection was built in from the outset out of necessity.

If you are wondering why this was not a problem for ETH and ETC, it is because unlike Bitcoin, their mining difficulty is calculated and adjusted after every block.

Link to the previous article BTC is Dead, Long Live BTC



BTC is dead - Long live BTC.

On August 1 2017, after years of acrimonious and bitter infighting, Bitcoin Cash (BCH) was forked off of the original Bitcoin blockchain. It took quite a while to find the first block and a long time after for the second block. The reason for this was because of the low hashing (mining) power on the BCH blockchain. The BCH fork had to operate at the same mining difficulty as the main chain, at the time of the split, but with only a fraction of the hashing power. By design, the BCH fork had an Emergency Difficulty Adjustment (EDA) built in, because the developers had anticipated the reduced hashing power. EDA adjusted the mining difficulty on the BCH chain by a factor of 20% if less than 6 blocks were found in a period of 12 hours. This worked perfectly and as at time of writing the difficulty was reduced to about 17% of the main chain. Thanks to the new 8MB limit the next block promptly cleared out the whole mempool. The largest block found was about 4.6 MB. ( Clear That Mempool )

In his article ( Traders guide to Bitcoin Cash and Bitcoin Segwit ) Stein Ludvigsen pointed out that the BTC chain without the emergency difficulty adjustment is particularly vulnerable to slow block times from loss of hashing power. The BTC chain will have no protection against miner defections and will have to wait out the full 2016 blocks before the next difficulty adjustment. Depending on the block time this could stretch out months instead of the expected 13 days.

In his article ( Cashing out of Bitcoin ) John Milibit postulated that if the BTC chain were to lose mining power to the BCH chain, blocks on the BTC chain would get increasingly hard to find, block times would get longer, the BTC chain would get into a Chain Death Spiral and could come to a grinding halt. Furthermore, blocks found on the BTC chain can only clear the mempool at 1MB per block. This at a time when the mempool will be increasing because of all the transactions wanting urgently to get into the next block pushing fees sky high. The BTC chain will become unusable.

The Awful Truth
This now exposes the awful truth about the BTC chain which have been missed. With the BCH chain alive and well, the BTC chain is now totally dependent on miners' goodwill to continue mining, or the Chain Death Spiral will come into effect. Note the emphasis on dependent on miners' goodwill and less on mining economics. There is now another option for miners. They could leave because the BCH chain becomes more profitable to mine or for any other reason, and there are consequences for the BCT chain from their decision. Prior to the fork they could not leave. Now they have to be begged and persuaded to stay. For a rational investor, even the possibility that such a risk exist, makes the system untenable and unusable. We now realise, how important a role, the miners play. Their contribution should have been appreciated and they should have been listen to and given the respect they deserved. Not vilified and demonised. Who would have known?

What happens now?
The short of it is that no person or economic entity can accept or tolerate risks not within their control. They cannot place their financial well being at the goodwill and mercy of others. The Bitcoin system depends on pure greed and capitalism to function. Socialism, Communism, Dictatorship, Appeal to authority or Miners goodwill cannot work. BTC IS DEAD. LONG LIVE BTC.

Only a gentlemen cartel among investors, users and miners for a BTC hardfork to include EDA can save the current BTC chain. However cartels do not work in real life as the economic advantages to be the first to leave is too strong. In this Game Of Forks there is room for only one fork and BTC lost.

If you have not sold your BCH you will not be affected as BCH will become the new BTC. For the rest there are winners and losers. BTC will have no value. The war is ended, but not in any way we wished or planned. We must all now be magnanimous and humble as we pick up the pieces.

I HOPE I AM WRONG. PROVE ME WRONG. PLEASE.

If I am right, we should stop trading on all exchanges, to protect the innocent, for the good of the Bitcoin community.

Monday, July 24, 2017

Is Craig Wright Satoshi and Does It Matter ?

* This post was written before the fork and needs to be updated. I wrote it because I was worried that many Bitcoin owners who will be getting their BCH tokens have been advised in the main forums to ditch them for BTC as soon as possible in order to tank the price of the new token. I felt that this was wrong. At the very least the public should have been advised to do nothing and wait for events to play out. Acting on the wrong advice will lead to losses.

Does it matter if CSW is Satoshi - NO DEFINITELY NOT . Does it matter if you believe CSW is Satoshi - YES. Under normal circumstances no, but these are not normal circumstances. We are getting a hard fork on 1 August. This means we will all have BCC and BTC in our wallet. You have a choice Sell one or the other or keep both. Where you end up depends on what you believe in. I believe that the BCC fork will survive and in the end will surpass the BTC chain.

1) CSW supports the BCC chain.
He is nChain and they are introducing split chain and new op codes for Turing completeness
2) Replay protection on BCC chain

These people are serious and responsible, plus the system they use makes it fraud proof and opens the way for sharding.

These are enormous improvement to the Bitcoin protocol. Turing completeness was the whole reason for Ethereum's inception.

3) Sharding is the holy grail for Ethereum and they have not succeeded. Basically sharing the processing load on different computers. BCC adopts Bip143 style signature, which solves malleability and makes the system fraud proof, which is necessary for sharding.
All these developments are on BCC and not BTC. Can they not be adopted? Sure they can, but Core have proven so far that they don't look outside their sphere. Plus they absolutely hate the big blockers.

4) What happens after the fork?
The first thing is that BCC has bigger blocks while BTC will have 1MB for at least 3 months. So it will be cheaper to transact on BCC. This I believe is the biggest organic push by users to BCC and the miners and developers must follow the users. Also the people on the BTC side of the chain will always be arguing if the 2mb hard fork will be activated while te people on BCC will get on with business. You win by what you do not what you say.

Will BCC chain survive? What if it has low hash rate behind it? It will survive because the community sees the benefit of having a second option in case the first option fails. Means the big miners will not attack the BCC chain. And there will be a second chain because the people behind it are willing to mine the chain even though it is less profitable to do so.

So it is important on which chain you want to be on. You can sit and do nothing and all will be well but what if you want to spend some BTC? Are you going to spend your BCC or BTC? If you want to take a position, taking the wrong position means you will lose your money. So it is important if you believe CSW is Satoshi or not. Long term (6 months) both chain cannot survive one will wither and become an Alt.

Why I believe CSW is Satoshi
It really does not matter if he is or is not, except to satisfy one's curiosity. But look at it this way. What does it take to be Satoshi? He must have very good grasp of programming, cryptography, game theory, Maths, Economics and Philosophy. Is Satoshi one person or a group. I argue that it is one person and he solve the Byzantine Generals problem, help by small group of people after the release of the software. You will also need to have a connection to these small group of people.

Solving the Byzantine General problem is what scientist call a hard problem. It is not obvious and the solution is worthy of the Nobel prize. So why did he release it anonymously? I think because he knew that if it did not get traction and adoption it will die either from within or without. He was worried about Wikileak using bitcoin before Bitcoin was ready. Attracting attention to it will surely get it stomp on by the authorities, and open himself to criminal prosecutions. Every other person who engaged in digital money up to then have had legal and criminal problems to content with. Can you count how many people dismiss it outright at first glance only to rediscover and adopt it later when it refuses to die.

Lastly, this is a gift to humanity. It takes a special kind of person to do that. One must have "lived". Such a person will be a contradiction. A complex person. One where the Yin and Yang flares up easily.

Wednesday, June 14, 2017

Bitcoin and Crypto Currency - The Evolving Landscape

Do not take this post as Investment advise. At best it is how I see the Crypto space after delving in it everyday for the last 4 years. It is clear now that bitcoin would never go to zero more so as adoption increases worldwide and it becomes more mainstream. Investment is all about value and timing, and of us will have different risk appetite.

Today (15/6/2017) total market capitalisation of all crypto coins and tokens is 110 Billion USD. It is actually incredible that something that is purely a result of computer hashing has aquired this amount of value. Over time there will be jostling for relevance and position among all the coins and some will increase in value while others will trend to irrelevance. That said it is becoming clearer how the coin landscape will settle.

The rise of Ethereum, debut of Zcash and finally the resolution of Bitcoin governance will clear the fog. Underlying every coin is it's utility as a currency. Every coin can be used as a currency, as long as there are people out there who are will to accept it in exchange for goods and services. Which coin is used in the transaction will then come down to how well the coins are distributed and how easy it is to transact in that coin.

The main currency coins are Zcash, Bitcoin, Litecoin and Dogecoin. Ethereum is not designed as a currency but more as a smart contract platform. It currently sits on the second spot in market capitalisation, I am skeptical about Ethereum because is it always just one step away from calamity and disaster. After the DAO, I believe that it would be virtually impossible to recover from another hack, code or user error disaster. That it has found a new use in ICO use is commendable but I really do wonder how that much monetary value can be place on an insecure platform. Quite irresponsible maybe even fraudulent and certainly greedy.

Bitcoin is the first and most secure platform. No coin can even come close to Bitcoin's security. However it has a serious flaw, which is fungibility. Bitcoin is pseudonymous. If a bitcoin address can be link an owner, all transaction from that address and owner is open for view and analysis. For most transactions this is not a problem but in the competitive commercial and sovereign sphere this is not acceptable. Other coins such as Monero and Dash aim to fill this function but it will find difficulty in gaining adoption partly because of security but mainly because most of the coins are held in very few hands. Zcash in my opinion will win the title of being the fungible coin.

Bitcoin has a value today of $2600 USD. As the market capitalisation of crypto coins increases and becomes more mainstream this valuation becomes less relevant. Among crypto coins Bitcoin will be the unit of measure and as more people worldwide use crypto rather than fiat the Btc/USD pair will become meaningless as the USD is an inflationary currency and subject to arbitrary devaluations. Bitcoin will become the unit of measure because it is the most secure coin and no other coin can ever come even close to it. Proof of Work (POW) is the only security that matters. Proof of Stake (POS) is just a rich man's game.

Zcash will be used as the high value transnational coin used by large corporation and nations. If I am right it will achieve a value higher than Bitcoin ie x number of Btc. I see this scenario developing because Zcash is a coin designed with privacy and fungibility foremost in mind. More important is the fact that by the way this coin was introduced no one person holds a large stash. It is very widely and thinly distributed. Zcash is the Platinum to Bitcoin Gold.

Over time (4 years) Zero Electric Coin Company will be the largest holder of Zcash. By then I can envisage nations and corporations holding shares in this company. In the meantime Zcash is very easy to mine on CPU's and GPU's. This will guarantee widespread mining adoption and even further distribution of the coin.

Litecoin will prove itself as highly utilised as a development platform. Litecoin is the Silver to Bitcoin gold.

Dogecoin will be the coin for everyday use. It's value is the number of coins in circulation currently around 109 billion and increasing by 10 billion a year. It has a large number of users and adopters already in place starting as a joke and tip coin.  The younger generation will start with this coin and there are also many lite Dogecoin wallets available on smartphones. Dogecoin is the Copper to Bitcoin Gold.