SlideShare a Scribd company logo
Get smarter on
smart contracts
Thomas Vanderstraeten
https://cryptizens.io
hello@cryptizens.io
Starter quiz: where’s the fake blockchain project?
2© Cryptizens.io
The plan: go through this together
A sense of how blockchain can run applications
A refresher about blockchain
A point of view on smart contracts biz implications
A ‘get-your-hands-dirty’ exercise
3© Cryptizens.io
Blockchain refresher: what lies beyond the buzz?
A DATABASE OF TRANSACTIONS (= LEDGER)
ORGANIZED BY BLOCKS IN A SEQUENTIAL WAY (= CHAIN OF BLOCKS),
SECURED SO IT CANNOT BE COUNTERFEITED (= CRYPTO-MINED),
AND REPLICATED ACROSS MANY COMPUTERS (= DISTRIBUTED)
4© Cryptizens.io
A database of transactions
Transactions
DB
Alice sends 3 BTC to Bob
Bob sends 5 BTC to Jeff
Kim sends 1 BTC to Alice
5© Cryptizens.io
Organized by blocks in a sequential way
Block N - 2
before
Jeff sends 1 BTC to Alice
Bob sends 1 BTC to Kim
Alice sends 1 BTC to Bob
Block N - 1
yesterdayDB
Alice sends 3 BTC to Bob
Bob sends 5 BTC to Jeff
Kim sends 1 BTC to Alice
Block N
today
6© Cryptizens.io
Secured so it cannot be counterfeited
Block N - 2
before
Block N - 1
yesterday
Block N
today
Transactions
Alice sends 3 BTC to Bob
Bob sends 5 BTC to Jeff
Kim sends 1 BTC to Alice
Transactions
Alice sends 3 BTC to Bob
Bob sends 6 BTC to Jeff
Kim sends 1 BTC to Alice
7© Cryptizens.io
Replicated across many computers
Alice’s
computer
DB
Jeff’s
computer
DB
Charles’s
computer
DB
Bob’s
computer
DB
Kim’s
computer
DB
8© Cryptizens.io
Blockchain’s resulting properties in a nutshell
Transparency
& auditability
Immutability
Decentralization
Common single
source of truth
Desintermediation
9© Cryptizens.io
In 2013, this guy created a blockchain to run apps
I’ve got a nice t-shirt, but what
about something nicer yet?
Let’s leverage blockchain’s
properties to run applications
called smart contracts!
Vitalik Buterin, Ethereum blockchain creator
10© Cryptizens.io
What is an app, fundamentally?
Data
base
Server
that runs
code
End-user
interface
Simple Web application architecture
11© Cryptizens.io
So, how can we use the blockchain to run apps?
Transactions
Alice sends 1 ETH
to CryptoKitties.co
DB
Start from a simple
‘financial transactions’
blockchain...
State of the world
Kitty_owner = Alice
Kitty_hungry = true
Transactions
Alice sends 1 ETH
to CryptoKitties.co
DB
...add general purpose
storage to play with
variables...
State of the world
Kitty_owner = Alice
Kitty_hungry = true
Transactions
- Alice sends 1 ETH to
CryptoKitties.co
- Alice feeds the cat
Functions
feedCat(cost = 0.5 ETH)
buyCat(cost = 1 ETH)
VM
DBSmart contract
...add functions to modify
these variables, and a
virtual machine to run these
functions...
© Cryptizens.io
Smart contract
State of the world
Kitty_owner = Alice
Kitty_hungry = true
Transactions
- Alice sends 1 ETH to
CryptoKitties.co
- Alice feeds the cat
Functions
feedCat(cost = 0.5 ETH)
buyCat(cost = 1 ETH)
VM
DB
Website interface
feed buy
WebBlockchain
...add a sexy web front-end to
trigger these functions, and
you’re done!
Decentralized App (Dapp)
UI
12
Blockchain properties can thus be leveraged for apps!
Transparency
& auditability
Immutability
Decentralization
Common single
source of truth
Desintermediation
Everyone sees the
application code,
so no malicious
features can be
hidden
No one can alter the
the code after it has
been deployed
All participate in
the running of the
application
No single
stakeholder owns
the app for their
single benefit
All can agree on
a common set of
functions and
data
SMART
CONTRACT
13© Cryptizens.io
TECHNICAL POINT OF VIEW
And that’s how the term ‘smart contract’ was coined
SMART
CONTRACT
It not only
documents the
agreement, but
also enforces it
(code execution)
Cannot be
changed once it
has been signed
(deployed on the
blockchain)
Documents an
agreement
(implements a series
of functions with
triggers and effects)
Is public and
auditable for all
stakeholders
(distributed on the
blockchain)
Basically, just a computer
program (running on the
Ethereum virtual machine)
14© Cryptizens.io
BUSINESS POINT OF VIEW
Smart contracts applied to business: a lottery
Organizer
Participants
WITHOUT SMART CONTRACT
Payment provider
Escrow account
Lottery
Terms &
conditions
Company
statuses
Payments
Terms &
conditions
Winner pick
15© Cryptizens.io
We’ve built a complex ecosystem
of stakeholders, laws, processes
and documents to embed TRUST
in interactions, and protect people
in case of breaches!
Smart contracts applied to business: a lottery
Participants 16© Cryptizens.io
SMART
CONTRACT
Organizer
Who cares about trust? Smart
contracts technology allows us to
interact in a TRUSTLESS way,
where technology prevents
breaches of agreements! Meow!
WITH SMART CONTRACT
A real-life insurance smart contract: AXA Fizzy
17© Cryptizens.io
Oops...
My nonprofit smart contract venture: Cryptorun
60 KM around Brussels
SMART
CONTRACT
if ThomasHasRun60Km {
sendFundsToBeCode();
}
18© Cryptizens.io
A critical look at smart contracts business use
Still hard to connect to the outside world
without losing trust
Smart contract engineers might become the
lawyers of tomorrow
Immutability goes against lean development
Infancy issues (scalability, reliability)
? But yet, so much potential!
19© Cryptizens.io
Now, let’s get our hands dirty!
https://etherlearn.io
20© Cryptizens.io
First thing first: get some free (test) Ether!
21© Cryptizens.io
Install Metamask
wallet
Note your Rinkeby
account address
Post your address
on Google+
Paste the G+ post
link in the faucet
metamask.io plus.google.com faucet.rinkeby.io
1 2 3 4
=> then, restart
your browser!
And now, let’s deploy!
22© Cryptizens.io
Go on Etherlearn Click on deploy Check Etherscan Interact with it
1 2 3 4
etherlearn.io etherlearn.io rinkeby.etherscan.io etherlearn.io
Ethereum Smart Contracts 101 with Cryptizens.io

