Smart contracts - Simply Explained

Simply Explained
20 Nov 201704:17

Summary

TLDRSmart contracts are digital agreements stored on a blockchain that execute automatically based on predefined conditions, removing the need for third-party intermediaries. They provide trust and transparency as they are immutable and distributed across decentralized networks. The script explores smart contracts through a crowdfunding example, explaining how they could securely handle funds without requiring parties to trust platforms like Kickstarter. It notes smart contracts' applicability to banking, insurance, postal services, etc. and introduces Ethereum as the leading blockchain for writing Solidity-based smart contracts to address various use cases.

Takeaways

  • 😀 Smart contracts are digital agreements that self-execute based on predefined conditions, removing the need for third party enforcement.
  • 👩‍💻 Smart contracts are tiny computer programs stored and run on a blockchain.
  • 💰 They can be used for automatic payments, loans, insurance claims, crowdfunding campaigns, etc.
  • 🔐 Their immutable and distributed nature makes tampering almost impossible.
  • 🌐 Ethereum was specifically designed to support complex smart contracts.
  • 📜 Smart contracts inherit properties like immutability and distribution from the underlying blockchain.
  • ✅ Their outcomes are validated by everyone on the blockchain network.
  • 🤝 They remove the need to trust a third party intermediary.
  • 🛠 Smart contracts are programmed in Solidity, which resembles JavaScript.
  • 🏦 Banks, insurance firms, postal services etc. can benefit from smart contracts.

Q & A

  • What are smart contracts?

    -Smart contracts are digital contracts stored inside a blockchain. They are tiny computer programs that execute automatically when certain conditions are met.

  • How are smart contracts different from traditional contracts?

    -Smart contracts differ in that they are digital, stored on a blockchain, and self-executing based on predefined conditions, without needing a third party to manage them.

  • What problem do smart contracts solve?

    -Smart contracts remove the need for third parties and middlemen, as the contracts self-execute based on code. This increases trust and efficiency in transactions.

  • What was the inspiration behind smart contracts?

    -The concept was first proposed by Nick Szabo in 1997, long before Bitcoin existed. He wanted to create self-enforcing digital contracts stored on a ledger.

  • How can smart contracts be used for crowdfunding?

    -Smart contracts can hold funds and automatically release them to project creators if funding goals are met, or refund supporters if goals aren't met. No third party oversight is needed.

  • Why are smart contracts considered secure?

    -Smart contracts leverage the security of their underlying blockchains. Tampering is very difficult since they are immutable and executed across distributed networks that would detect invalid changes.

  • What language are Ethereum smart contracts programmed in?

    -Ethereum smart contracts are typically programmed in Solidity, a language created specifically for Ethereum with JavaScript-like syntax.

  • Does Bitcoin support smart contracts?

    -Bitcoin has limited support for smart contracts compared to Ethereum, which was designed from the ground up around this functionality.

  • What industries could adopt smart contracts?

    -Banks, insurance companies, supply chain/logistics providers, and real estate are some industries where smart contract adoption could streamline processes and reduce costs.

  • What are some challenges facing mainstream smart contract adoption?

    -Scalability, privacy, regulation/compliance, and coding challenges around security vulnerabilities are some current barriers limiting widespread smart contract use.

Outlines

00:00

🔐 Introduction to Smart Contracts

Smart contracts, conceptualized by Nick Szabo in 1997, are digital agreements stored on a blockchain, facilitating trustless transactions without the need for intermediaries. Unlike traditional contracts, smart contracts are programs that execute automatically under certain conditions, demonstrating their utility through a comparison with platforms like Kickstarter. By removing the need for a third party, smart contracts allow for direct, trustless transactions between parties. The example of a crowdfunding campaign illustrates how funds can be managed directly through a smart contract, ensuring automatic distribution based on the campaign's success or failure. This innovation leverages the immutable and distributed nature of blockchains, ensuring that contracts cannot be altered post-creation and their execution is verified collectively by the network, enhancing security and trust.

Mindmap

Keywords

💡smart contracts

Smart contracts refer to self-executing contracts written as computer programs that are stored and run on a blockchain. They allow transactions and agreements to be carried out automatically between parties based on predefined conditions without needing third-party oversight. The script discusses how smart contracts can be used for crowdfunding campaigns to hold and release funds without requiring a platform like Kickstarter.

💡distributed ledger

A distributed ledger is a database that is spread across multiple sites, regions or participants with no central administrator. Blockchains are a type of distributed ledger. The script mentions how Nick Szabo originally proposed using a distributed ledger to store smart contracts.

💡Kickstarter

Kickstarter is a popular online crowdfunding platform that allows people to pledge money towards creative projects in return for rewards. The script uses it as an example of how smart contracts can replace third parties like Kickstarter in collecting and releasing funds for campaigns.

💡immutable

In blockchain terminology, immutable refers to an inability to be changed or modified after creation. Smart contracts inherit this immutability from the blockchain they run on. This makes tampering with them almost impossible once deployed.

💡distributed

Distributed in blockchain refers to decentralized control and management across a peer-to-peer network with no central authority. The script states that this property of smart contracts ensures outputs cannot be falsely manipulated.

💡Solidity

Solidity is a programming language designed for writing smart contracts on Ethereum. The script notes it is the main language used to code Ethereum smart contracts using a JavaScript-like syntax.

