SlideShare a Scribd company logo
Demystifying Smart Contracts
Bernard Peh (Founder - Whale Tech)
About Me
201
1
2013 2015 2017
Why Whale Tech?
Whale Tech is an Australian Based Blockchain
development and education company aiming to help
the companies adapt to the new Blockchain revolution.
What is a Smart Contract?
Smart: Digital automation. Disputes is enforced by
code and immutable.
Contract: an agreement between multiple parties
which could be used as evidence should dispute
between the parties arises.
We are living in the world of contracts
We exchange services everyday.
We make agreements - verbal, physical or digital.
Formula for a contract to work
A contract requires 4 criteria in order to work:
● Identity verification
● Immutability Evidence
● Commitment by staking something of value to you
● Enforcement of rightful behaviour.
Blockchain + SC = Matchmate in Heaven
● Blockchain (aka DLT) - Identity and Immutability
● Smart contracts - Staking of value and Rules
enforcement
The Blockchain Revolution
“The technology of tomorrow has expired today.”
•Blockchain 1.0: Store of value (Cryptocurrency). Eg
Bitcoin, Ripple
•Blockchain 2.0: Store of value and Smart Contracts
(Distributed Apps or DAPPS in short). Eg Ethereum,
EOS, Cardano, Neo
•Blockchain 3.0: Store of value, Smart Contracts, IOT,
AI, Scaling solutions and Inter-chain Operability.
3 Types of Smart Contracts
•Value to value: Exchanging one cryptocurrency to
another (ICO, Atomic Swaps)
•Value to Service/Service to Value: Paying a service
with cryptocurrency. Example Smart City parking,
parcel delivery, voting for the next president.
•Service to service: Exchanging a service with another
service. Example creating a website in exchange for
free medical treatment.
Value to Value - Blockbid ICO
Value to Service - Uber Post
Service to Service - Labour exchange
Anatomy of a Smart Contract
•What is the Purpose?
•How to get Commitment from Parties Involved?
•What are the Moving Parts?
•What Constitute a Successful Outcome?
•How to Validate Successful Completion of Task?
•What Constitute an Unsuccessful Outcome?
Anatomy of a Smart Contract
•What Happens After the Deal?
•Any Punishment for Malicious Behaviour?
Upgradable Smart Contracts
Unlike typical Software design, upgrading Smart
Contracts poses many monetary and philosophical
dilemma which puts a lot of stress on Smart Contract
developers to get it right the first time.
Upgradable Smart Contracts
•Pros: Save space. Efficient code. Bug fixes.
•Cons: Break immutability law and decentralisation.
What are people going to think if you have the ability
to upgrade the business rules in the middle of an ICO?
The Dangers
● immeasurable success criteria
● Unexpected behaviours
● Unaudited code (writing test isn’t enough)
● Assets being hacked
● Assets being frozen
The Wins
● Automation: Saves time and money because there
are no middle man.
● Nothing to hid. Contract is open for the public to
scrutinise.
● Forces you to think of all possible outcomes and
things that could go wrong.
● Forces you to define all conditions and play fair.
Blockchain + SC + IOT + AI at work
● Your washing machine has a part that needs repair.
● As your machine is also a node and connected to the
internet, it is also connected to the Blockchain of the
company.
● Your machine creates a Smart Contract onchain
describing the problem and asks for repair quotes
from different vendors also connected to the same
Blockchain.
Blockchain + SC + IOT + AI at work
● Each vendor submits a quote and your Smart
Contract chooses the best quote based on some
intelligent criteria.
● The vendor comes to your house and repair the
machine.
● If Machine is happy with the repair (working for the
next 3 months), it will release the funds in the
Smart Contract to the vendor.
Conclusion
● Plan well ahead before even before starting to code.
Remember its not like building a website where you
can tweak and patch all the time.
● All conditions in the Smart Contracts must be
measurable and codable.
Conclusion
● KISS principle applies. Less ambiguity in
successful/failure conditions -> lesser logic -> lesser
code -> lesser chance to be hacked -> more smiling
faces.

More Related Content

PDF
Blockchaindev #1 - Ethereum Smart Contracts 101
PPTX
Ethereum Smart contracts - Blockchain App Factory
PPTX
Ppt presentation 1
PDF
Ethereum Smart Contracts 101 with Cryptizens.io
PDF
Examples of Smart Contracts
PPTX
What is smart contract and how does it work
PDF
A Complete Guide On Diem Blockchain
PDF
Alexander Shulgin, founder & CEO, Gruppa Kompaniy Familia - What do we mine n...
Blockchaindev #1 - Ethereum Smart Contracts 101
Ethereum Smart contracts - Blockchain App Factory
Ppt presentation 1
Ethereum Smart Contracts 101 with Cryptizens.io
Examples of Smart Contracts
What is smart contract and how does it work
A Complete Guide On Diem Blockchain
Alexander Shulgin, founder & CEO, Gruppa Kompaniy Familia - What do we mine n...