More Related Content

PPTX
What is smart contract and how does it work
PDF
Alexander Shulgin, founder & CEO, Gruppa Kompaniy Familia - What do we mine n...
PPTX
Demystifying Smart Contracts
PDF
The State of Blockchains Q1 2018
PDF
How Blockchain could disrupt the advertising industry
PPTX
6 blockchain tech trends to check out before seeking blockchain consulting
PPTX
Smart contract
PPTX
Distributed ledger technology (dlt) blockchain creation
What is smart contract and how does it work
Alexander Shulgin, founder & CEO, Gruppa Kompaniy Familia - What do we mine n...
Demystifying Smart Contracts
The State of Blockchains Q1 2018
How Blockchain could disrupt the advertising industry
6 blockchain tech trends to check out before seeking blockchain consulting
Smart contract
Distributed ledger technology (dlt) blockchain creation

What's hot (20)

PPTX
Blockcchain development services | codezeros
PDF
Blockchain for Marketing & Insights
PDF
Blockchaindev #1 - Ethereum Smart Contracts 101
PPTX
Ppt presentation 1
PPTX
Smart Contract Audit Services | Smart Contracts Development Company
PPTX
Enterprise blockchain| Blockchain as a Service| Blockchain Disruption| Blockc...
PPTX
Blockchain in insurance
PDF
The impact of AI and Blockchain technologies in the Legal Industry
PDF
A Complete Guide On Diem Blockchain
PPTX
What is a blockchain wallet
PDF
Introduction to Decentralized Finance (DeFi)
PDF
Blockchain Technology in Insurance Vertical
PDF
Top 10 Reasons to Learn Blockchain | Blockchain Training | Blockchain Tutoria...
PDF
Blockchain @ Insurance Analytics Summit Canada
PPTX
Benefits of Applying Blockchain to Claim Processing in Insurance
PPTX
How Can Blockchain Accelerate Insurance Workflows
PPTX
Blockchain use cases in 2022 real world industry applications
PPTX
Blockchain applications 15 killer concepts for you
PDF
Doing Business of Blockchain in India
PPTX
Blockchain point of view for the telco, media and entertainment industry
Blockcchain development services | codezeros
Blockchain for Marketing & Insights
Blockchaindev #1 - Ethereum Smart Contracts 101
Ppt presentation 1
Smart Contract Audit Services | Smart Contracts Development Company
Enterprise blockchain| Blockchain as a Service| Blockchain Disruption| Blockc...
Blockchain in insurance
The impact of AI and Blockchain technologies in the Legal Industry
A Complete Guide On Diem Blockchain
What is a blockchain wallet
Introduction to Decentralized Finance (DeFi)
Blockchain Technology in Insurance Vertical
Top 10 Reasons to Learn Blockchain | Blockchain Training | Blockchain Tutoria...
Blockchain @ Insurance Analytics Summit Canada
Benefits of Applying Blockchain to Claim Processing in Insurance
How Can Blockchain Accelerate Insurance Workflows
Blockchain use cases in 2022 real world industry applications
Blockchain applications 15 killer concepts for you
Doing Business of Blockchain in India
Blockchain point of view for the telco, media and entertainment industry
Ad

