Smart Contracts

Smart Contracts

Update: 2020-06-22
Share

Description

Blockchains are decentralized. Each node in a blockchain network validates and processes all the transactions and stores the copy of the data. Transactions are used to propose updates to the state of the blockchain.

Transactions are initiated using function calls on the blockchain node. For example, in the Bitcoin blockchain, the node software exposes a function called ‘transfer’ which the users can call to transfer bitcoin from one account to another. This function call basically becomes a transfer transaction initiated by the user. Internally, the function, when executed, validates the user’s signature, checks their balance, and does the balance updates to transfer the indicated amount. When the transaction representing this function call is included in a block, all other nodes of the blockchain execute this function individually. This process is followed for each and every transaction. In essence, transactions are function calls and these functions execute business logic.

Smart Contracts allow users to extend the business logic of blockchains. Just the transfer of bitcoin and ether might only help with a subset of financial use cases and cryptocurrencies. For blockchains to be useful in more scenarios, they should be able to execute any kind of business logic and not just transfer of cryptocurrency. This is exactly what smart contracts provide — execution of any kind of business logic on the chain.

In simple terms, a Smart Contract is a collection of functions written in code — just like any other software. They are then deployed on the blockchain by using special transactions that take compiled code of the smart contract as input. Once deployed, users could call smart contract functions just like they would initiate any other transaction on the chain.

For example, a supply-chain smart contract could have a function for recording the location and/or temperature of a shipping container. It could have logic that when the reported temperature goes below a certain value or when the location is within a geo-fence, some amount of cryptocurrency should be transferred from one account to another on the blockchain. This would then allow two parties to track a shipping container and settle payments based on its location and temperature, in the most trustless way possible. Hence making blockchains more useful than just balance transfers.

Music: https://www.purple-planet.com
Comments 
In Channel
Block Rewards

Block Rewards

2020-08-0304:48

Block Finality

Block Finality

2020-07-1304:59

Fork

Fork

2020-07-0604:32

Blockchain Governance

Blockchain Governance

2020-07-0204:54

Smart Contracts

Smart Contracts

2020-06-2204:45

Wallets

Wallets

2020-06-1804:47

Accounts and Keys

Accounts and Keys

2020-06-1504:43

Signing

Signing

2020-06-0805:14

Hashing

Hashing

2020-06-0404:42

Consensus

Consensus

2020-05-2505:10

Blockchain

Blockchain

2020-05-2104:54

Download from Google Play
Download from App Store
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

Smart Contracts

Smart Contracts

Gautam Dhameja