Based on the course Introduction to blockchain Technologies by Insead and Don Tapscott / Alex Tapscott on Coursera

Principle 1 : Networked integrity

Honesty, consideration, accountability, transparency are coded into the blockchain.

Integrity is distributed among nodes, not vested in a single member.

Double-spend problem. cannot send the same dollar to 2 people. This problem has been orignally solved by clearing this transaction by a third party (bank..). Blockchain breaks that. It uses a distributed peer to peer network and cryptography to adress the double spend problem.

It timestamps the first transaction where the owner spends a coin and then blocks any additional spending. Miners add it to the chain in a block, this block is linked to the previous one. When the network reaches consensus it writes the next block, proof of work.

Hash : unique fingerprint for a file.

The puzzle used for proof of work is complicated to solve, the one who solves it gets the coins as a reward. A block takes about 10 minutes to be solved.

Ethereum wants to change this to proof of stake (having a stake in the game, a minum number of ethereums to be part of the process).

Ripple uses social network for consensus.

On the Internet, most of the information is malleable and fleeting. The exact date and time of its publication isn’t critical to pas our future. On the blockchain timestamp is key, it’s a stamp, the blockchain has to be preserved for its own sake.

For the blockchain to make decisions, they need to come to a consensus using “consensus mechanism”.

Consensus is a dynamic way of reaching agreement in a group. While voting just settles for a majority rule without any thought for the feelings and well-being of the minority, a consensus on the other hand makes sure that an agreement is reached which could benefit the entire group as a whole.

Which consensus mechanisms should be used for an entity like blockchain?

Before bitcoin, there were loads of iterations of peer-to-peer decentralized currency systems which failed because they were unable to answer the biggest problem when it came to reaching a consensus. This problem is called “Byzantine Generals Problem”.

Ok so imagine that there is a group of Byzantine generals and they want to attack a city. They are facing two very distinct problems:

  • The generals and their armies are very far apart so centralized authority is impossible, which makes coordinated attack very tough.
  • The city has a huge army and the only way that they can win is if they all attack at once

In order to make successful coordination the armies on the left of the castle send a messenger to the armies on the right of the castle with a message that says “ATTACK WEDNESDAY.” However, suppose the armies on the right are not prepared for the attack and say, “NO. ATTACK FRIDAY” and send back the messenger through the city back to the armies on the left.

This is where we face a problem.

A number of things can happen to the poor messenger. He could get captured, compromised, killed and replaced with another messenger by the city. This would lead to the armies getting tampered information which may result in an uncoordinated attack and defeat.

#1 Proof of work

if we are to summarize how Proof Of Work Protocol works with the blockchain.

  • The miners solve cryptographic puzzles to “mine” a block in order to add to the blockchain.
  • This process requires immense amount of energy and computational usage. The puzzles have been designed in a way which makes it hard and taxing on the system.
  • When a miner solves the puzzle, they present their block to the network for verification.
  • Verifying whether the block belongs to the chain or not is an extremely simple process.

This raises problems :

  • First and foremost, proof of work is an extremely inefficient process because of the sheer amount of power and energy that it eats up.
  • People and organizations that can afford faster and more powerful ASICs usually have better chance of mining than the others.
  • As a result of this, bitcoin isn’t as decentralized as it wants to be : 65% of the hashrate is divided among 5 mining pools alone!

#2 Proof Of Stake

Ethereum plans to move to this protocol of validation. Proof of stake will make the entire mining process virtual and replace miners with validators.

This is how the process will work:

  • The validators will have to lock up some of their coins as stake.
  • After that, they will start validating the blocks. Meaning, when they discover a block which they think can be added to the chain, they will validate it by placing a bet on it.
  • If the block gets appended, then the validators will get a reward proportionate to their bets.

The problem with proof of stake is “the nothing at stake” problem.

If you are a validator, then you can simply put your money in both the red chain and blue chain (valid + hard fork) without any fear of repercussion at all. No matter what happens, you will always win and have nothing to lose, despite how malicious your actions maybe.

Ethereum will use the Casper protocol to adress this issue :

Casper has implemented a process by which they can punish all malicious elements. This is how POS under Casper would work:

  • The validators stake a portion of their Ethers as stake.
  • After that, they will start validating the blocks. Meaning, when they discover a block which they think can be added to the chain, they will validate it by placing a bet on it.
  • If the block gets appended, then the validators will get a reward proportionate to their bets.
  • However, if a validator acts in a malicious manner and tries to do a “nothing at stake”, they will immediately be reprimanded and all of their stake is going to get slashed.

