All posts tagged “BitCoin

comment 1

The miners dilemma – Bitcoin sabotage can be profitable

black diceImagine a small village of a 100 people.

One day,  a sorcerer shows up,  and grants all the villagers magical 1000-sided dice, which are purely random and can only be thrown at a fixed rate of 1 throw per second (no faster & no slower).

Over the next year, at noon of every day, the sorcerer will announce a random number between 1 and 1000, and the first villager to throw that number on their magical dice will earn $100, just by raising than hands and announcing it to the wizard.

The villagers play along, and the since the dice are purely random, each villager can expect to win $100 every 100 days.

But if they pooled their dice together they could create interesting scenarios. For example, a group of 10 ‘pooled’ villagers, could expect to win once every 10 days, and the winnings of $100 could be equally divided between them. To these villagers $10 every 10 days is a better deal than $100 every 100 days.

Eventually the village ends up with 2 pools of 50 villagers each. The pools expect to win once every other day, and the winnings would be $2 dollars per villager. So effectively, they’re winning $2 every 2 days.

So far so good.

The Crooked Pool attacks

crooksHowever, one of these pools (called the crooked pool), starts to act all dick-dastardly. They send 25 of their members to infiltrate the other ‘honest’ pool. These infiltrators will roll their dice, but never claim announce their winnings to the sorcerer, even if they roll the magical number. Essentially these infiltrators become dead-weight on the honest pool, rolling dice choosing to never win. The remaining 25 members in the crooked pool will continue rolling and trying to win.

At first this seems illogical, why would a pool intentionally give up half it’s resources to sabotage another? How could discarding winnings actually benefit anyone? Does it even profit the crooks?

Yes it does:

  • The crooked pool now has 25 villagers rolling dice;
  • The honest pool has 75 villagers, but only 50 of them are effectively trying to win
  • Don’t forget, the crooked pool has 25 members in the honest pool, and hence is entitled to 1/3rd of their winnings.
  • Which means the original 50 villagers in the honest pool, only get 2/3rd of their winnings.
  • With only 75 villagers effectively throwing the dice, the crooked pool now has both it’s original 25 members and a 1/3rd share of the remaining 50.
  • The maths is only a ‘bit’ complicated, but the result is the crooked pool increases its chances of winning from 50% to 56%.

Amazing right?! Even though the 25 infiltrators are essentially wasting their throws, they can actually profit from the activity.

This isn’t just a thought experiment either, this is a problem known in bitcoin as the miners delimma, analogous to famous prisoner dilemma thought in game theory. Bitcoin mining works almost exactly like this scenario, it is a purely random function similar to dice throwing, whose odds of success can only be increased if you ramp up the hashing power, or in this case, adding villagers to a pool.

comments 2

WTF is a bitcoin?

WTF is BitCoin

WTF is a bitcoin? There’s much ado over the digital currency and many people struggle to understand what it is. In fact, even I haven’t fully grasped the fundamental nature of how it works–but then again I don’t know how the banking and fiat currency system work, yet I still use it.

In essence, there’s been a huge amount of really technical literature written about bitcoin, but most of it is long–really long, and unless you’re prepared to spend a few hours and some mind-numbing amount of effort to digest it, I took it upon myself to distil my knowledge of bitcoin so that you have at least a working knowledge of it.

So here’s bitcoin explained.

Don’t think of it as a currency

The first mistake people make is thinking of bitcoin as a currency, the analogy works but not so well. A piece of paper currency has a valued ascribed to it by a central bank. In Malaysia, Bank Negara controls and regulates the Ringgit–and it can restrict foreign outflow (just like we did in 1997) and we can print more ringgit to pay of debt (just like what the British did with the Pound). In essence the value of the ringgit isn’t ‘regulated’ by Bank Negara, it is controlled by Bank Negara, and they have a whole bunch of levers that they can push and pull to raise or lower the price of the Ringgit.

On the other hand we have precious commodities like Gold. Gold isn’t regulated by any one central government or bank. The value of Gold is purely a result of the supply and demand in the marketplace, and just like any other precious commodity, part of that value lies it is rarity. It’s rare, and mining it is complex business, so the supply of Gold into the market is controlled by natural consequences.

Gold is valueable because it has value–a currency is valuable because a government says so.

So the best way to think of bitcoin is to treat it as digital gold rather than digital currency.