Similar to Ethereum Smart Contracts 101 with Cryptizens.io (20)

PPTX
Blockchain.pptx
PDF
20170620 MEETUP intro to blockchain and smart contracts (1)
PDF
CWIN17 Rome / blockchain
PPTX
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
PDF
Paradigm shift: from the bitcoin Blockchain to Networked Computing
PDF
PPTX
BlockChain for the Banker
PDF
Blockchain External.pdf
PDF
Executive summary guild42 elca_blockchain.pptx_v1.0
PPTX
Blockchain Tokenization
PPTX
Blockchain, smart contracts - introduction
PPTX
Blockchain Technology and Cryptocurrency
PPTX
Blockchain an introduction_n_li
PPTX
An Introduction to Blockchains
PPTX
Webinar on BITCOIN FORENSICS : BRIGHTTALK
PPTX
Kriptovaluták, hashbányászat és okoscicák
PPTX
Blockchain Essentials and Blockchain on Azure
PDF
Introduction to Bitcoin & Blockchain @ darefest16
PPTX
BITCOIN TECHNOLOGY AND ITS USES
PPTX
Blockchain as a new cyber strategy for your business
Blockchain.pptx
20170620 MEETUP intro to blockchain and smart contracts (1)
CWIN17 Rome / blockchain
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Paradigm shift: from the bitcoin Blockchain to Networked Computing
BlockChain for the Banker
Blockchain External.pdf
Executive summary guild42 elca_blockchain.pptx_v1.0
Blockchain Tokenization
Blockchain, smart contracts - introduction
Blockchain Technology and Cryptocurrency
Blockchain an introduction_n_li
An Introduction to Blockchains
Webinar on BITCOIN FORENSICS : BRIGHTTALK
Kriptovaluták, hashbányászat és okoscicák
Blockchain Essentials and Blockchain on Azure
Introduction to Bitcoin & Blockchain @ darefest16
BITCOIN TECHNOLOGY AND ITS USES
Blockchain as a new cyber strategy for your business
Ad

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
MYSQL Presentation for SQL database connectivity
PDF
cuic standard and advanced reporting.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
The AUB Centre for AI in Media Proposal.docx
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Understanding_Digital_Forensics_Presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
NewMind AI Weekly Chronicles - August'25 Week I
Chapter 3 Spatial Domain Image Processing.pdf
Electronic commerce courselecture one. Pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
“AI and Expert System Decision Support & Business Intelligence Systems”
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Spectral efficient network and resource selection model in 5G networks
Mobile App Security Testing_ A Comprehensive Guide.pdf

