Smart Contracts 101

Polkadot Smart Contracts


About Me

Screenshot 2023-11-01 at 21.21.06.jpeg|300


What is a Smart Contract

Blockchain models that we can think of:

Note:

First is utter BS
Second is accurate, but a bit to math-y
Third one is accurate, and one that most people relate to, we will use this one

--

What is a Smart Contract

Aside: The main novelty of a computer is that it will execute code correctly, and therefore you can TRUST the memory. 🪄

--

What is a Smart Contract

Note:

First blockchains were computers with a (almost) fixed code. Bitcoin's code is ONLY how to do transfer of BTC, and therefore the State of the Bitcoin computer was only user balances. Nothing more.

--

What is a Smart Contract

--

What is a Smart Contract

--

What is a Smart Contract

contracts_compilation.png

--

What is a Smart Contract

--

What is a Smart Contract


Ethereum Contracts

A Smart Contract has:

Note:

Bringing it all together


Case Study

Simple Escrow Contract

--

Case Study

Web3 Roulette


How to Write a Contract

Note:

EVM: Ethereum Virtual Machine


How to Execute a Contract

If Ethereum wants to execute a totally untrusted code, what challenges does it have?

--

How to Execute a Contract

--

Extending Memory

What about the fact that a contract can add more data to its own memory, which in turn bloats the overall blockchain memory?

--

Other Properties of Contracts


Smart Contracts in Polkadot


Polkadot


Past

Note:

Both of these initiated in Parity, but are pursued as community projects now.


Now

--

Now

Outcome: Polkadot will have fast Solidity-compatible Smart Contracts in H2 2025


Outro


Questions