Showing posts with label Bitcoin. Show all posts
Showing posts with label Bitcoin. Show all posts

Tuesday, April 24, 2018

New Course: Surveying Blockchain Technologies for Enterprise

I’m happy to announce a 1 hour course surveying enterprise blockchain applications and software, now available on pluralsight. It’s paywalled, but you should be able to get a free trial to watch the whole course. 

I introduce just what blockchain is, and cover a broad array of applications (supply chain, healthcare, energy, finance, banking and insurance) and software packages (Hyperledger, Coco, Corda, Quorum, Stratumn, Guardtime and BigChainDb). The goal is to give a high level view of blockchain’s potential, but also a realistic view its challenges.

In the last few months, blockchain has been heralded as an invention on par with the internet itself, an invention that will revolutionize business and the world. On the other extreme, many say blockchains are just distributed databases, no different that the technology Google and Amazon have been running for decades (only slower!). My view is somewhere in between, and I searched long and hard to find tangible examples of its promise and challenges for this course.


Blockchain could bring vast efficiencies to supply chains by bringing an entirely new level of reliability and accessibility to data about a good’s journey. As goods move, each company logs a record using an irrefutable digital signature. That record is stored on not just one company’s server, but every company in the network, thereby making any fraudulent changes impossible to make. As more records from different companies, IoT sensors and inspectors are added, the record becomes more and more trustworthy.

What does that extra trustworthiness provide? Consider packaging on food at the grocery store that claims GMO free, fair trade, etc. How do you know that packaging is telling the truth? Compare that to a serialized record of every step of every ingredient in that package, all stored on a database watched by an entire ecosystem of competitors checking each other for fraud. 

This additional trustworthy data has the potential to remove countless expensive human checks and reconciliations. A store orders 10 apples, but only gets 9, who counted wrong? Perhaps the shipper’s digital signature and a 3rd party-inspected Smart Scale (IoT) at both ends of the journey can provide enough additional data that no phone calls need to be made--a credit is automatically applied, or insurance payment automatically sent. Not only is the reconciliation expense avoided, but an opportunities to automate across “trust barriers” are created (ie, the supplier and store).

Extra data could expose new opportunities and insights, as well. A farmer could post about a truckload of lettuce that will go bad if not sold quickly. A provider of screws could see that a recent uptick in demand is due to a temporary marketing campaign, and not a true increase in demand, thereby avoiding buying extra tooling (See “bullwhip” effect).


But blockchain does not deliver these promises on its own. Companies must agree on standards of data, what software to run, and who should have what access. It would be great for a producer to be able to prove their track record to banks to get a new loan, but that producer doesn’t want to share that same data with competitors.

It seems to be proving hard for companies to show benefits with small tests. Blockchain is not just a faster database that can be swapped in. It likely requires new business models and new ways to interact with other companies. Some of the benefits may only be apparent when a critical mass is achieved.

Regulation will certainly prove challenging, especially with the GDPR now taking effect. How can you delete data from an immutable database? If data is encrypted, perhaps throwing out the encryption key will be sufficient. A substantial amount of effort is going into ways to provide fine-grained, per-transaction level visibility.

On the other hand, it is hoped that blockchain can actually help on the regulatory front. Fredrik Voss, VP of Nasdaq blockchain, proposes giving regulators a node on a network to provide “regulatory goggles” that can have full visibility to the direct data. In this way, banks might avoid having to supply reams of reports that all then must be cross-checked by the regulators.


The blockchain behind Bitcoin shares everything to everyone, is extraordinarily slow, prohibitively expensive, and has no clear rules for how to upgrade its software.

Luckily many different organizations have already spent years creating blockchain software optimized for the enterprise world. I was expecting to create a list of pros and cons for each package surveyed, but I was surprised to find almost all of the software chasing similar goals: performance, nuanced privacy controls, and good governance (who can join, how software is updated). And even better, most of the software is modular and configurable. For instance, in Hyperledger, you can swap out different consensus algorithms, but still use the rest of the stack that handles the basic communication, membership rules, Smart Contracting systems, etc. 

The consensus algorithm is the core of a blockchain, the part that truly gives it shared and decentralized control over the data. It’s where the group agrees on and locks in the data. In a stock market, if 5 people all submit a buy request at once, which one should get the stock? The system needs to reach consensus on this.