What's hot (20)

PDF
Introduction to Decentralized Finance (DeFi)
PDF
How blockchain enhance accounting profession?
PDF
Disadvantages of Blockchain
PPTX
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
PDF
Overview Of Blockchain Technology And Architecture Powerpoint Presentation Sl...
PDF
Distributed Ledger Technology PowerPoint Presentation Slides
PPTX
Blockcchain development services | codezeros
PPTX
6 blockchain tech trends to check out before seeking blockchain consulting
PPTX
Blockchain in human resource
PPTX
Blockchain in banking sector
PDF
NEO DevCon 2019 - Blockchain Use Cases and Enterprise Needs
PPTX
Smart contracts
PDF
Blockchain Solutions for HR
PDF
List of Top 50 Companies Using Blockchain Technology
PPTX
Various blockchain specialization domains
PPTX
Permissonless & Permissioned blockchain
PDF
Blockchain: A Potential Game-Changer for Life Insurance
PPTX
Blockchain
DOCX
Blockchain use cases
PPTX
Benefits of Applying Blockchain to Claim Processing in Insurance
Introduction to Decentralized Finance (DeFi)
How blockchain enhance accounting profession?
Disadvantages of Blockchain
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
Overview Of Blockchain Technology And Architecture Powerpoint Presentation Sl...
Distributed Ledger Technology PowerPoint Presentation Slides
Blockcchain development services | codezeros
6 blockchain tech trends to check out before seeking blockchain consulting
Blockchain in human resource
Blockchain in banking sector
NEO DevCon 2019 - Blockchain Use Cases and Enterprise Needs
Smart contracts
Blockchain Solutions for HR
List of Top 50 Companies Using Blockchain Technology
Various blockchain specialization domains
Permissonless & Permissioned blockchain
Blockchain: A Potential Game-Changer for Life Insurance
Blockchain
Blockchain use cases
Benefits of Applying Blockchain to Claim Processing in Insurance
Ad

Similar to Demystifying Smart Contracts (20)

PPTX
What Is A Smart Contract, And How Does It Work
PPTX
Do Smart Contract Matter To Become A Blockchain Developer
PPTX
How does smart contract work ?
PPTX
Smart contractjp smartcontract_about
PPTX
Creating Smart Contract
PPTX
PPT Template OK.pptxxnzjajajejewjhqqhqhwhh
PDF
Smart contract development top considerations
PPTX
Smart contracts
PDF
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes & Rule-based Sm...
PPTX
Can smart Contracts Exist without The Blockchain
PDF
Siegel decentral talk
PDF
smart contract and its uses with an example
PPTX
Blockchain smart contracts ethereum smart contract creation
PPTX
How Blockchain is Solving the Pain Points in the Payments Sector.pptx
PDF
The rise of cryptocurrency & smart contract in blockchain industry
PDF
OT_JAN-2017-Issue-59-Opinion-smart-contract
PPTX
BizDay: Truck Wallet, Daimler, KI Decentralized
 
PDF
Smart contract development (1).pdf
PDF
The Benefits Of Smart Contracts Development Explored And Explained
PPTX
How blockchain startups make money?
What Is A Smart Contract, And How Does It Work
Do Smart Contract Matter To Become A Blockchain Developer
How does smart contract work ?
Smart contractjp smartcontract_about
Creating Smart Contract
PPT Template OK.pptxxnzjajajejewjhqqhqhwhh
Smart contract development top considerations
Smart contracts
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes & Rule-based Sm...
Can smart Contracts Exist without The Blockchain
Siegel decentral talk
smart contract and its uses with an example
Blockchain smart contracts ethereum smart contract creation
How Blockchain is Solving the Pain Points in the Payments Sector.pptx
The rise of cryptocurrency & smart contract in blockchain industry
OT_JAN-2017-Issue-59-Opinion-smart-contract
BizDay: Truck Wallet, Daimler, KI Decentralized
 
Smart contract development (1).pdf
The Benefits Of Smart Contracts Development Explored And Explained
How blockchain startups make money?
Ad

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
MYSQL Presentation for SQL database connectivity
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
KodekX | Application Modernization Development
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPT
Teaching material agriculture food technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
sap open course for s4hana steps from ECC to s4
MYSQL Presentation for SQL database connectivity
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
KodekX | Application Modernization Development
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Approach and Philosophy of On baking technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Teaching material agriculture food technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing

