SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
ETHEREUM SMART
CONTRACTS 101
MEETUP #1
1
ETHEREUM SMART CONTRACTS 101
SUMMARY
▸ About us
▸ Cryptocurrencies - Some Context
▸ Bitcoin
▸ Ethereum
▸ Applications
▸ Smart Contracts and Gas
▸ Create your own contract
▸ ERC20 tokens
▸ Tools
▸ Recap
ETHEREUM SMART CONTRACTS 101
BLOCKCHAINDEV MEETUPS
▸ Focused on blockchain technologies
▸ Knowledge-sharing and learning
▸ Beginner friendly
CRYPTOCURRENCIES
SOME CONTEXT
ETHEREUM SMART CONTRACTS 101
CRYPTOCURRENCIES - SOME CONTEXT
▸ Cypherpunk Movement (started in the 80s)
▸ Activists, programmers, hackers, researchers,
mathematicians, …
▸ Advocated the use of strong cryptography and privacy
enhancing technologies as a route to social and political
change.
ETHEREUM SMART CONTRACTS 101
CRYPTOCURRENCIES - SOME CONTEXT
▸ Financial Crisis of 2007-2008
▸ During the last quarter of 2008, central banks purchased
US$2.5 trillion of government debt and troubled private
assets from banks
BITCOIN
A P2P ELECTRONIC
CASH SYSTEM
ETHEREUM SMART CONTRACTS 101
October, 2008
ETHEREUM SMART CONTRACTS 101
October, 2008
ETHEREUM SMART CONTRACTS 101
BITCOIN
▸ Decentralized P2P
▸ No need for banks
▸ Limited supply
▸ Strong protection of your digital assets
ETHEREUM SMART CONTRACTS 101
BITCOIN
▸ Sign transactions with a digital signature
▸ Transactions are stored in a blockchain
▸ A consensus algorithm run on the network to verify the
validity of the transactions (proof-of-work)
▸ Transactions are non-reversible
ETHEREUM SMART CONTRACTS 101
BLOCKCHAIN
▸ Database
▸ Distributed
▸ Decentralized
▸ Immutable (write once, append only)
▸ Public (or private)
▸ Stores transactions
ETHEREUM SMART CONTRACTS 101
A blockchain (https://www.computerworld.com/article/3191077/
security/what-is-blockchain-the-most-disruptive-tech-in-decades.html)
ETHEREUM SMART CONTRACTS 101
DECENTRALIZED AND DISTRIBUTED NETWORK
ETHEREUM SMART CONTRACTS 101
NETWORK
▸ Executes code
▸ Validates transactions (consensus)
▸ Mines new blocks
▸ Stores the blockchain
▸ Application infrastructure / supercomputer
ETHEREUM
DECENTRALIZED
APPLICATION PLATFORM
ETHEREUM SMART CONTRACTS 101
Ethereum White Paper (2013)
ETHEREUM SMART CONTRACTS 101
Vitalik Buterin
ETHEREUM SMART CONTRACTS 101
WHAT IS ETHEREUM ANYWAY?
▸ A cryptocurrency (ETH), but more!
▸ A platform for developing and running decentralized
applications
ETHEREUM SMART CONTRACTS 101
WHAT IS ETHEREUM ANYWAY?
▸ Virtual Machine (EVM)
▸ A programming language
▸ A blockchain for state transitions
▸ A “world computer”
ETHEREUM SMART CONTRACTS 101
ETHEREUM: A WORLD COMPUTER
▸ Arbitrary code is executed on the network
▸ You can run your code by creating a Smart Contract
▸ Contracts alter the state of the blockchain
ETHEREUM SMART CONTRACTS 101
APPLICATIONS
▸ Financial
▸ Semi-financial
▸ Non-financial
ETHEREUM SMART CONTRACTS 101
FINANCIAL APPLICATIONS
▸ Payments
▸ Sub-currencies and tokens
▸ Initial Coin Offering (ICOs)
▸ Smart Property
▸ Banking and Trading (derivatives, hedging contracts,
currency, futures, digital assets)
ETHEREUM SMART CONTRACTS 101
SEMI-FINANCIAL APPLICATIONS
▸ Bounties
▸ Coupons, any type of miles
▸ Gambling
▸ Marketplaces and Monetization
ETHEREUM SMART CONTRACTS 101
NON-FINANCIAL APPLICATIONS
▸ Reputation and identity
▸ Decentralized Autonomous Organizations (DAOs)
▸ Voting
▸ Games (cryptokitties)
▸ Decentralized file storage
ALSO, MEMES…
SMART CONTRACTS
HOW TO RUN YOUR CODE ON THE EVM
ETHEREUM SMART CONTRACTS 101
SMART CONTRACTS
▸ Computerized transaction protocol that executes the terms
of a contract
▸ A contract is defined as a piece of code
▸ Self-executing contract
▸ You can create use it as a backend for your dapps
ETHEREUM SMART CONTRACTS 101
SMART CONTRACTS
▸ Your smart contract will contain instructions
▸ The code is also stored on the blockchain
▸ The execution of the code can create transactions and a
new state of the blockchain
ETHEREUM AND CRYPTO-LAW: USES
BLOCKCHAIN TO IMPLEMENT
ARBITRARY SOCIAL CONTRACTS
WITHOUT A CENTRAL SERVER
Dr. Gavin Wood
ETHEREUM SMART CONTRACTS 101
ETHEREUM SMART CONTRACTS 101
GAS
▸ Execution fee or cost
▸ Reading information is free
▸ Changing data/creating transactions costs gas
▸ You pay gas to the network
ETHEREUM SMART CONTRACTS 101
GAS
▸ Incentive for nodes to run your code and store your data
▸ Code must be efficient (time + space complexity) to
optimize the costs
▸ Different instructions have different costs
▸ You can add more gas to your transactions to have a
higher priority
ETHEREUM SMART CONTRACTS 101
EXAMPLES OF INSTRUCTIONS AND THEIR GAS PRICES
▸ Calculating a hash
▸ Multiplying two numbers
▸ See link
GETTING STARTED
ETHEREUM SMART CONTRACTS 101
CREATING A SMART CONTRACT
▸ Install Metamask and create a wallet
▸ Use the Rinkeby test network
▸ Get some fake ether @ rinkeby faucet
▸ Open remix and create your contract
▸ Deploy on (injected web3) and check etherscan.io!
▸ Also check web3.js
ETHEREUM SMART CONTRACTS 101
ERC20 TOKEN STANDARD
▸ Read the ERC20 Token Standard
▸ Implement the EIP20Interface to create your own token
ETHEREUM SMART CONTRACTS 101
OTHER TOOLS YOU CAN USE
▸ GETH: command line interface + ethereum node
▸ Drizzle: front-end libs for dapps
▸ Truffle: development environment for ethereum
▸ Ganache: run your personal blockchain
ETHEREUM SMART CONTRACTS 101
RECAP
▸ Decentralization is good!
▸ You can create your own Smart contracts and dapps to run
on the ethereum network
▸ Create your own tokens by implementing the EIP20
interface
▸ Use web3js on the frontend (ethereum js api)
KTHXBYE
Thiago Araujo
@thdaraujo (twitter)
thd.araujo@gmail.com
aleph.uno (blog)

