A mellow introduction to how blockchain technology could serve the global coffee trade
Ann Ewan and Curtis Miles
Model your first blockchain network, fast!
With Hyperledger Composer, you can prototype a blockchain network your preferred way: online, locally, or in the cloud. See how to rapidly define and test your business network.
Blockchain is a secure way to exchange goods, services, and information among the participants in a network. Using a tangible example (global coffee trading), we'll explain the core concepts of blockchain: smart contracts that automatically execute business logic that the participants agree upon, and a shared, distributed ledger that helps guarantee the quality and lineage of goods or services. We'll also show you how blockchain enables collaboration and encourages new business models to emerge.
Everyone has read the articles saying blockchain is going to change the world, but those articles rarely explain exactly how that's going to happen. This article fills in some of those gaps and help you understand the fundamentals of blockchain.
All over the world, businesses and organizations are increasingly dependent on other businesses. They need trusted partnerships to be able to succeed, but every organization has its own stakeholders, objectives, and business targets. Blockchain offers a secure way to exchange goods, services, and information. It externalizes the necessary trust between the organizations involved and captures the executable rules by which organizations do business (known as smart contracts on the blockchain). In this way, no individual organization has the authority to change those rules unilaterally.
These externalized, trusted transactions enable new global networks and drive new business models. In any industry, the key points of friction or opportunity are ideal places to pilot blockchain technology. Blockchain technology can bring together new organizations that have previously found it difficult or impossible to collaborate without a trust mechanism.
Let's look at how global coffee trading demonstrates blockchain's value in the following key areas:
The business network
A functional business network for buying and selling coffee beans might look like this map:
View image at full size
The coffee-plant icons on the map represent coffee bean growers, who pay their workers to harvest coffee beans and make money by selling the coffee beans. The coffee-cup icons are coffee bean buyers, who purchase the coffee beans and make money by converting them into cups of coffee for their customers. Each airplane represents a shipment of coffee that has been ordered and is being delivered.
Let's say you are a coffee bean buyer, Curt's Coffee. You start out with a little bit of profit and a small inventory of three kinds of coffee beans: good, better, and best. As a buyer, you make money by converting the beans into cups of coffee and selling those to your customers. Your efficiency and the quality of coffee beans you use determine how much profit you make.
After you brew coffee and make a profit, you find you've used up all your best quality beans. You must replenish your supply to be able to brew more "best" coffee; after all, you make more per cup of "best" coffee beans than you do from other types. But first, you need to find a coffee bean supplier.
In a world without blockchain, you would need a mechanism for finding a coffee bean grower who is willing to sell you the quality of beans you need at terms that are favorable to you. After you find one, you must negotiate the price, the quantity, and the quality of the beans. The supplier might promise to give you their best quality coffee beans, but you have no guarantee. You might not know them well enough to trust them.
Automation and trust through smart contracts
This is where blockchain comes in. Blockchain can reduce the friction and improve the efficiency between buyer and seller, by automatically executing business logic agreed upon by the participants.
Blockchain lets you and the supplier use a smart contract that codifies the terms and conditions that you agree to use to trade coffee beans. A smart contract is a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract. Every user of blockchain will have a different user experience, often in the form of a web or mobile application, designed to facilitate their role within the network.
In this coffee example, using a mobile app, you request to use a smart contract to buy coffee beans. You set up the terms of the smart contract, choosing the quality of beans you want to buy (best), the quantity you want to buy (40 units), and the price range you're willing to accept (anywhere up to $7 per unit). When you submit your smart contract, it's registered in the network, and the blockchain logic tries to match you with a grower who accepts your terms and conditions.
The contract increases the level of trust between the participants because it's the only mechanism for organizations to participate in the buying and selling of beans in the business network, and no organization has the ability to unilaterally change the business rules that are encoded in the smart contract and determine how deals are done. When organizations join the business network, they are provided with visibility into how the smart contracts are written so they can decide up front whether they would like to participate.
Let's say a company called Big Beans accepts your offer. They send you 40 units, which is what you wanted, at $6 a unit, which is lower than your maximum price and must also be higher than their minimum price. That completed deal is recorded in your purchase history.
Right away, you start a deal with the next grower. The quantity of coffee goes up and your profit goes down as you pay for another shipment of coffee. You brew more coffee to keep your profit going up.
If you want to withdraw the smart contract at any time, because you have enough best quality coffee beans, you can do that. Otherwise, the smart contracts in this particular network are designed to keep looking for matches for you.
Provenance
The coffee business network is a global network, so deals are being made throughout the world. Connections are being made between buyers and sellers. Every transaction that is executing within this business network is captured on a shared ledger, exact copies of which are maintained by the participants throughout the network and automatically kept in sync by the blockchain platform.
The following image depicts some of the records that might be captured by the shared ledger for the network. You can see that a lot of details about the transactions are being captured.
Because the ledger is immutable, the participants can trace the lineage of a shipment of coffee beans and have a guarantee of the quality of the beans. For example, with your transaction, the shared ledger records "Deal struck between buyer Curt's Coffee and grower Big Beans for the purchase of 40 units of best beans for $6.00/unit." Later, it records "Deal complete - shipment received by Curt's Coffee and payment received by Big Beans."
It's important to understand that the previous view of the ledger represents a level of visibility that a global coffee regulator, if such an organization existed, would see. Organizations performing regulatory roles within a business network often require visibility into all the different participants and transactions in the business network, to make sure that everyone is following the rules.
Without blockchain, that regulator would be collecting all the activity reports from all the participants, maybe at the end of each month, then doing forensic analysis to untangle the spaghetti mess of transactions that took place during the month and hoping they could figure out if someone was trying to hide something to make themselves look better (or become richer) than they should.
But in this case, with every business transaction captured in the distributed ledger (individual copies of which are hosted throughout the business network), according to the properties of blockchain, no individual on this network can change the records on the network. A consensus builds around every single record on the ledger. Everyone in the business network knows they can trust the data in the ledger, and the regulator can rely on this up-to-date information to provide visibility into the state of the business network.
Privacy
Looking at the information included in the transactions on the ledger, it's obvious that the data captured there is highly sensitive — how much coffee is being purchased, buying and selling prices, quantities, and so on. The deals you're making and how much you're willing to pay is probably not information that you want your competitors to have. Notwithstanding the need for a global coffee regulator, if there were one, to have visibility into these details across the network, you need to consider privacy to ensure that competitors do not have access to this sensitive information.
Specifically, each buyer and seller on the network has visibility to only the transactions in which they are a stakeholder, and each buyer and seller is prevented from gaining unauthorized access to others' sensitive information. The following image represents the limited view of the shared ledger that you as Curt's Coffee might see.
When you joined this business network, you would have gone through an on-boarding process. This process is different for every business network, and there would be business terms and conditions that you accepted before you could join. Once you were accepted into the network, you were handed a bundle of certificates and keys, granting you identity within the network and giving you the capability to decrypt and look at certain fields and certain pieces of information inside the shared ledger. Most importantly, you can see only the records that pertain to you. For example, every time you brew coffee, it shows up here. You might be able to look at the history of one of the growers you've dealt with and track the records back to see the quality of the coffee that was sent to you, and when his organization harvested it.
Many of the participants in the business network have a copy of the shared ledger in a local database, and the distributed part of the ledger keeps them all in sync. Your database might contain only the records in the ledger that pertain to you or it might contain everything, depending on how you set it up. You might want to have a private ledger with one person, so only the two of you can see the transactions. Or, you might want to have the whole shared ledger in your database and know that the parts you aren't allowed to see are protected with cryptography. Participants have visibility into transactions that are relevant to them, based on their role in the network.
Organizations that don't want to host a copy of the ledger themselves can access the business network through APIs exposed by those who do. Ledger-hosting organizations might charge for this service, representing additional revenue and business model opportunities afforded by blockchain.
New business models
One of the interesting things about blockchain is that you can do new things you couldn't do before. Blockchain enables new business models to emerge.
For example, you might be able to introduce new types of participants into the business network. In the coffee example, let's introduce "certification organizations" that come in and analyze the practices of either growers or buyers to give them their seal of approval if they meet the organization's standards. On the map, these organizations are represented by icons that look like scrolled documents.
View image at full size
Ann Ewan and Curtis Miles
Model your first blockchain network, fast!
With Hyperledger Composer, you can prototype a blockchain network your preferred way: online, locally, or in the cloud. See how to rapidly define and test your business network.
Blockchain is a secure way to exchange goods, services, and information among the participants in a network. Using a tangible example (global coffee trading), we'll explain the core concepts of blockchain: smart contracts that automatically execute business logic that the participants agree upon, and a shared, distributed ledger that helps guarantee the quality and lineage of goods or services. We'll also show you how blockchain enables collaboration and encourages new business models to emerge.
Everyone has read the articles saying blockchain is going to change the world, but those articles rarely explain exactly how that's going to happen. This article fills in some of those gaps and help you understand the fundamentals of blockchain.
All over the world, businesses and organizations are increasingly dependent on other businesses. They need trusted partnerships to be able to succeed, but every organization has its own stakeholders, objectives, and business targets. Blockchain offers a secure way to exchange goods, services, and information. It externalizes the necessary trust between the organizations involved and captures the executable rules by which organizations do business (known as smart contracts on the blockchain). In this way, no individual organization has the authority to change those rules unilaterally.
These externalized, trusted transactions enable new global networks and drive new business models. In any industry, the key points of friction or opportunity are ideal places to pilot blockchain technology. Blockchain technology can bring together new organizations that have previously found it difficult or impossible to collaborate without a trust mechanism.
Let's look at how global coffee trading demonstrates blockchain's value in the following key areas:
- Automation and trust through smart contracts
Blockchain reduces friction and improves efficiency by automatically executing business logic agreed upon by the participants. - Provenance
Blockchain can guarantee the quality and lineage of goods or services through an immutable shared ledger. - Privacy
Participants have visibility into transactions that correspond to their role in the network. - New business models
New participants of different types can join the network and provide value and new possibilities.
The business network
A functional business network for buying and selling coffee beans might look like this map:
View image at full size
The coffee-plant icons on the map represent coffee bean growers, who pay their workers to harvest coffee beans and make money by selling the coffee beans. The coffee-cup icons are coffee bean buyers, who purchase the coffee beans and make money by converting them into cups of coffee for their customers. Each airplane represents a shipment of coffee that has been ordered and is being delivered.
Let's say you are a coffee bean buyer, Curt's Coffee. You start out with a little bit of profit and a small inventory of three kinds of coffee beans: good, better, and best. As a buyer, you make money by converting the beans into cups of coffee and selling those to your customers. Your efficiency and the quality of coffee beans you use determine how much profit you make.
After you brew coffee and make a profit, you find you've used up all your best quality beans. You must replenish your supply to be able to brew more "best" coffee; after all, you make more per cup of "best" coffee beans than you do from other types. But first, you need to find a coffee bean supplier.
In a world without blockchain, you would need a mechanism for finding a coffee bean grower who is willing to sell you the quality of beans you need at terms that are favorable to you. After you find one, you must negotiate the price, the quantity, and the quality of the beans. The supplier might promise to give you their best quality coffee beans, but you have no guarantee. You might not know them well enough to trust them.
Automation and trust through smart contracts
This is where blockchain comes in. Blockchain can reduce the friction and improve the efficiency between buyer and seller, by automatically executing business logic agreed upon by the participants.
Blockchain lets you and the supplier use a smart contract that codifies the terms and conditions that you agree to use to trade coffee beans. A smart contract is a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract. Every user of blockchain will have a different user experience, often in the form of a web or mobile application, designed to facilitate their role within the network.
In this coffee example, using a mobile app, you request to use a smart contract to buy coffee beans. You set up the terms of the smart contract, choosing the quality of beans you want to buy (best), the quantity you want to buy (40 units), and the price range you're willing to accept (anywhere up to $7 per unit). When you submit your smart contract, it's registered in the network, and the blockchain logic tries to match you with a grower who accepts your terms and conditions.
The contract increases the level of trust between the participants because it's the only mechanism for organizations to participate in the buying and selling of beans in the business network, and no organization has the ability to unilaterally change the business rules that are encoded in the smart contract and determine how deals are done. When organizations join the business network, they are provided with visibility into how the smart contracts are written so they can decide up front whether they would like to participate.
Let's say a company called Big Beans accepts your offer. They send you 40 units, which is what you wanted, at $6 a unit, which is lower than your maximum price and must also be higher than their minimum price. That completed deal is recorded in your purchase history.
Right away, you start a deal with the next grower. The quantity of coffee goes up and your profit goes down as you pay for another shipment of coffee. You brew more coffee to keep your profit going up.
If you want to withdraw the smart contract at any time, because you have enough best quality coffee beans, you can do that. Otherwise, the smart contracts in this particular network are designed to keep looking for matches for you.
Provenance
The coffee business network is a global network, so deals are being made throughout the world. Connections are being made between buyers and sellers. Every transaction that is executing within this business network is captured on a shared ledger, exact copies of which are maintained by the participants throughout the network and automatically kept in sync by the blockchain platform.
The following image depicts some of the records that might be captured by the shared ledger for the network. You can see that a lot of details about the transactions are being captured.
Because the ledger is immutable, the participants can trace the lineage of a shipment of coffee beans and have a guarantee of the quality of the beans. For example, with your transaction, the shared ledger records "Deal struck between buyer Curt's Coffee and grower Big Beans for the purchase of 40 units of best beans for $6.00/unit." Later, it records "Deal complete - shipment received by Curt's Coffee and payment received by Big Beans."
It's important to understand that the previous view of the ledger represents a level of visibility that a global coffee regulator, if such an organization existed, would see. Organizations performing regulatory roles within a business network often require visibility into all the different participants and transactions in the business network, to make sure that everyone is following the rules.
Without blockchain, that regulator would be collecting all the activity reports from all the participants, maybe at the end of each month, then doing forensic analysis to untangle the spaghetti mess of transactions that took place during the month and hoping they could figure out if someone was trying to hide something to make themselves look better (or become richer) than they should.
But in this case, with every business transaction captured in the distributed ledger (individual copies of which are hosted throughout the business network), according to the properties of blockchain, no individual on this network can change the records on the network. A consensus builds around every single record on the ledger. Everyone in the business network knows they can trust the data in the ledger, and the regulator can rely on this up-to-date information to provide visibility into the state of the business network.
Privacy
Looking at the information included in the transactions on the ledger, it's obvious that the data captured there is highly sensitive — how much coffee is being purchased, buying and selling prices, quantities, and so on. The deals you're making and how much you're willing to pay is probably not information that you want your competitors to have. Notwithstanding the need for a global coffee regulator, if there were one, to have visibility into these details across the network, you need to consider privacy to ensure that competitors do not have access to this sensitive information.
Specifically, each buyer and seller on the network has visibility to only the transactions in which they are a stakeholder, and each buyer and seller is prevented from gaining unauthorized access to others' sensitive information. The following image represents the limited view of the shared ledger that you as Curt's Coffee might see.
When you joined this business network, you would have gone through an on-boarding process. This process is different for every business network, and there would be business terms and conditions that you accepted before you could join. Once you were accepted into the network, you were handed a bundle of certificates and keys, granting you identity within the network and giving you the capability to decrypt and look at certain fields and certain pieces of information inside the shared ledger. Most importantly, you can see only the records that pertain to you. For example, every time you brew coffee, it shows up here. You might be able to look at the history of one of the growers you've dealt with and track the records back to see the quality of the coffee that was sent to you, and when his organization harvested it.
Many of the participants in the business network have a copy of the shared ledger in a local database, and the distributed part of the ledger keeps them all in sync. Your database might contain only the records in the ledger that pertain to you or it might contain everything, depending on how you set it up. You might want to have a private ledger with one person, so only the two of you can see the transactions. Or, you might want to have the whole shared ledger in your database and know that the parts you aren't allowed to see are protected with cryptography. Participants have visibility into transactions that are relevant to them, based on their role in the network.
Organizations that don't want to host a copy of the ledger themselves can access the business network through APIs exposed by those who do. Ledger-hosting organizations might charge for this service, representing additional revenue and business model opportunities afforded by blockchain.
New business models
One of the interesting things about blockchain is that you can do new things you couldn't do before. Blockchain enables new business models to emerge.
For example, you might be able to introduce new types of participants into the business network. In the coffee example, let's introduce "certification organizations" that come in and analyze the practices of either growers or buyers to give them their seal of approval if they meet the organization's standards. On the map, these organizations are represented by icons that look like scrolled documents.
View image at full size