Hey community, I have just learned the basics about Smart Contact and its role in Blockchain. I am converting my knowledge into a discussion thread by self answering it. Feel free to jump in and add your opinion/answers.
Write your answer…
Thanks for starting a thread. I do see you have answered quite well, but I would like to add some points to it.
We all know what a contract is, when ever two or more parties agree to some terms before acting on something, they sign a contract in presence of a third party which reduces any counter party risk. And the trust is maintained among the group. But what if there's a contract which holds by itself and does not need a third party to place it to action. In current scenario, the answer is blockchain. As blockchain is a single source of truth and the data stored is near to immutable once written, unless a hard fork happens :D. So, why not deploy a algorithmic code in blockchain and let it work on its own.
Smart contract is a algorithmic piece of code which gets triggered on meeting certain conditions that may be external(feeds) or internal(via executing functions through transactions), which resides in the blockchain.
Once deployed in the blockchain the contact can not be updated or deleted. It can only be replaced by a new one to which all the participating parties agree.
First introduced in Ethereum blockchain, which is capable of running a smart contract in it's Ethereum Virtual Machine.
- Enabling escrow transactions between two or more parties,
- Enabling peer to peer lending, along with ability to add collateral in the contract reducing counter party risk.
- Asset management and ownership on a contract, where a unique asset can only have one owner. Thus, no asset management agency is required to keep track of all the assets.
- Multiplayer online gaming contest, where the top teams will get rewarded via a smart contract. Earning trust of gamers, as the contract will be in public blockchain for everyone to see.
A smart contact is a virtual contract that controls the transaction between two parties. It builds the trust between the parties and makes sure there is no mistakes/errors/fraud. It acts as a middle man between the sellers and the buyers.
Smart contact is stored under blockchain technology (which is a ledger) that supports bitcoin and another cryptocurrency.
A contract is “a voluntary arrangement between two or more parties”
A smart contract is “a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract”
Cryptographer Nick Szabo first proposed the idea of smart contracts way back in the 90s and they have recently been employed in blockchain projects, most notably Ethereum.
Smart contracts in the context of Ethereum are scripts that are executed on a global network of public nodes — the EVM (Ethereum Virtual Machine) — and can read/write transactions from/to the blockchain.
A smart contract can be used to programmatically and autonomously enforce agreements. The implication of this is, of course, the removal of centralised intermediaries. Hence the usefulness in decentralised software.
This is my understanding of it, going full on into crypto of late. I began my crypto journey only yesterday. :D
Smart contracts help you exchange money, property, shares, or anything of value in a transparent, conflict-free way while avoiding the services of a middleman.
The best way to describe smart contracts is to compare the technology to a vending machine. Ordinarily, you would go to a lawyer or a notary, pay them, and wait while you get the document. With smart contracts, you simply drop a bitcoin into the vending machine (i.e. ledger), and your escrow, driver’s license, or whatever drops into your account. More so, smart contracts not only define the rules and penalties around an agreement in the same way that a traditional contract does, but also automatically enforce those obligations.
Suppose you rent an apartment from me. You can do this through the blockchain by paying in cyptocurrency. You get a receipt which is held in our virtual contract; I give you the digital entry key which comes to you by a specified date. If the key doesn’t come on time, the blockchain releases a refund. If I send the key before the rental date, the function holds it releasing both the fee and key to you and me respectively when the date arrives. The system works on the If-Then premise and is witnessed by hundreds of people, so you can expect a faultless delivery. If I give you the key, I’m sure to be paid. If you send a certain amount in bitcoins, you receive the key. The document is automatically canceled after the time, and the code cannot be interfered by either of us without the other knowing since all participants are simultaneously alerted.
You can use smart contracts for all sort of situations that range from financial derivatives to insurance premiums, breach contracts, property law, credit enforcement, financial services, legal processes and crowdfunding agreements.
The Dev Community
Free, friendly and inclusive platform for developers
Or connect with