Weitere ähnliche Inhalte

Was ist angesagt?

Blockchain Fundamentals - Top Rated for Beginners
Blockchain Fundamentals - Top Rated for Beginners Blockchain Fundamentals - Top Rated for Beginners
Blockchain Fundamentals - Top Rated for Beginners 101 Blockchains
 
Blockchain Technology | Blockchain Explained | Blockchain Tutorial | Blockcha...
Blockchain Technology | Blockchain Explained | Blockchain Tutorial | Blockcha...Blockchain Technology | Blockchain Explained | Blockchain Tutorial | Blockcha...
Blockchain Technology | Blockchain Explained | Blockchain Tutorial | Blockcha...Edureka!
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain TechnologyRashi Singh
 
Blockchain Technology Fundamentals
Blockchain Technology FundamentalsBlockchain Technology Fundamentals
Blockchain Technology FundamentalsExperfy
 
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...Edureka!
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsTechracers
 
Write smart contract with solidity on Ethereum
Write smart contract with solidity on EthereumWrite smart contract with solidity on Ethereum
Write smart contract with solidity on EthereumMurughan Palaniachari
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technologyAayt Bahaa
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to BlockchainMalak Abu Hammad
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and BitcoinHugo Rodrigues
 
Everything Blockchain Presentation - Feb 2022
Everything Blockchain Presentation -  Feb 2022Everything Blockchain Presentation -  Feb 2022
Everything Blockchain Presentation - Feb 2022RedChip Companies, Inc.
 

Was ist angesagt? (20)

Blockchain
BlockchainBlockchain
Blockchain
 
Hyperledger Fabric
Hyperledger FabricHyperledger Fabric
Hyperledger Fabric
 
Blockchain Fundamentals - Top Rated for Beginners
Blockchain Fundamentals - Top Rated for Beginners Blockchain Fundamentals - Top Rated for Beginners
Blockchain Fundamentals - Top Rated for Beginners
 
