A smart contract is a computer protocol intend to digitally facilitate, verify or enforce the negotiation or performance of a contract. Smart contracts allow the performance of credible transactions without third parties. These transactions are trackable and irreversible.

How Smart Contracts work

It’s worth noting that bitcoin was the first to support basic smart contracts in the sense that the network can transfer value from one person to another. The network of nodes will only validate transactions if certain conditions are met.

But, in the case of using crpytocurrency is limited.

By contrast, ethereum replaces bitcoin’s more restrictive language and replaces it with a language that allows developers to write their own programs.

Smart contracts example

Smart contracts are basically just computer code that is storing in a distributed blockchain. Because the blockchain is distribute. A copy of it is storing in each computer of the network. This implies that a copy of the smart contracts code is also store in each computer of the network. It can infact execute in the same way by each computer. In the Ethereum blockchain, the code is execute in a specific environment. The Ethereum Virtual Machine (EVM). Every network node will verify new blocks by going through the transactions include in it and implementing the codes in EVM. Since they all have an exact copy of the same chunk of code. Each network node makes the same calculations and saving equal values.

smart contracts