💡crowdfunding

Crowdfunding refers to the practice of funding a project by raising small amounts of money from a large number of people, usually via the internet. The script illustrates smart contracts' application in crowdfunding campaigns and decentralized fundraising.

💡Ethereum

Ethereum is a public blockchain designed specifically to support smart contracts. The script states it currently allows for more complex smart contract functionality compared to Bitcoin.

💡loans

Loans refer to a sum of money borrowed from a financial institution that has to be paid back with interest over time according to predefined terms. The script suggests banks could use smart contracts for automated lending and repayment.

💡insurance

Insurance refers to an arrangement to financially compensate for loss or damage. Insurance companies could employ smart contracts to automatically verify and pay out claims based on coded policy conditions, as stated in the script.

Highlights

Smart contracts are digital contracts stored in a blockchain

Smart contracts inherit properties like immutability and distribution from the blockchain

Smart contracts automatically execute based on predefined conditions, removing the need for third parties

Ethereum was created specifically to support smart contracts

Solidity is the programming language created for writing Ethereum smart contracts

Bitcoin has limited support for smart contracts compared to Ethereum

Banks could use smart contracts for loans and automatic payments

Insurance firms could use smart contracts to process claims automatically

Postal services could use smart contracts for cash-on-delivery payments

Smart contracts remove the need for third parties and centralized control

Being immutable means smart contracts can never be changed after creation

Smart contracts output is validated by the blockchain network

Tampering with smart contracts becomes almost impossible

Smart contracts have many potential applications beyond crowdfunding

Ethereum and Solidity enable developers to build smart contract applications

Transcripts

play00:00

Smart contracts (also called distributed apps) are very popular nowadays.

play00:02

But what are they and what problems do they solve?

play00:06

The term “smart contract” was first used by Nick Szabo in 1997, long before Bitcoin

play00:12

was created.

play00:13

He is a computer scientist, law scholar and cryptographer so I’ll spare you his exact

play00:18

words.

play00:19

But in simple terms: he wanted to use a distributed ledger to store contracts.

play00:25

Now, smart contracts are just like contracts in the real world.

play00:29

The only difference is that they are completely digital.

play00:33

In fact a smart contract is actually a tiny computer program that is stored inside a blockchain.

play00:39

Let’s take a look at an example to understand how smart contracts work.

play00:45

You probably are familiar with Kickstarter, the large fundraising platform.

play00:50

Product teams can go to Kickstarter, create a project, set a funding goal and start collecting

play00:55

money from others who believe in the idea.

play00:58

Kickstarter is essentially a third party that sits between product teams and supporters.

play01:04

This means that both of them need to trust Kickstarter to handle their money correctly.

play01:10

If the project gets successfully funded, the project team expects Kickstarter to give them

play01:15

the money.

play01:16

On the other hand, supporters want their money to go to the project if it was funded or to

play01:21

get a refund when it hasn’t reached its goals.

play01:25

Both the product team and its supports have to trust Kickstarter.

play01:28

But with smart contracts we can build a similar system that doesn’t require a third-party

play01:34

like Kickstarter.

play01:37

So let’s create a smart contract for this!

play01:39

We can program the smart contract so that it holds all the received funds until a certain

play01:44

goal is reached.

play01:46

The supporters of a project can now transfer their money to the smart contract.

play01:51

If the project gets fully funded, the contract automatically passes the money to the creator

play01:57

of the project.

play01:58

And if the project fails to meet the goal, the money automatically goes back to the supporters.

play02:04

Pretty awesome right?

play02:06

And because smart contracts are stored on a blockchain, everything is completely distributed.

play02:12

With this technique, no one is in control of the money.

play02:16

But wait a minute!

play02:17

Why should we trust a smart contract?

play02:19

Well because smart contracts are stored on a blockchain, they inherit some interesting

play02:24

properties.

play02:25

They are immutable and they are distributed.

play02:29

Being immutable means that once a smart contract is created, it can never be changed again.

play02:35

So no one can go behind your back and tamper with the code of your contract.

play02:40

And being distributed means that the output of your contract is validated by everyone

play02:45

on the network.

play02:46

So a single person cannot force the contract to release the funds because other people

play02:51

on the network will spot this attempt and mark it as invalid.

play02:55

Tampering with smart contracts becomes almost impossible.

play03:00

Smart contracts can be applied to many different things, not just on crowdfunding.

play03:05

Banks could use it to issue loans or to offer automatic payments.

play03:10

Insurance companies could use it to process certain claims.

play03:13

Postal companies could use it for payment on delivery, and so on and so on…

play03:18

So, now you might wonder where and how you can use smart contracts.

play03:23

Right now there are a handful of blockchains who support smart contracts, but the biggest

play03:28

one is Ethereum.

play03:30

It was was specifically created and designed to support smart contracts.

play03:36

They can be programmed in a special programming language called Solidity.

play03:41

This language was specifically created for Ethereum and uses a syntax that resembles

play03:46

Javascript.

play03:48

Its worth noting that Bitcoin also has support for smart contracts although it’s a lot

play03:53

more limited compared to Ethereum.

play03:56

So now you know what smart contracts are and what problem they solve.

play04:00

I hope you enjoyed this video and if you did, hit the like button and get subscribed.

play04:05

And as always: thank you very much for watching!

play04:07

#youtube/simply-explained