A blockchain is a ledger of facts, replicated across several computers assembled in a peer-to-peer network. Facts can be anything from monetary transactions to content signature. Members of the network are anonymous individuals called nodes. All communication inside the network takes advantage of cryptography to securely identify the sender and the receiver. When a node wants to add a fact to the ledger, a consensus forms in the network to determine where this fact should appear in the ledger; this consensus is called a block.
Take for instance the double spend problem: Alice has 10, and she sends twice 10 to Bob and Charlie. Who will have the 10$ eventually? To answer this question, the best way is to order the facts. If two incompatible facts arrive in the network, the first one to be recorded wins.
In Bitcoin, the challenge involves a double SHA-256 hash of a string made of the pending facts, the identifier of the previous block, and a random string. A node wins if their hash contains at least n leading zeroes.1// a losing hash for Bitcoin2787308540121f4afd2ff5179898934291105772495275df35f00cc5e44db42dd3// a winning hash for Bitcoin if n=10400000000009f766c17c736169f79cb0c65dd6e07244e9468bc60cde9538b551eCopied!Number n is adjusted every once in a while to keep block duration fixed despite variations in the number of nodes. This number is called the difficulty. Other blockchain implementations use special hashing techniques that discourage the usage of GPUs (e.g. by requiring large memory transfers).
Imagine that you want to rent your house for a week and 1,000, with a 50% upfront payment. You and the loaner sign a contract, probably written by a lawyer. You also need a bank to receive the payment. At the beginning of the week, you ask for a5,000 deposit; the loaner writes a check for it. At the end of the week, the loaner refuses to pay the remaining 50%. You also realize that they broke a window, and that the deposit check refers to an empty account. You'll need a lawyer to help you enforce the rental contract in a court.Smart contracts in a blockchain allow you to get rid of the bank, the lawyer, and the court. Just write a program that defines how much money should be transferred in response to certain conditions:
two weeks before beginning of rental: transfer $500 from loaner to owner cancellation by the owner: transfer $500 from owner to loaner end of the rental period: transfer $500 from loaner to owner proof of physical degradation after the rental period: transfer $5,000 from loaner to ownerUpload this smart contract to the blockchain, and you're all set. At the time defined in the contract, the money transfers will occur. And if the owner can bring a predefined proof of physical degradation, they get the $5,000 automatically (without any need for a deposit).
«The Blockchain is the most disruptive technology I have ever seen.» Salim Ismail«The most interesting intellectual development on the Internet in the last five years.» Julian Assange«I think the fact that within the Bitcoin universe an algorithm replaces the functions of [the government] ... is actually pretty cool.» Al Gore