The choice of consensus algorithm is vital because it generally has a major impact on performance. It takes a lot more communication and time for 1000 computers to agree on something than 5. Hyperledger actually comes with several different choices that let you make the best tradeoff for your application. For instance, 1000 community banks might all want to check every transaction, but companies in a stock trading platform might be willing to delegate some of that control for added performance. A stock trading platform might have 100 members, but only 5 of which are designated as “validators” among who consensus must be reached. 

I do want to point out one software package that I hadn’t yet researched when the course went live: Hashgraph. It promises a superior combination of decentralization and performance over any of the other algorithms I’m aware of. On the downside, it is very new, and patented. For companies already invested in Hyperledger, it looks like it could be plugged into the consensus layer.

Private Blockchains vs Public Networks & Tokens

At the end of the course, I provide some commentary on public vs private networks and digital currency. Many believe private blockchains are just slow distributed databases, and without a public network and digital currency, they offer nothing new to the world. I do think there is merit in a private blockchain run between 5 banks. No one bank would want to trust the others to control the keys to the castle, and I suspect the days it takes to send money between banks is at least partly due to a lack of trust. But any small network should think long about whether the expense and complication of blockchain is really necessary. Our existing legal system may be good enough to prevent fraud.

As the application grows, eg, global supply chains, the case for public networks seems stronger and stronger. Would I trust a record stored on a network of 5 big shipping company computers or the Ethereum network’s thousands of machines spread all over the world? Just as with IntrAnets of old, I suspect the better connectedness, openness and innovation of public networks will eventually outpace private blockchains.

And on tokens, many early enterprise blockchain software projects bragged about not having any cryptocurrencies. But tokens aren’t just about non-governmental money. They provide an important incentive layer to the networks, helping to pay for computation and network resources. They’re also an easily programmable and transferrable form of value. Besides, enterprises already use tokens, they’re just called points, stars and airline miles.

I hope the course provides a fast and balanced introduction to the rapidly evolving world of blockchains decentralized networks… (Hashgraph and other structures aren’t really blockchains, I suppose :) )

Saturday, September 6, 2014

The Essence of How Bitcoin Works (Non-technical)

A less-technical introduction to the main ideas behind how Bitcoin works, including how money is transferred, who keeps track of it, and how everything is secured. This is the written version of the following video:

If, instead of how it works, you're looking for where to buy Bitcoin, I use coinbase. And for trading, check out bitcoin wealth alliance (both affiliate links).

The goal of this video is to explain the essence of how Bitcoin works without any jargon or scary math. It is not, however, an introduction to what Bitcoin is or why it matters, for that, check out the great intro video at So, on to how it works!

Bitcoin lets people exchange money electronically as easily as sending an email or text. To send money, you use what’s called a “Wallet” app to type in an amount, enter or scan a recipient’s account number, and hit ”Send”. The recipient will then see the money pop up in their account. 

So how does it work? At a basic level Bitcoin is just a ledger with account numbers and balances. When Bob sends Carol 5 Bitcoins, his balance goes down by 5, and Carol’s goes up by 5. There’s no gold or government-issued money backing these numbers, just people’s belief that the numbers are worth something, and a system that prevents unfair changes.

Account Security

Part of this system makes sure that no one can spend money from someone else’s account.  Every time you hit “Send”, your Wallet app sends a message to the Bitcoin network describing how the ledger should change, including the sender’s and recipient’s account numbers and the amount to transfer. So what’s to prevent a thief from creating a message transferring money from someone else’s account?

Bitcoin requires a kind of signature on each message to prove that it was created by the true account owner. The signature serves the same purpose as a handwritten signature on a paper check, but it’s based on math rather than handwriting.

The math comes from the world of cryptography, which is normally used to hide secret messages, but in Bitcoin, has been re-purposed to prove ownership. Each Bitcoin account number has an associated key that only the true account owner knows, and is used to create signatures by encrypting transaction messages. Others test the signature by trying to decrypt it. If successful, they know the signature was created by the true account owner.

In addition to not relying on handwriting analysis, these math-based signatures also can’t be copied and reused on other transactions, since the signatures are unique to each transaction.

Maintaining the Ledger

So these signatures keep unauthorized transactions from changing the ledger, but who exactly is checking the signatures, and overall, maintaining the ledger? Surprisingly, anyone who wants to!

