Smart contracts are self-executing codes that are implemented on the blockchain. These replace the middlemen and perform all the jobs they do. Okay, I don't think this explanation would be enough if you are into it for the very first time.
Let's dive deep and try to demystify it.
"A smart contract is a computer protocol intended to digitally facilitate, verify, or enforce the negotiation or performance of a contract. Smart contracts allow the performance of credible transactions without third parties." This is exactly what Wikipedia says.
I'll give you a straightforward explanation. Assume you wish to buy a property in a country that you don't belong to. Maybe you go there but don't have a good idea about investing in properties in that area.
In this scenario, you would usually book an intermediary to do all the job that is required to register the property in your name. That might cost you an arm and a leg if you are a moderately earning person.
But what if the broker wasn't right about what he said? What if the broker has tricked you into paying more than the fair price?
There is a way you can avoid all these - Smart contracts. When every data about the property is stored in the blockchain, anyone can see and verify the truth. You can check the list and would only get credible results (since everyone sees it).
Also, you would not have to travel to and fro just to get it registered. It is sufficient if you pass on the necessary documents on the smart contract. The person on the other side would get all your needs and the documents to process.
Now, coming to the most important part - the payment part.
Smart contract (I mean the one that you use) is designed to do processes in a unique way. Here is how it works.
The smart contract is first ordered to ask for the documents from the seller, and the money from you. Then it verifies all the details in the document. Once that is done, your money is passed to the seller, and you get the registration papers.
What Actions Are Coded In The Smart Contract?
Everything. Absolutely every action is coded. Yes, smart contract development happens in such a way that it behaves just like human middlemen. When the given rules are met, the smart contract executes the action. The action could be anything like transferring money, agreeing with the given document or so.
I guess I have told you clearly about smart contracts. If you have any doubts, please feel free to comment below, ill be there right away to give you the right explanation. See ya'll in the next blog!