Try our learning program for free!

STEMVentor LMS

Blockchain – Part 3: Smart Contracts'

Vikas Mujumdar, March 20, 2020

In part 1 of this 3-part series on Blockchain, the concept and intent (what business value it can add) of this technology was explained. In part 2, some of the technical and implementation details were explained, so you could be aware of how this new technology works under the hood. In this part, I will walk you through a use case that demonstrates Blockchain in action with its Smart Contracts solution.

Trade Contracts

In all business transactions there is always a contract between the two or more parties involved in the transaction. How tight the contract is broadly depends on the trust between the parties involved and the value of the transaction. If you are buying a low-value product at a garage sale for example, you would execute the transaction with a verbal understanding that the seller would refund the money if the product was found to be defective. If you are buying the house itself, you would involve legal experts to draw up a tight contract that protects you and ensures, for example, that the seller takes care of any repairs to the house that were not disclosed before the sale.

Trade contracts between businesses are much more complex as the buyer specifies the goods and services required, the specifications they must meet, the quality checks they must pass, delivery timelines and finally, penalties if any of the contract terms and conditions are not met.

The seller in turn specifies the amounts the buyer must pay and at what points in time and possible incentives if the delivered goods and services are of a higher standard than the buyers specifications in some way. To draft, execute and enforce these contracts needs a great deal of expertise and a lot of human intervention with a lot of subjectivity and scope of errors and even intentional mis-representation.

Smart Contracts

Smart Contracts are digital versions of these kind of complex trade contracts and have all the buyer and seller terms digitally programmed into them. Further, they are self-executing, which means that these terms will be triggered automatically on the occurrence of an event or on any condition specified in the contract and the defined action will be automatically taken.

After all initial human negotiations, once the contract is created in the system, any updates require the Blockchain mandated consensus from all entities, thus making these contracts tamper-proof. Payments for goods and services will be automatically determined and even possibly automatically executed based on the terms and conditions programmed into the Smart Contract.

For example, a Smart Contract may have a condition that the buyer must pay a certain percentage of the total amount of the contract a month after the contract is executed. The system will automatically trigger a payment instruction when the month has passed, without any human intervention. This ensures that the seller does not have to chase the buyer and also helps the buyer by not having to track all due payments all the time.

This condition may have a pre-condition that the seller must have submitted a sample of the product for the buyer to review. If the sample is not delivered then at the end of the month the payment will not be made, it will be made only after the sample is delivered.

The underlying technology is Blockchain. By replicating the digital contract and all the transactions that happen on the contract (such as deliveries, payments or penalties) on nodes maintained by each of the parties in the contract, there is complete transparency on the execution of the contract and all the guarantees of a Blockchain solution including immutability and security.

Use Case: Smart Contracts in Supply Chain Management

Most businesses deal with complex supply chain networks. As an illustrative example, we are going to see how Smart Contracts, using Blockchain can help an airline manage its in-flight catering supply chain. We will also make use of Internet of Things technology to automatically determine some events and trigger actions, reducing human involvement.

Note: This is a highly simplified representative process only. A real in-flight catering service process may be more complex but it would still be a valid use case for Smart Contracts.

Consider the following entities in this supply chain:

  • The Airline: For each of its flights the airline will have a list of catering items required depending on the category of the flight (whether short- or long-haul), the port of departure and destination and number of passengers in each class.

  • The In-flight Catering Service: The in-flight catering service will be the primary supplier for the airline for its catering items, which could be a combination of hot cooked items which will be cooked in the service provider's kitchen and pre-packaged products which may be source from a third party packaged products supplier. The in-flight catering service will be responsible for packaging the hot cooked items and the packaged products into meal trays that will be served to the customer.

  • The Packaged Products Supplier: The in-flight catering service will order from a packaged products supplier for products such as bottles of water or packs of butter, jam, yoghurt, ice-cream and so on, that accompany meals but need not be cooked fresh in the kitchen.

  • The Transporter: The In-flight catering services will also have the responsibility for transporting the meal trays and other items required for meal service to the designated aircraft. For this they will contract a transport service which will use trucks that are capable of loading meal trays on to the aircraft and are equipped with temperature and humidity controls to keep the items fresh and hot or cold as required.

Drawing up a Contract

The four parties involved will draw up a contract in the usual way – sitting across a table – and set down the terms of the agreement for a particular flight. Note that in the real world, there would be a master contract that would cover all flights for a year or some such period with rates agreed upon, the only variable for each flight being the time, location and numbers and types of products to be supplied.

Broadly, the contract will have the following terms:

- The airline will specify to the in-flight catering service the type and number of meal trays they need and what time they must be delivered and loaded on to the aircraft.

- The airline will specify payment milestones and penalties for delayed delivery.

- The in-flight catering service will specify to the packaged products supplier the type and number of products they need (based on the number of meal trays specified).

- The in-flight catering service will specify the rates for the meal trays. In the smart contract, the total amount dues will be calculated and the contract will be updated. The system can check against the master contract to ensure rates are equal to or below what has been agreed.

- The packaged products supplier will specify the product descriptions but may or may not disclose the rates for their products in this contract depending on the transparency agreed to with the airline. This may be settled in a separate contract with the in-flight catering service.

- The in-flight catering service will specify the delivery conditions to be met by the transporter in terms of the minimum and maximum temperature and humidity to be maintained.

- The in-flight catering service will update penalties for deviating from the transport conditions.

Transparency

Every update to the smart contract is visible to all stakeholder entities who are a party to the contract. Using the principles of Blockchain, every time an entity requests to make an update, all other entities have to approve it and then the smart contract with each entity is updated so all reflect the exact same information. This ensures transparency across all entities.

However, in the real business world, transparency is not always acceptable to all entities. For example, when the primary contract is between the airline and the in-flight services business, the in-flight services business may not want to reveal to the airline what it pays the packaged products supplier or the transporter. But the transporter would like to know what penalties the airline levied due to deviations from transport conditions, so they can trust that the in-flight services business is not deducting any penalties unfairly.

The level of transparency can be managed in the smart contract by all entities agreeing on what will be seen by all.

In this use case we are going to use IoT technologies to make some updates to the Smart Contract automatically based on data received by various sensors placed at appropriate locations. This will be an exception to the consensus rule as there is no human intervention, rather updates are made by a trusted, closed-loop (sensors will be installed in agreement with all entities) infrastructure.

The rest of this article will walk you through with an illustration how such a Smart Contract will be managed.

Smart Contract

That's all on Blockchain folks! There's much more to explore but maybe at a later date.

In a later article we will take a look at how the Internet of Things, Smart Contracts and Digital Payment Systems can integrate and work together to provide an automated end-to-end enterprise supply chain solution with zero human intervention.

Articles
Get In Touch
Call:
+91 98200 44097