One of the main goals of Bitcoin is to provide a decentralized system, meaning no single company or government can control it. Every time someone sends money, a transaction message is passed around to all the people who want to help maintain the ledger, who I’ll call “maintainers.” Each maintainer keeps a personal copy of the ledger and updates it whenever they receive a new transaction with a valid signature.

With ledgers spread all over the world, traffic delays--and occasionally fraud--can lead to differences in those ledgers.  So how does the world decide which version to use?

Like in other democratic systems, there’s a vote, but it’s a bit different than a typical ballot system. Maintainers “vote” by trying to solve a special puzzle based on their version of the ledger. The first person to solve a puzzle announces their solution and everyone updates to that version. 
So the vote turns out to be a kind of mathematical race, but it’s designed to favor the majority’s version. This is because the more people there are working on a particular version, the faster it will be solved.

Because new transactions are constantly being generated, this voting process repeats over and over again so maintainers can continually agree about new transactions.

Voting in a Decentralized System

So why math problems instead of, say, emailing in votes to decide on a ledger? Without a central authority to register voters, it would be hard to enforce one vote per person--a single person could create multiple accounts to vote more than once, or even millions of times.  The math problems prevent this by making each vote have a cost in computers and electricity.  This means out-voting, or out-solving the majority to take over the ledger would effectively require out-spending the majority--an unlikely event.

So the math enables a fair vote in a decentralized system. Two more important details about how it does this:

To prevent someone from pre-solving a puzzle to win the race, each puzzle builds on previous answers, and the winner is not just the most recent solution, but the ledger version with the most total solutions.

The puzzles are also extraordinarily special in that there are no tricks to solving them faster, other than by buying more computers and electricity. It’s this property that underlies the entire system, and gives people assurance that solutions are truly from the majority, and not a clever attacker.

Creating Money

A final note about how money is created. Every time a puzzle is solved, a small award is added to the solver’s balance, effectively creating money “out of thin air.” This award acts as an incentive for people to help maintain the ledger, and is in addition to small fees senders attach to transactions. 

Because maintainers acquire newly created money through computation, they are typically called “miners,” but their main purpose is really to manage the ledger, not to create money.  The voting system simply provides a convenient way to randomly distribute money into the world, and in fact, after 2140 no more money will be created.


In summary, Bitcoin is an electronic currency that’s based on a collaboratively maintained ledger. People transfer money by sending messages to maintainers describing where and how much money should move.  Maintainers make sure that the messages are from the true account owners by checking digital signatures. And finally, the maintainers reach consensus with each other through a math-based voting process. 

I hope this gives you a quick sense for how Bitcoin works. If you’d like to dive deeper into the rabbit hole, check out my 22-minute video: How Bitcoin Works under the Hood.

Sunday, April 13, 2014

How Bitcoin Works in 5 Minutes

This is a shorter version of my original "How Bitcoin Works Under the Hood" 22 minute video, and it's also geared more towards non-programmers.


If, instead of how it works, you're looking for where to buy Bitcoin, I use coinbase. And for trading, check out bitcoin wealth alliance (both affiliate links).


At a very basic level, Bitcoin is just a digital file or ledger that contains names and balances, and people exchange money by changing this file. When Bob sells Carol a lawn mower for 5.2 Bitcoins, Bob’s balance goes up by 5.2, and Carol’s down by 5.2. There’s no gold or government issued money backing these numbers. Bob is only willing to trade his real-life lawn mower for a higher number in this digital file because he has faith that other people will also trust the system.

So who maintains this ledger and makes sure no one cheats? One goal of Bitcoin is to avoid any centralized control, so every participant maintains their own copy of the ledger. One surprising consequence of this is that everyone can see everyone else’s balances, although the real system only uses account numbers and not names, so there’s some level of anonymity.

If everyone maintains their own ledger, how are all the ledgers kept in sync as money is transferred? At a basic level, when you want to send money, you simply tell everyone else by broadcasting a message with your account number, the receiver’s, and the amount. Everyone across the entire world then updates their ledger.

As a quick aside,  I’m describing how Bitcoin works for power users--people who help maintain the system. You can also just use the system to send a receive money, however, without maintaining a ledger.

Account Security

If sending money is as simple as creating a message with some account numbers, what’s to stop a thief, Alice, from spending Bob’s money by using his account number?  Like a pen and paper check, Bitcoin requires a kind of signature to prove that the sender is the real owner of an account, but it’s based on math rather than handwriting.