Blockchain
BlockchainBlockchain
Blockchain
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Blockchain Technology | Blockchain Explained | Blockchain Tutorial | Blockcha...
Blockchain Technology | Blockchain Explained | Blockchain Tutorial | Blockcha...Blockchain Technology | Blockchain Explained | Blockchain Tutorial | Blockcha...
Blockchain Technology | Blockchain Explained | Blockchain Tutorial | Blockcha...
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Blockchain Technology Fundamentals
Blockchain Technology FundamentalsBlockchain Technology Fundamentals
Blockchain Technology Fundamentals
 
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
 
Write smart contract with solidity on Ethereum
Write smart contract with solidity on EthereumWrite smart contract with solidity on Ethereum
Write smart contract with solidity on Ethereum
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
 
What is Block chain
What is Block chain What is Block chain
What is Block chain
 
Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum) Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum)
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Blockchain and Bitcoin
Blockchain and BitcoinBlockchain and Bitcoin
Blockchain and Bitcoin
 
Everything Blockchain Presentation - Feb 2022
Everything Blockchain Presentation -  Feb 2022Everything Blockchain Presentation -  Feb 2022
Everything Blockchain Presentation - Feb 2022
 
Smart contracts & dApps
Smart contracts & dAppsSmart contracts & dApps
Smart contracts & dApps
 

Ähnlich wie Blockchaindev #1 - Ethereum Smart Contracts 101

Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractVaideeswaran Sethuraman
 
solutions.hamburg | web3 // smart contracts // ethereum
solutions.hamburg | web3 // smart contracts // ethereumsolutions.hamburg | web3 // smart contracts // ethereum
solutions.hamburg | web3 // smart contracts // ethereumMaximilian Reichel
 
Blockchain, smart contracts - introduction
Blockchain, smart contracts - introductionBlockchain, smart contracts - introduction
Blockchain, smart contracts - introductionLukasz Jarmulowicz
 
Blockchain presentation to isaca (kemp)
Blockchain presentation to isaca (kemp)Blockchain presentation to isaca (kemp)
Blockchain presentation to isaca (kemp)Milan Hazra
 
Impact of Blockchain on IT AuditBlockchain Techn.docx
Impact of Blockchain on IT AuditBlockchain Techn.docxImpact of Blockchain on IT AuditBlockchain Techn.docx
Impact of Blockchain on IT AuditBlockchain Techn.docxsheronlewthwaite
 
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánEvent Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánJuan Ignacio Pérez Sacristán
 
Hacking Finance: Crypto & Math based Currencies, Smart contracts and Blockch...
Hacking Finance: Crypto & Math based Currencies, Smart contracts  and Blockch...Hacking Finance: Crypto & Math based Currencies, Smart contracts  and Blockch...
Hacking Finance: Crypto & Math based Currencies, Smart contracts and Blockch...Raffaele Mauro
 
Introduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxIntroduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxGene Leybzon
 
Introduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart ContractIntroduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart ContractThanh Nguyen
 
Neo - Smart Economy
Neo - Smart EconomyNeo - Smart Economy
Neo - Smart EconomyAnurag Kumar
 
Distributed Ledgers, Blockchains, and Smart Contracts
Distributed Ledgers, Blockchains, and Smart ContractsDistributed Ledgers, Blockchains, and Smart Contracts
Distributed Ledgers, Blockchains, and Smart ContractsDusan Andric
 
Smart contractjp smartcontract_about
Smart contractjp smartcontract_aboutSmart contractjp smartcontract_about
Smart contractjp smartcontract_aboutTomoaki Sato
 
Creating Smart Contract
Creating Smart ContractCreating Smart Contract
Creating Smart ContractDeepak Aryal
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Tomoaki Sato
 
Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3Prithwis Mukerjee
 

Ähnlich wie Blockchaindev #1 - Ethereum Smart Contracts 101 (20)

Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
 
solutions.hamburg | web3 // smart contracts // ethereum
solutions.hamburg | web3 // smart contracts // ethereumsolutions.hamburg | web3 // smart contracts // ethereum
solutions.hamburg | web3 // smart contracts // ethereum
 
Blockchain for Notaries
Blockchain for NotariesBlockchain for Notaries
Blockchain for Notaries
 
Writing smart contracts
Writing smart contractsWriting smart contracts
Writing smart contracts
 