Anyone who acts in a malicious/Byzantine manner will get immediately punished by having their stake slashed off. This is where it differs from most other POS protocols. Malicious elements have something to lose so it is impossible for there to be nothing at stake.

There are also :

  • Delegated Proof Of Stake (EOS)
  • Transaction As Proof Of Stake (EOS)

Delegated Byzantine Fault Tolerance (dBFT) (NEO)

The citizens are whoever owns NEO tokens aka ordinary nodes.

Delegates are the bookkeeping nodes. In order to be a bookkeeping node you need to satisfy a certain amount of qualifications: having special equipment, dedicated internet connections and a certain amount of GAS (1000 according to basiccrypto’s article).

  • The “demands of the citizens” are basically the various transactions made by the token holders.
  • The “law” is the current block that is to be added to the blockchain.
  • The “happiness factor” is the hash of the current block.

Now, there are two cases where the one of the participants may act in a malicious manner. Let’s check it out:

Case 1 : Speaker is malicious

2/3 delegates will not validate the transaction, consensus won’t be reached

Case 2 : One of the delegates is malicious

since 2 out of the 3 delegates are non-malicious, they will approve the law which will then be passed since a 66% consensus has been reached.

Conclusion:Blockchain Consensus

Without consensus mechanisms we wouldn’t have a Byzantine Fault Tolerant decentralized peer-to-peer system.

It is as simple as that. While, proof of work and proof of stake are definitely the more popular choices, there are newer mechanisms coming up every now and then. There is no “perfect” consensus mechanism, and chances are that there never will be, but it is interesting to see these newer cryptocurrencies coming out with their own protocols.

Principle 2 : Distributed Power

The power is distributed to all the people on the chain. Mass collaboration. Distributing computing power permits distributed human power.

Principle 3 : Value as Incentive

People get rewarded for working on the Chain. By acting in their own self interest miners serve the peer to peer network.

The bitcoin blockchain also preserves its value by programming its monetary policy into the software.

It resists inflation, there is a capped supply of bitcoins at 21 million. Each bitcoin is divisible way more than Fiat cash. enabling micro payments, great for the internet of things.

There is financial incentive to collaborate on the blockchain.

What are incentives?

An incentive is any design element of a system that influences the behavior of system participants by changing the relative costs and benefits of choices those participants may make.

 We think it imperative that experts in actual human economic behavior, such as public policy experts, behavioral economists and social scientists, be included in the teams designing cryptoeconomic systems, in order to ensure their long-term utility, viability and success.

Nakamoto’s design incentivizes miners to secure the network and disincentivizes defection from the protocol’s proper operations. Nakamoto found a clever game-theoretic solution to the classic Byzantine Generals’ Problem, by paying the generals a salary as long as they act honestly, but garnishing that salary if they are caught trying to cheat.

The blockchain community understands that blockchains can help align incentives among a tribe of token holders. Each token holder hasskin in the game. But the benefit is actually more general than simply aligning incentives: you can design incentives of your choosing, by giving them block rewards. Put another way: you can get people to do stuff, by rewarding them with tokens. Blockchains are incentive machines.

In summary: good incentive systems are notoriously difficult to create under the best of circumstances. Under Blockchain systems — where code is law, etched in stone, and deployed to a wide community of pseudonymous stakeholders — good incentive systems are all the harder to get right

Principle 4 : Security

Data breaches have cost at least 1.5 billion dollars over the last two years.

With blockchain we can do transactions of value and we can protect our data.

Public key cryptography. The basics are : You have a secret key that encodes some information. You transfer the encoded informationt to somebody. And they can decode it. (a bit like caeser cypher).

But in Caesar cypher both the receiver and sender know the key in order to encode and decode the encrypter message.

The way to solve it is assymetric system. Basically you have two keys.

You encrypt the message with key A and then you decrypt with key B. Those both keys are not related but you need both. One of those keys is public, it is the public key. It is everywhere no problem. The private key, you need it to be secret. So both receiver and sender have 2 keys each.

The idea of encrypting something twices is : first you encrypt with the other person’s public key so only they can decrypt the message, and then with your own private key, so they know that you were legitimately the sender because they know your public key and your message encrypted with you private key can only be decoded with the public key. Hop you guarantee the origin of the message and you guarantee that only the receiver can decrypt it with his private key.

SHA :  Secure Hashing Algorithm

