Blockchain and Smart-contract explained
4 min read
You must have been hearing about Blockchain and Smart-contract. In this article, I will be explaining what these technologies are about .
- What is blockchain?
- What Is Distributed Ledger Technology (DLT)?
- What Is a Hash Function?
- How does Hash function Work?
- Smart contract
- How do smart contracts work?
What is blockchain?
A blockchain is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems on the blockchain. Blockchain is a system of recording information in a way that makes it difficult or impossible to change, hack, or cheat the system. Each block in the chain contains a number of transactions, and every time a new transaction occurs on the blockchain, a record of that transaction is added to every participant’s ledger. Blockchain is a type of DLT(Distributed Ledger Technology) in which transactions are recorded with an immutable cryptographic signature called a Hash
What Is Distributed Ledger Technology (DLT)?
Distributed Ledger Technology (DLT) refers to the technological infrastructure and protocols that allows simultaneous access, validation, and record updating in an immutable manner across a network that's spread across multiple entities or locations.
What Is a Hash Function?
A hash is a mathematical function that converts an input of arbitrary length into an encrypted output of a fixed length. Thus, regardless of the original amount of data or file size involved, its unique hash will always be the same size. Moreover, hashes cannot be used to "reverse-engineer" the input from the hashed output, since hash functions are "one-way"
How does Hash function Work?
Typical hash functions take inputs of variable lengths to return outputs of a fixed length. A cryptographic hash function combines the message-passing capabilities of hash functions with security properties. Hash functions are commonly used data structures in computing systems for tasks, such as checking the integrity of messages and authenticating information. While they are considered cryptographically "weak" because they can be solved in polynomial time, they are not easily decipherable. Cryptographic hash functions add security features to typical hash functions, making it more difficult to detect the contents of a message or information about recipients and senders.
A smart contract is a computer program or a transaction protocol which is intended to automatically execute, control or document legally relevant events and actions according to the terms of a contract or an agreement. Smart contracts are simply programs stored on a blockchain that run when predetermined conditions are met. They typically are used to automate the execution of an agreement so that all participants can be immediately certain of the outcome, without any intermediary's involvement or time loss.
How do smart contracts work?
A smart contract is an agreement between two people in the form of computer code. They run on the blockchain, so they are stored on a public database and cannot be changed. The transactions that happen in a smart contract are processed by the blockchain, which means they can be sent automatically without a third party.
Yes, just how do smart contracts work, then?
To find the answer, let's start by looking at how a smart contract can be used:
Let’s imagine that John wants to buy Mike’s house. This agreement is formed on the Ethereum blockchain using a smart contract. This smart-contract contains an agreement between John and Mike. In the simplest terms, the agreement will look like this: “WHEN John pays Mike 500 Ether, THEN John will receive ownership of the house”. Once this smart contract agreement has been put into place, it cannot be changed — meaning John can feel safe to pay Mike 500 Ether for the house.
Without the use of a smart contract in this scenario, Mike and John would have to pay lots of fees to third-party companies. Including the bank, a lawyer and a house broker.
It’s great, right?
No more commissions and no more delays to wait for a lawyer and broker to process the agreement! This is just one of many examples of how a smart contract can be used. Smart contracts are automatically executed once the conditions of the agreement are met. This means there is no need for a third party, like a bank, a broker, or a government.
Now that we know what smart contract is and how it works, I'll be discussing the programming languages to write a smart contract program and that's SOLIDITY and will explained in an upcoming article
This article sheds more light on Blockchain, Distributed Ledger Technology(DLT), Hash function and how they work. It also explained what smart contract is and they work. I hope you enjoyed the article.... If so, please do well to share your feedback and Likes:)
Did you find this article valuable?
Support Odewole Babatunde Samson by becoming a sponsor. Any amount is appreciated!