Blockchain, smart contracts - introduction
Blockchain, smart contracts - introductionBlockchain, smart contracts - introduction
Blockchain, smart contracts - introduction
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Blockchain presentation to isaca (kemp)
Blockchain presentation to isaca (kemp)Blockchain presentation to isaca (kemp)
Blockchain presentation to isaca (kemp)
 
Impact of Blockchain on IT AuditBlockchain Techn.docx
Impact of Blockchain on IT AuditBlockchain Techn.docxImpact of Blockchain on IT AuditBlockchain Techn.docx
Impact of Blockchain on IT AuditBlockchain Techn.docx
 
Ethereum - Teory and Practice
Ethereum - Teory and PracticeEthereum - Teory and Practice
Ethereum - Teory and Practice
 
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánEvent Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
 
Hacking Finance: Crypto & Math based Currencies, Smart contracts and Blockch...
Hacking Finance: Crypto & Math based Currencies, Smart contracts  and Blockch...Hacking Finance: Crypto & Math based Currencies, Smart contracts  and Blockch...
Hacking Finance: Crypto & Math based Currencies, Smart contracts and Blockch...
 
Introduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxIntroduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptx
 
Introduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart ContractIntroduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart Contract
 
Neo - Smart Economy
Neo - Smart EconomyNeo - Smart Economy
Neo - Smart Economy
 
Distributed Ledgers, Blockchains, and Smart Contracts
Distributed Ledgers, Blockchains, and Smart ContractsDistributed Ledgers, Blockchains, and Smart Contracts
Distributed Ledgers, Blockchains, and Smart Contracts
 
Smart contractjp smartcontract_about
Smart contractjp smartcontract_aboutSmart contractjp smartcontract_about
Smart contractjp smartcontract_about
 
Creating Smart Contract
Creating Smart ContractCreating Smart Contract
Creating Smart Contract
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
Company presentation
Company presentationCompany presentation
Company presentation
 
Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3
 