A hash function takes a string, and turns it into another fix string, it is sudo random, the result looks completely random. If you change a letter in the first string it completely changes the resulting hash. but if you put the same string again, the same hash code is generated.

SHA-1 was developed and released by the NSA. Takes a string and puts out a 160 bits hash. Compression function with 512 bit blocks, if not 512 bits provided then we pad the messages and we add bits

Repeated update of the internal state with the compression function.

What makes bitcoin blockchain tamperproof :

What makes this system theoretically tamperproof is two things: a cryptographic fingerprint unique to each block, and a “consensus protocol,” the process by which the nodes in the network agree on a shared history.

The consensus protocol of bitcoin :

The fingerprint, called a hash, takes a lot of computing time and energy to generate initially. It thus serves as proof that the miner who added the block to the blockchain did the computational work to earn a bitcoin reward (for this reason, Bitcoin is said to use a “proof-of-work” protocol). It also serves as a kind of seal, since altering the block would require generating a new hash. Verifying whether or not the hash matches its block, however, is easy, and once the nodes have done so they update their respective copies of the blockchain with the new block. This is the consensus protocol.

And finally :

The final security element is that the hashes also serve as the links in the blockchain: each block includes the previous block’s unique hash. So if you want to change an entry in the ledger retroactively, you have to calculate a new hash not only for the block it’s in but also for every subsequent block. And you have to do this faster than the other nodes can add new blocks to the chain. 

Bitcoin Q&A : Is quantum computing a threat ?

Problem is when quantum computing is not wide spread yet and only some people have it. What’s interesting is that the bitcoin algorithm will have to change eventually in this transition period and the first wallets that will be at risk are those of the lost keys and dead people as they will not be able to adapt. For the rest of the eco system there will be a possibility to migrate. The risk is overestimated (by Antonopoulos )

SHA-256 and digital signature algorithm used in bitcoin, the second one will be probably the first algorithm at risk from quantum computing. When you spend you put on the blockchain a signature and a public key. the signature is potentially at risk. For satoshi, there were never a spending on his wallet so no signature.

Best practice is to use only one time an address to avoid any risk. To not leave a wallet with signature available and funds on it. to move funds that are on an adress without any spending you have to break both algorithms. Which seems difficult.

Principle 5 : Privacy

Eliminated the need to trust the others, and as a consequence did eliminate the need to know the other people.

In today’s world your virtual you knows probably more about you than you do. the problem is that you don’t own the virtual you, big corporation do. The entities collect and use our data without our knowledge and they do not protect them in a satisfactory matter.

SWIFT does not ask for identification neither at the moment. but there is pressure for AML and KYC so there is still a lack of privacy there.

In the transactions on the blockchain there is reference to the people identity. Guarantees privacy.

Millions of adresses and personal data is stolen at the moment everytime a database is breached (ebay, JP morgan, Telecom companies, Universities..)

Blockchain provides defense towards this data problems. We lay crumbs and data trails everyday, that corporations are collecting and using.

Principal 6 : Rights Preserved

In the migration of existing laws into online practices, legitimate rights got trampled. Rights to privacy and security but also free speach, reputation and equal participation.

To enforce rights, those rights must be clear. can be codified in smart contracts and put on a blockchain, it would be transparent and reached by consensus.

How can the blockchain help in the music industry ?

  • Blockchains can host “smart contracts” to help artists manage digital rights and allocate revenue shares to contributors to the creative proces
  • One of the biggest appeals of blockchain is its public nature. All of the transactions for a creative work could be seen and validated, including who accessed the work and how much revenue the work is generating at any point in time.
  • Creative content can be mispriced. By tracking the demand for creative content, pricing could be more dynamic
  • Using blockchain, snippets of creative works could be made available for a price, for example, a few seconds of a song for use in a movie trailer.
  • Blockchain can help link reputations to specific “addresses” on the blockchain, thus allowing both producers and consumers of creative content to verify one another

Principle 7: Inclusion

Lowering the barrier to participate in the economy. Most of the world is excluded from the financial markets and from internet. 2 billion people without bank accounts. People at the bottom of the chain still cannot afford minimum account balances or the transaction fees for micropayments.

As well the center bodies can freeze the bank accounts in case of crisis like it was done in Cyprus. The rich have means to work around this but the poor have no options and are at the mercy of the central powers, their money can be taken and can be devaluated (like in germany after the second world war, cf shortest history of Germany).

To keep the blockchain inclusive, it needs to be accessible at lower bandwitch speed.

Internet benefited many but not everyone, for some the quality of life has actually decreased, namely the middle classes and the poors.