How Smart contracts work
A traditional ledger in any organization would be used to record transactions, trace assets, investments, and inventory. This would mean that several ledgers would need to be maintained across the organization and this would cause duplication of effort. Because theses ledgers would be stored on a central system it would also be susceptible to cyber-attacks, fraud and infrastructure downtime
Smart contracts are coded programs that run on top of Blockchain technology and allows all the members to share and interact with each other using a distributed ledger. These are done through transactions or agreements. Smart contracts are shared between members that execute the code independently and which is automatically cross-checked. The blockchain ledger is a database that ensures that all the inputs are identical when the program is executed. When the members execute the program they should come to the same conclusion which is then recorded on the distributed ledger. Smart contracts operate by following a simple rule IFTTT “if this then that statements”, if this happens then execute the next sequence of events coded into the Smart contract on the Blockchain. Because the blockchain is secure and reliable it ensures that the transactions that happen cannot be changed, modified or edited.