Kürzlich hochgeladen

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Kürzlich hochgeladen (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Blockchaindev #1 - Ethereum Smart Contracts 101

  • 2. ETHEREUM SMART CONTRACTS 101 SUMMARY ▸ About us ▸ Cryptocurrencies - Some Context ▸ Bitcoin ▸ Ethereum ▸ Applications ▸ Smart Contracts and Gas ▸ Create your own contract ▸ ERC20 tokens ▸ Tools ▸ Recap
  • 3.
  • 4. ETHEREUM SMART CONTRACTS 101 BLOCKCHAINDEV MEETUPS ▸ Focused on blockchain technologies ▸ Knowledge-sharing and learning ▸ Beginner friendly
  • 6.
  • 7. ETHEREUM SMART CONTRACTS 101 CRYPTOCURRENCIES - SOME CONTEXT ▸ Cypherpunk Movement (started in the 80s) ▸ Activists, programmers, hackers, researchers, mathematicians, … ▸ Advocated the use of strong cryptography and privacy enhancing technologies as a route to social and political change.
  • 8. ETHEREUM SMART CONTRACTS 101 CRYPTOCURRENCIES - SOME CONTEXT ▸ Financial Crisis of 2007-2008 ▸ During the last quarter of 2008, central banks purchased US$2.5 trillion of government debt and troubled private assets from banks
  • 10. ETHEREUM SMART CONTRACTS 101 October, 2008
  • 11. ETHEREUM SMART CONTRACTS 101 October, 2008
  • 12. ETHEREUM SMART CONTRACTS 101 BITCOIN ▸ Decentralized P2P ▸ No need for banks ▸ Limited supply ▸ Strong protection of your digital assets
  • 13. ETHEREUM SMART CONTRACTS 101 BITCOIN ▸ Sign transactions with a digital signature ▸ Transactions are stored in a blockchain ▸ A consensus algorithm run on the network to verify the validity of the transactions (proof-of-work) ▸ Transactions are non-reversible
  • 14. ETHEREUM SMART CONTRACTS 101 BLOCKCHAIN ▸ Database ▸ Distributed ▸ Decentralized ▸ Immutable (write once, append only) ▸ Public (or private) ▸ Stores transactions
  • 15. ETHEREUM SMART CONTRACTS 101 A blockchain (https://www.computerworld.com/article/3191077/ security/what-is-blockchain-the-most-disruptive-tech-in-decades.html)
  • 16. ETHEREUM SMART CONTRACTS 101 DECENTRALIZED AND DISTRIBUTED NETWORK
  • 17. ETHEREUM SMART CONTRACTS 101 NETWORK ▸ Executes code ▸ Validates transactions (consensus) ▸ Mines new blocks ▸ Stores the blockchain ▸ Application infrastructure / supercomputer
  • 19. ETHEREUM SMART CONTRACTS 101 Ethereum White Paper (2013)
  • 20. ETHEREUM SMART CONTRACTS 101 Vitalik Buterin
  • 21. ETHEREUM SMART CONTRACTS 101 WHAT IS ETHEREUM ANYWAY? ▸ A cryptocurrency (ETH), but more! ▸ A platform for developing and running decentralized applications
  • 22. ETHEREUM SMART CONTRACTS 101 WHAT IS ETHEREUM ANYWAY? ▸ Virtual Machine (EVM) ▸ A programming language ▸ A blockchain for state transitions ▸ A “world computer”
  • 23. ETHEREUM SMART CONTRACTS 101 ETHEREUM: A WORLD COMPUTER ▸ Arbitrary code is executed on the network ▸ You can run your code by creating a Smart Contract ▸ Contracts alter the state of the blockchain
  • 24. ETHEREUM SMART CONTRACTS 101 APPLICATIONS ▸ Financial ▸ Semi-financial ▸ Non-financial
  • 25. ETHEREUM SMART CONTRACTS 101 FINANCIAL APPLICATIONS ▸ Payments ▸ Sub-currencies and tokens ▸ Initial Coin Offering (ICOs) ▸ Smart Property ▸ Banking and Trading (derivatives, hedging contracts, currency, futures, digital assets)
  • 26. ETHEREUM SMART CONTRACTS 101 SEMI-FINANCIAL APPLICATIONS ▸ Bounties ▸ Coupons, any type of miles ▸ Gambling ▸ Marketplaces and Monetization
  • 27. ETHEREUM SMART CONTRACTS 101 NON-FINANCIAL APPLICATIONS ▸ Reputation and identity ▸ Decentralized Autonomous Organizations (DAOs) ▸ Voting ▸ Games (cryptokitties) ▸ Decentralized file storage
  • 29. SMART CONTRACTS HOW TO RUN YOUR CODE ON THE EVM
  • 30. ETHEREUM SMART CONTRACTS 101 SMART CONTRACTS ▸ Computerized transaction protocol that executes the terms of a contract ▸ A contract is defined as a piece of code ▸ Self-executing contract ▸ You can create use it as a backend for your dapps
  • 31. ETHEREUM SMART CONTRACTS 101 SMART CONTRACTS ▸ Your smart contract will contain instructions ▸ The code is also stored on the blockchain ▸ The execution of the code can create transactions and a new state of the blockchain
  • 32. ETHEREUM AND CRYPTO-LAW: USES BLOCKCHAIN TO IMPLEMENT ARBITRARY SOCIAL CONTRACTS WITHOUT A CENTRAL SERVER Dr. Gavin Wood ETHEREUM SMART CONTRACTS 101
  • 33. ETHEREUM SMART CONTRACTS 101 GAS ▸ Execution fee or cost ▸ Reading information is free ▸ Changing data/creating transactions costs gas ▸ You pay gas to the network
  • 34. ETHEREUM SMART CONTRACTS 101 GAS ▸ Incentive for nodes to run your code and store your data ▸ Code must be efficient (time + space complexity) to optimize the costs ▸ Different instructions have different costs ▸ You can add more gas to your transactions to have a higher priority
  • 35. ETHEREUM SMART CONTRACTS 101 EXAMPLES OF INSTRUCTIONS AND THEIR GAS PRICES ▸ Calculating a hash ▸ Multiplying two numbers ▸ See link
  • 37. ETHEREUM SMART CONTRACTS 101 CREATING A SMART CONTRACT ▸ Install Metamask and create a wallet ▸ Use the Rinkeby test network ▸ Get some fake ether @ rinkeby faucet ▸ Open remix and create your contract ▸ Deploy on (injected web3) and check etherscan.io! ▸ Also check web3.js
  • 38.
  • 39. ETHEREUM SMART CONTRACTS 101 ERC20 TOKEN STANDARD ▸ Read the ERC20 Token Standard ▸ Implement the EIP20Interface to create your own token
  • 40.
  • 41. ETHEREUM SMART CONTRACTS 101 OTHER TOOLS YOU CAN USE ▸ GETH: command line interface + ethereum node ▸ Drizzle: front-end libs for dapps ▸ Truffle: development environment for ethereum ▸ Ganache: run your personal blockchain
  • 42. ETHEREUM SMART CONTRACTS 101 RECAP ▸ Decentralization is good! ▸ You can create your own Smart contracts and dapps to run on the ethereum network ▸ Create your own tokens by implementing the EIP20 interface ▸ Use web3js on the frontend (ethereum js api)