Smart Contracts

Smart Contracts & Dapps

The term smart contract was first coined by Nick Szabo in 1996. Nick described how smart contracts, just like contacts in the real world, could form legally binding agreements between two or more parties, however, they could do so using the power of modern-day computer programming.

The idea is that anything that would normally be included within traditional, or paper, contracts - such as terms, conditions, and clauses, could instead be embedded within a computer program, forming a digital contract.

But what made Nicks idea truly smart, hence the name, is that smart contracts can be pre-programmed for autonomous self-enforcement, executing automatically, with predictable results, when predetermined conditions are met and verified.

In layman's terms, smart contracts achieve this via use of “if A, when B, then C” statements that are written into the code of the smart contract e.g. if Bob has a valid claim when his insurance policy is active, then pay Bob x. Oversimplified of course, but hopefully, it helps to illustrate the point.

But please note, smart contracts are not limited to performing the role of classical contracts i.e. enforcing a legally binding agreement between two or more parties, as smart contracts are nowadays widely used to automate all manner of business processes, digitally.

The advent of smart contracts removed the need for third parties, such as lawyers or administrative staff, to be involved in the contract validation and execution process, resulting in many benefits, including:

Speed of Execution: Once a condition is met, smart contracts are executed immediately, saving time on otherwise lengthy business processes.

Accuracy & Trust: As there are no third parties involved e.g. humans manually validating and completing paperwork, smart contracts can be trusted to execute reliably, predictably, and consistently.

Security & Transparency: In the world of blockchain smart contracts are even more secure, as the cryptographic, decentralised, and distributed nature of a blockchain means that every action is simultaneously witnessed and verified by all other nodes on the network, making it almost impossible for someone to alter a contract, or a specific transaction, for their benefit.

Cost Savings: Removing the need for organisations to manually manage the business processes associated with contracts e.g. form filing, contract execution, and contractual disputes, their implementation can help to drive down operational costs.

Hyperledger & Chaincode

In the context of Hyperledger Fabric, a widely used platform used to create decentralised applications, or DApps on a blockchain, the terms smart contract and chaincode are used interchangeably.

Although, there is a subtle difference. As we've learned, a smart contract describes the business logic, or one could say, the terms of a contract, whereas chaincode, refers to how a smart contract is packaged and then deployed to a blockchain network.

We won't get into the technicalities of the two in this course, but at least now you know that there is a difference. We'll also look at Hyperledger in more detail, later in this course.

In partnership with TFBC

Take the full course, for free!

Recognised and co-certified by both the British CPD Service and the Dubai Blockchain Center, our new Fundamentals of Blockchain course is the perfect choice for anyone looking to learn more about this disuptive new approach to systems development.

Start learning