Demystifying Smart Contracts

  • 1. Demystifying Smart Contracts Bernard Peh (Founder - Whale Tech)
  • 3. Why Whale Tech? Whale Tech is an Australian Based Blockchain development and education company aiming to help the companies adapt to the new Blockchain revolution.
  • 4. What is a Smart Contract? Smart: Digital automation. Disputes is enforced by code and immutable. Contract: an agreement between multiple parties which could be used as evidence should dispute between the parties arises.
  • 5. We are living in the world of contracts We exchange services everyday. We make agreements - verbal, physical or digital.
  • 6. Formula for a contract to work A contract requires 4 criteria in order to work: ● Identity verification ● Immutability Evidence ● Commitment by staking something of value to you ● Enforcement of rightful behaviour.
  • 7. Blockchain + SC = Matchmate in Heaven ● Blockchain (aka DLT) - Identity and Immutability ● Smart contracts - Staking of value and Rules enforcement
  • 8. The Blockchain Revolution “The technology of tomorrow has expired today.” •Blockchain 1.0: Store of value (Cryptocurrency). Eg Bitcoin, Ripple •Blockchain 2.0: Store of value and Smart Contracts (Distributed Apps or DAPPS in short). Eg Ethereum, EOS, Cardano, Neo •Blockchain 3.0: Store of value, Smart Contracts, IOT, AI, Scaling solutions and Inter-chain Operability.
  • 9. 3 Types of Smart Contracts •Value to value: Exchanging one cryptocurrency to another (ICO, Atomic Swaps) •Value to Service/Service to Value: Paying a service with cryptocurrency. Example Smart City parking, parcel delivery, voting for the next president. •Service to service: Exchanging a service with another service. Example creating a website in exchange for free medical treatment.
  • 10. Value to Value - Blockbid ICO
  • 11. Value to Service - Uber Post
  • 12. Service to Service - Labour exchange
  • 13. Anatomy of a Smart Contract •What is the Purpose? •How to get Commitment from Parties Involved? •What are the Moving Parts? •What Constitute a Successful Outcome? •How to Validate Successful Completion of Task? •What Constitute an Unsuccessful Outcome?
  • 14. Anatomy of a Smart Contract •What Happens After the Deal? •Any Punishment for Malicious Behaviour?
  • 15. Upgradable Smart Contracts Unlike typical Software design, upgrading Smart Contracts poses many monetary and philosophical dilemma which puts a lot of stress on Smart Contract developers to get it right the first time.
  • 16. Upgradable Smart Contracts •Pros: Save space. Efficient code. Bug fixes. •Cons: Break immutability law and decentralisation. What are people going to think if you have the ability to upgrade the business rules in the middle of an ICO?
  • 17. The Dangers ● immeasurable success criteria ● Unexpected behaviours ● Unaudited code (writing test isn’t enough) ● Assets being hacked ● Assets being frozen
  • 18. The Wins ● Automation: Saves time and money because there are no middle man. ● Nothing to hid. Contract is open for the public to scrutinise. ● Forces you to think of all possible outcomes and things that could go wrong. ● Forces you to define all conditions and play fair.
  • 19. Blockchain + SC + IOT + AI at work ● Your washing machine has a part that needs repair. ● As your machine is also a node and connected to the internet, it is also connected to the Blockchain of the company. ● Your machine creates a Smart Contract onchain describing the problem and asks for repair quotes from different vendors also connected to the same Blockchain.
  • 20. Blockchain + SC + IOT + AI at work ● Each vendor submits a quote and your Smart Contract chooses the best quote based on some intelligent criteria. ● The vendor comes to your house and repair the machine. ● If Machine is happy with the repair (working for the next 3 months), it will release the funds in the Smart Contract to the vendor.
  • 21. Conclusion ● Plan well ahead before even before starting to code. Remember its not like building a website where you can tweak and patch all the time. ● All conditions in the Smart Contracts must be measurable and codable.
  • 22. Conclusion ● KISS principle applies. Less ambiguity in successful/failure conditions -> lesser logic -> lesser code -> lesser chance to be hacked -> more smiling faces.

Editor's Notes

  • #4: Today many people mix blockchain smart contract together but the fact is they are 2 different technologies. We’ll talk about blockchain later but we’ll be focusing on Smart contract in this seminar.
  • #5: A Smart contract is just a digital contract enforced digitally.
  • #6: You exchange money for food You exchange time and energy for knowledge You exchange your life for someone you love.
  • #7: Take marriage for example, its a contract between 2 person. To get married, you will need 1) Your identity card/Passport 2) Immutable proof like Witness, certificates, ring. 3) Shown commitment: Staking your time and money in your partner. 4) You can’t marry someone else unless you are divorced.
  • #8: We will be covering some basic terminologies like centralised and decentralised exchanges, soft and hard fork and most important, know how to use a hardware wallet.
  • #9: Blockchain 1.0 - 2009. (bitcoin) Blockchain 2.0 - 2014. (ethereum)
  • #11: Buy other tokens for Ethereum. It is sad that more and more ico are not using smart contracts for ICO because that means no transparency.
  • #14: Things to consider when writing smart contracts
  • #15: Things to consider when writing smart contracts
  • #22: If you are a smart contract developer, make sure all the conditions are well defined before starting to code. And always get an auditor
  • #23: If you are a smart contract developer, make sure all the conditions are well defined before starting to code. And always get an auditor