Ethereum Smart Contracts 101 with Cryptizens.io

  • 1. Get smarter on smart contracts Thomas Vanderstraeten https://cryptizens.io hello@cryptizens.io
  • 2. Starter quiz: where’s the fake blockchain project? 2© Cryptizens.io
  • 3. The plan: go through this together A sense of how blockchain can run applications A refresher about blockchain A point of view on smart contracts biz implications A ‘get-your-hands-dirty’ exercise 3© Cryptizens.io
  • 4. Blockchain refresher: what lies beyond the buzz? A DATABASE OF TRANSACTIONS (= LEDGER) ORGANIZED BY BLOCKS IN A SEQUENTIAL WAY (= CHAIN OF BLOCKS), SECURED SO IT CANNOT BE COUNTERFEITED (= CRYPTO-MINED), AND REPLICATED ACROSS MANY COMPUTERS (= DISTRIBUTED) 4© Cryptizens.io
  • 5. A database of transactions Transactions DB Alice sends 3 BTC to Bob Bob sends 5 BTC to Jeff Kim sends 1 BTC to Alice 5© Cryptizens.io
  • 6. Organized by blocks in a sequential way Block N - 2 before Jeff sends 1 BTC to Alice Bob sends 1 BTC to Kim Alice sends 1 BTC to Bob Block N - 1 yesterdayDB Alice sends 3 BTC to Bob Bob sends 5 BTC to Jeff Kim sends 1 BTC to Alice Block N today 6© Cryptizens.io
  • 7. Secured so it cannot be counterfeited Block N - 2 before Block N - 1 yesterday Block N today Transactions Alice sends 3 BTC to Bob Bob sends 5 BTC to Jeff Kim sends 1 BTC to Alice Transactions Alice sends 3 BTC to Bob Bob sends 6 BTC to Jeff Kim sends 1 BTC to Alice 7© Cryptizens.io
  • 8. Replicated across many computers Alice’s computer DB Jeff’s computer DB Charles’s computer DB Bob’s computer DB Kim’s computer DB 8© Cryptizens.io
  • 9. Blockchain’s resulting properties in a nutshell Transparency & auditability Immutability Decentralization Common single source of truth Desintermediation 9© Cryptizens.io
  • 10. In 2013, this guy created a blockchain to run apps I’ve got a nice t-shirt, but what about something nicer yet? Let’s leverage blockchain’s properties to run applications called smart contracts! Vitalik Buterin, Ethereum blockchain creator 10© Cryptizens.io
  • 11. What is an app, fundamentally? Data base Server that runs code End-user interface Simple Web application architecture 11© Cryptizens.io
  • 12. So, how can we use the blockchain to run apps? Transactions Alice sends 1 ETH to CryptoKitties.co DB Start from a simple ‘financial transactions’ blockchain... State of the world Kitty_owner = Alice Kitty_hungry = true Transactions Alice sends 1 ETH to CryptoKitties.co DB ...add general purpose storage to play with variables... State of the world Kitty_owner = Alice Kitty_hungry = true Transactions - Alice sends 1 ETH to CryptoKitties.co - Alice feeds the cat Functions feedCat(cost = 0.5 ETH) buyCat(cost = 1 ETH) VM DBSmart contract ...add functions to modify these variables, and a virtual machine to run these functions... © Cryptizens.io Smart contract State of the world Kitty_owner = Alice Kitty_hungry = true Transactions - Alice sends 1 ETH to CryptoKitties.co - Alice feeds the cat Functions feedCat(cost = 0.5 ETH) buyCat(cost = 1 ETH) VM DB Website interface feed buy WebBlockchain ...add a sexy web front-end to trigger these functions, and you’re done! Decentralized App (Dapp) UI 12
  • 13. Blockchain properties can thus be leveraged for apps! Transparency & auditability Immutability Decentralization Common single source of truth Desintermediation Everyone sees the application code, so no malicious features can be hidden No one can alter the the code after it has been deployed All participate in the running of the application No single stakeholder owns the app for their single benefit All can agree on a common set of functions and data SMART CONTRACT 13© Cryptizens.io TECHNICAL POINT OF VIEW
  • 14. And that’s how the term ‘smart contract’ was coined SMART CONTRACT It not only documents the agreement, but also enforces it (code execution) Cannot be changed once it has been signed (deployed on the blockchain) Documents an agreement (implements a series of functions with triggers and effects) Is public and auditable for all stakeholders (distributed on the blockchain) Basically, just a computer program (running on the Ethereum virtual machine) 14© Cryptizens.io BUSINESS POINT OF VIEW
  • 15. Smart contracts applied to business: a lottery Organizer Participants WITHOUT SMART CONTRACT Payment provider Escrow account Lottery Terms & conditions Company statuses Payments Terms & conditions Winner pick 15© Cryptizens.io We’ve built a complex ecosystem of stakeholders, laws, processes and documents to embed TRUST in interactions, and protect people in case of breaches!
  • 16. Smart contracts applied to business: a lottery Participants 16© Cryptizens.io SMART CONTRACT Organizer Who cares about trust? Smart contracts technology allows us to interact in a TRUSTLESS way, where technology prevents breaches of agreements! Meow! WITH SMART CONTRACT
  • 17. A real-life insurance smart contract: AXA Fizzy 17© Cryptizens.io Oops...
  • 18. My nonprofit smart contract venture: Cryptorun 60 KM around Brussels SMART CONTRACT if ThomasHasRun60Km { sendFundsToBeCode(); } 18© Cryptizens.io
  • 19. A critical look at smart contracts business use Still hard to connect to the outside world without losing trust Smart contract engineers might become the lawyers of tomorrow Immutability goes against lean development Infancy issues (scalability, reliability) ? But yet, so much potential! 19© Cryptizens.io
  • 20. Now, let’s get our hands dirty! https://etherlearn.io 20© Cryptizens.io
  • 21. First thing first: get some free (test) Ether! 21© Cryptizens.io Install Metamask wallet Note your Rinkeby account address Post your address on Google+ Paste the G+ post link in the faucet metamask.io plus.google.com faucet.rinkeby.io 1 2 3 4 => then, restart your browser!
  • 22. And now, let’s deploy! 22© Cryptizens.io Go on Etherlearn Click on deploy Check Etherscan Interact with it 1 2 3 4 etherlearn.io etherlearn.io rinkeby.etherscan.io etherlearn.io