SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
SCVSoft : Benajmin Hyokeun Oh
주식회사 에스씨브이소프트
Ethereum 2.0
And Deposit Contract
Whoami
Benjamin Hyokeun Oh (오효근)
CEO of SCVSoft
• Hanyang Univ. majoring CSE
• Best of the Best 4th,
Vulnerability Research Track
• CodeEngn Conference 12
(2015)
• Inc0gnito 2015/2016 Speaker
• (주)Doobit ex-CDO For more info : www.benjioh5.com
1/50
- NOT the Space Contruct Vehicle!

- Security & Cryptocurrency Venture

- B2B w/ R&D, auditing, consulting based company

- first B2C product (ACHER) will be lauching at 2019 Q4 or 2020 Q1
For more info : www.scvsoft.net
2/50
SCVSoft
- No one in Korea talks about deposit phase's importance (Really?)

- There are lots of description about FFG, CBC, Chasper, and Beacon Chain.

BUT there are few article on deposit contract.

- Want to say there are extensible way to ERC-20 deposit/withdrawal activity.

- ACHER -our first B2C project- has deposit/withdrawal action on smart contract by Call
and DelegateCall. I can be adopted every another new contract!
Why I choose deposit contract?
3/50
- Ethereum 2.0 has 3 Phases for PoW to fully PoS support (or more phases?)

- Each phase, Beacon Chain and shards get more feature of ETH 1.0 Chain.

- Then Why PoS is needed for Ethereum 2.0?

- More fast and decentralized chain will be made

- More power efficient to make system working than PoW
Eth2.0 & Pos & Deposit &…
4/50
- Then, What is Proof of Staking?

- Kind of betting or deposit for making new block.

- Who use PoS? 

- QTUM, EOS, and so on...

- Any difference btw ordinary PoS?

- FFG is totally different from other PoS Algorithm.
Eth2.0 & Pos & Deposit &…
5/50
- Then how to stake Ethereum in Eth1.0 Chain?

- Using deposit contract. Send adjust amount Ethereum to deposit contract.

- How to withdraw it?

- There are no way until Phase 2. Sending Ethereum to deposit contract is one way trip.

- All Ethereum send to deposit contract is only usable on Beacon chain. There is no
turning back.

- Q : Is it a risk factor? A : Maybe
Eth2.0 & Pos & Deposit &…
6/50
- Then how to stake Ethereum in Eth1.0 Chain?

- Using deposit contract. Send adjust amount Ethereum to deposit contract.

- How to withdraw it?

- There are no way until Phase 2. Sending Ethereum to deposit contract is one way trip.

- All Ethereum send to deposit contract is only usable on Beacon chain. There is no
turning back.

- Q : Is it a risk factor? A : Maybe
Eth2.0 & Pos & Deposit &…
7/50
- Made by Vyper

- Using @Payable decorator to deposit Ethereum

- Using Merkle Tree to store data ( > 4.2 Billion deposit data)

- About 110 line of vyper code makes fully deposit contract for the beacon chain
Deposit contract
8/50
- Made by Vyper

- Using @Payable decorator to deposit Ethereum

- Using Merkle Tree to store data ( > 4.2 Billion deposit data)

- About 110 line of vyper code makes fully deposit contract for the beacon chain
Deposit contract
9/50
- Made by Vyper

- Using @Payable decorator to deposit Ethereum

- Using Merkle Tree to store data ( > 4.2 Billion deposit data)

- About 110 line of vyper code makes fully deposit contract for the beacon chain
Deposit contract
10/50
- Made by Vyper

- Using @Payable decorator to deposit Ethereum

- Using Merkle Tree to store data ( > 4.2 Billion deposit data)

- About 110 line of vyper code makes fully deposit contract for the beacon chain
Deposit contract
11/50
- Made by Vyper

- Using @Payable decorator to deposit Ethereum

- Using Merkle Tree to store data ( > 4.2 Billion deposit data)

- About 110 line of vyper code makes fully deposit contract for the beacon chain
Deposit contract
12/50
- It takes too long time to describe it. I'll say very little of it.

- It's data structure which can extend data with very low cost and lower time.

- Lots of bit operations and hashing is main thing of merkle tree.

- 32 depth == 2^32 depositable address == 4,294,967,295 Address!

- 2^(32-1) == 2,147,483,648 Address!

- Then 2^32 * 192 Byte == 824,633,720,832 Byte???

- > 824GB ??
Merkle tree in deposit contract
13/50
- No!

- (2^32 + 2^31 + 2^30 + ... + 2^1 + 2^0) * 32 Byte (SHA256) == 274,877,906,912 Byte

- < 275 GB (...?) for 4,294,967,295 Address!

- Well.... It's efficient than old one.... Hmm...

- Merkle Tree grows when new data is added. So, must has lesser size than 275GB

- (2^([log_2(n)]+1) - 1) * 32 Byte < 32 * n Byte will be size of merkle tree.
Merkle tree in deposit contract
14/50
- There are more efficient way to do it. isn't it?

- Yes. Let's see the code.
Merkle tree in deposit contract
15/50
- There are more efficient way to do it. isn't it?

- Yes. Let's see the code.
Merkle tree in deposit contract
16/50
Only the Ethereum is
depositable?
No!
Sample Solidity
19/50
Sample Solidity
20/50
Sample Solidity
21/50
Sample Solidity
22/50
Sample Solidity
23/50
Done?
No!
Sample Solidity w/ SCVToken
26/50
Sample Solidity w/ SCVToken
27/50
Sample Solidity w/ SCVToken
28/50
Sample Solidity w/ SCVToken
29/50
Token can be send to the smartcontract

(actually ERC20 smart contract's data is updated,
and doesn't care about address type)
Sample Solidity w/ SCVToken
30/50
Sample Solidity w/ SCVToken
31/50
Let's Init SCVToken addr
Sample Solidity w/ SCVToken
32/50
Sample Solidity w/ SCVToken
33/50
Initialized!
Sample Solidity w/ SCVToken
34/50
Now using Smartcontract's call (or delegatecall) send some ERC20 Token
Sample Solidity w/ SCVToken
35/50
Now using Smartcontract's call (or delegatecall) send some ERC20 Token
Sample Solidity w/ SCVToken
36/50
<- Don't forget * 10^18 (decimal) call! I forgot about that :(
<- Target Addr
Sample Solidity w/ SCVToken
37/50
Sample Solidity w/ SCVToken
38/50
calls smartcontract
Sample Solidity w/ SCVToken
39/50
- ㅊㅊㅊㅊㅊ차ㅗㅕ추ㅗㅕㅜㅠㅆㄹㅅ총여ㅜㅜㅎ퍄차아ㅣㄱ도셔ㅣㅕ핓

-
It works! Smart contract send token to another address!
Sample Solidity w/ SCVToken
40/50
- Using call and delegatecall, there are way to DEPOSIT & WITHDRAW ERC20 Tokens.

- Actually, ERC721, ERC1155 would works too.

- So, We can construct one way trip to another chain or smart contract based asset
management!

- But If ERC20 Contract has function which force A to B transfer by admin, there are some
problem on deposit or staking. :(

- Actually, Ethereum transfer and ERC20 transfer can be never same thing.

- But there are way to mock staking and desposit system.
Sample Solidity w/ SCVToken
41/50
- No one in Korea talks about deposit phase's importance (Really?)

- There are lots of description about FFG, CBC, Chasper, and Beacon Chain.

BUT there are few article on deposit contract.

- Want to say there are extensible way to ERC-20 deposit/withdrawal activity.

- ACHER -our first B2C project- has deposit/withdrawal action on smart contract by Call
and DelegateCall. I can be adopted every another new contract!
Sample Solidity w/ SCVToken
42/50
- No one in Korea talks about deposit phase's importance (Really?)

- There are lots of description about FFG, CBC, Chasper, and Beacon Chain

BUT there are few article on deposit contract.

- Want to say there are extensible way to ERC-20 deposit/withdrawal activity.

- ACHER -our first B2C project- has deposit/withdrawal action on smart contract by
Call and DelegateCall. It can be adopted every another new contract!
Sample Solidity w/ SCVToken
43/50
Identification on Blockchain
- ACHER -our first B2C project- has deposit/withdrawal action on smart contract by
Call and DelegateCall. It can be adopted every another new contract!
- Identification through smart contract which is called ERC-725 is used for DID and multi
support of EOA.

- Present day, Our Goal is using smart contract for Deposit and Withdrawal of any type of
asset in Blockchain.

- Using Depositable smart contract, BLOCKCHAIN WOULD BE MORE EASIER
ACHER
45/50
ACHER : Identification on blockchain
User
Signature Checking
& Authorization
Get Authority Info
Private Key
KYC
Digital Signature
Identification
Crypto Wallet
OAuth2
FIDO2
END Service
ERC-725
ERC-1484
Smart Contract
Service Blockchain Stack
46/50
KYC
Digital Signature
Identification
Crypto Wallet
OAuth2
FIDO2
END Service
Browser Extension

(e.g. Metamask)
iOS
Android App
Dapp
(Centralized)
Auth Server
IPFS/
Swarm
decentralize
SDK (js/python)
Service Blockchain Stack
ERC-725
ERC-1484
Smart Contract
ACHER : Identification on blockchain
47/50
KYC
Digital Signature
Identification
Crypto Wallet
OAuth2
FIDO2
END Service
Browser Extension

(e.g. Metamask)
iOS
Android App
Dapp
(Centralized)
Auth Server
IPFS/
Swarm
Service Blockchain Stack
ERC-725
ERC-1484
Smart Contract
B2B Part
ACHER : Identification on blockchain
decentralize
SDK (js/python)
48/50
KYC
Digital Signature
Identification
Crypto Wallet
OAuth2
FIDO2
END Service
Browser Extension

(e.g. Metamask)
iOS
Android App
Dapp
IPFS/
Swarm
Service Blockchain Stack
ERC-725
ERC-1484
Smart Contract
B2C Part
ACHER : Identification on blockchain
decentralize
SDK (js/python)
(Centralized)
Auth Server
49/50
FIN

Contenu connexe

Similaire à 29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract

Crypto Coinference 2019 - Eidoo 2.0, verso la DeFi ed oltre.
Crypto Coinference 2019 - Eidoo 2.0, verso la DeFi ed oltre.Crypto Coinference 2019 - Eidoo 2.0, verso la DeFi ed oltre.
Crypto Coinference 2019 - Eidoo 2.0, verso la DeFi ed oltre.Crypto Coinference
 
CertiK-Audit-for-ShibaSwap-v8.pdf
CertiK-Audit-for-ShibaSwap-v8.pdfCertiK-Audit-for-ShibaSwap-v8.pdf
CertiK-Audit-for-ShibaSwap-v8.pdfUdayaprakashRai1
 
Blockchain School 2019 - Security of Smart Contracts.pdf
Blockchain School 2019 - Security of Smart Contracts.pdfBlockchain School 2019 - Security of Smart Contracts.pdf
Blockchain School 2019 - Security of Smart Contracts.pdfDavide Carboni
 
Token koin business-plan
Token koin business-planToken koin business-plan
Token koin business-planNando Andrade
 
Building Web3 on Bitcoin with Interlay
Building Web3 on Bitcoin with InterlayBuilding Web3 on Bitcoin with Interlay
Building Web3 on Bitcoin with InterlayNeven6
 
Eraswap Network (ESN): A unique Blockchain Network!
 Eraswap Network (ESN): A unique Blockchain Network! Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!RAJPATEL933
 
Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!AlishaShamim1
 
Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!Sapna Sampath
 
Eraswap whitepaper
Eraswap whitepaperEraswap whitepaper
Eraswap whitepaperSujayBhujbal
 
Elixir Berlin 2019: Dominic Letz on Doing Blockchain with Elixir
Elixir Berlin 2019: Dominic Letz on Doing Blockchain with ElixirElixir Berlin 2019: Dominic Letz on Doing Blockchain with Elixir
Elixir Berlin 2019: Dominic Letz on Doing Blockchain with Elixiryahsinhuangtw
 
Ethcon seoul 2019 presentation final
Ethcon seoul 2019 presentation finalEthcon seoul 2019 presentation final
Ethcon seoul 2019 presentation finalHeung-No Lee
 

Similaire à 29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract (20)

Crypto Coinference 2019 - Eidoo 2.0, verso la DeFi ed oltre.
Crypto Coinference 2019 - Eidoo 2.0, verso la DeFi ed oltre.Crypto Coinference 2019 - Eidoo 2.0, verso la DeFi ed oltre.
Crypto Coinference 2019 - Eidoo 2.0, verso la DeFi ed oltre.
 
CertiK-Audit-for-ShibaSwap-v8.pdf
CertiK-Audit-for-ShibaSwap-v8.pdfCertiK-Audit-for-ShibaSwap-v8.pdf
CertiK-Audit-for-ShibaSwap-v8.pdf
 
Blockchain School 2019 - Security of Smart Contracts.pdf
Blockchain School 2019 - Security of Smart Contracts.pdfBlockchain School 2019 - Security of Smart Contracts.pdf
Blockchain School 2019 - Security of Smart Contracts.pdf
 
Token koin business-plan
Token koin business-planToken koin business-plan
Token koin business-plan
 
Building Web3 on Bitcoin with Interlay
Building Web3 on Bitcoin with InterlayBuilding Web3 on Bitcoin with Interlay
Building Web3 on Bitcoin with Interlay
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Eraswap Network (ESN): A unique Blockchain Network!
 Eraswap Network (ESN): A unique Blockchain Network! Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!
 
EraSwap White Paper
EraSwap White PaperEraSwap White Paper
EraSwap White Paper
 
Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Eraswap whitepaper
Eraswap whitepaperEraswap whitepaper
Eraswap whitepaper
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Era Swap Network
Era Swap NetworkEra Swap Network
Era Swap Network
 
Elixir Berlin 2019: Dominic Letz on Doing Blockchain with Elixir
Elixir Berlin 2019: Dominic Letz on Doing Blockchain with ElixirElixir Berlin 2019: Dominic Letz on Doing Blockchain with Elixir
Elixir Berlin 2019: Dominic Letz on Doing Blockchain with Elixir
 
Ethcon seoul 2019 presentation final
Ethcon seoul 2019 presentation finalEthcon seoul 2019 presentation final
Ethcon seoul 2019 presentation final
 

Dernier

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 

Dernier (20)

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 

29회 이더리움 밋업 - Ethereum 2.0 and Deposit Contract

  • 1. SCVSoft : Benajmin Hyokeun Oh 주식회사 에스씨브이소프트 Ethereum 2.0 And Deposit Contract
  • 2. Whoami Benjamin Hyokeun Oh (오효근) CEO of SCVSoft • Hanyang Univ. majoring CSE • Best of the Best 4th, Vulnerability Research Track • CodeEngn Conference 12 (2015) • Inc0gnito 2015/2016 Speaker • (주)Doobit ex-CDO For more info : www.benjioh5.com 1/50
  • 3. - NOT the Space Contruct Vehicle! - Security & Cryptocurrency Venture - B2B w/ R&D, auditing, consulting based company - first B2C product (ACHER) will be lauching at 2019 Q4 or 2020 Q1 For more info : www.scvsoft.net 2/50 SCVSoft
  • 4. - No one in Korea talks about deposit phase's importance (Really?) - There are lots of description about FFG, CBC, Chasper, and Beacon Chain.
 BUT there are few article on deposit contract. - Want to say there are extensible way to ERC-20 deposit/withdrawal activity. - ACHER -our first B2C project- has deposit/withdrawal action on smart contract by Call and DelegateCall. I can be adopted every another new contract! Why I choose deposit contract? 3/50
  • 5. - Ethereum 2.0 has 3 Phases for PoW to fully PoS support (or more phases?) - Each phase, Beacon Chain and shards get more feature of ETH 1.0 Chain. - Then Why PoS is needed for Ethereum 2.0? - More fast and decentralized chain will be made - More power efficient to make system working than PoW Eth2.0 & Pos & Deposit &… 4/50
  • 6. - Then, What is Proof of Staking? - Kind of betting or deposit for making new block. - Who use PoS? - QTUM, EOS, and so on... - Any difference btw ordinary PoS? - FFG is totally different from other PoS Algorithm. Eth2.0 & Pos & Deposit &… 5/50
  • 7. - Then how to stake Ethereum in Eth1.0 Chain? - Using deposit contract. Send adjust amount Ethereum to deposit contract. - How to withdraw it? - There are no way until Phase 2. Sending Ethereum to deposit contract is one way trip. - All Ethereum send to deposit contract is only usable on Beacon chain. There is no turning back. - Q : Is it a risk factor? A : Maybe Eth2.0 & Pos & Deposit &… 6/50
  • 8. - Then how to stake Ethereum in Eth1.0 Chain? - Using deposit contract. Send adjust amount Ethereum to deposit contract. - How to withdraw it? - There are no way until Phase 2. Sending Ethereum to deposit contract is one way trip. - All Ethereum send to deposit contract is only usable on Beacon chain. There is no turning back. - Q : Is it a risk factor? A : Maybe Eth2.0 & Pos & Deposit &… 7/50
  • 9. - Made by Vyper - Using @Payable decorator to deposit Ethereum - Using Merkle Tree to store data ( > 4.2 Billion deposit data) - About 110 line of vyper code makes fully deposit contract for the beacon chain Deposit contract 8/50
  • 10. - Made by Vyper - Using @Payable decorator to deposit Ethereum - Using Merkle Tree to store data ( > 4.2 Billion deposit data) - About 110 line of vyper code makes fully deposit contract for the beacon chain Deposit contract 9/50
  • 11. - Made by Vyper - Using @Payable decorator to deposit Ethereum - Using Merkle Tree to store data ( > 4.2 Billion deposit data) - About 110 line of vyper code makes fully deposit contract for the beacon chain Deposit contract 10/50
  • 12. - Made by Vyper - Using @Payable decorator to deposit Ethereum - Using Merkle Tree to store data ( > 4.2 Billion deposit data) - About 110 line of vyper code makes fully deposit contract for the beacon chain Deposit contract 11/50
  • 13. - Made by Vyper - Using @Payable decorator to deposit Ethereum - Using Merkle Tree to store data ( > 4.2 Billion deposit data) - About 110 line of vyper code makes fully deposit contract for the beacon chain Deposit contract 12/50
  • 14. - It takes too long time to describe it. I'll say very little of it. - It's data structure which can extend data with very low cost and lower time. - Lots of bit operations and hashing is main thing of merkle tree. - 32 depth == 2^32 depositable address == 4,294,967,295 Address! - 2^(32-1) == 2,147,483,648 Address! - Then 2^32 * 192 Byte == 824,633,720,832 Byte??? - > 824GB ?? Merkle tree in deposit contract 13/50
  • 15. - No! - (2^32 + 2^31 + 2^30 + ... + 2^1 + 2^0) * 32 Byte (SHA256) == 274,877,906,912 Byte - < 275 GB (...?) for 4,294,967,295 Address! - Well.... It's efficient than old one.... Hmm... - Merkle Tree grows when new data is added. So, must has lesser size than 275GB - (2^([log_2(n)]+1) - 1) * 32 Byte < 32 * n Byte will be size of merkle tree. Merkle tree in deposit contract 14/50
  • 16. - There are more efficient way to do it. isn't it? - Yes. Let's see the code. Merkle tree in deposit contract 15/50
  • 17. - There are more efficient way to do it. isn't it? - Yes. Let's see the code. Merkle tree in deposit contract 16/50
  • 18. Only the Ethereum is depositable?
  • 19. No!
  • 25. Done?
  • 26. No!
  • 27. Sample Solidity w/ SCVToken 26/50
  • 28. Sample Solidity w/ SCVToken 27/50
  • 29. Sample Solidity w/ SCVToken 28/50
  • 30. Sample Solidity w/ SCVToken 29/50
  • 31. Token can be send to the smartcontract
 (actually ERC20 smart contract's data is updated, and doesn't care about address type) Sample Solidity w/ SCVToken 30/50
  • 32. Sample Solidity w/ SCVToken 31/50
  • 33. Let's Init SCVToken addr Sample Solidity w/ SCVToken 32/50
  • 34. Sample Solidity w/ SCVToken 33/50
  • 36. Now using Smartcontract's call (or delegatecall) send some ERC20 Token Sample Solidity w/ SCVToken 35/50
  • 37. Now using Smartcontract's call (or delegatecall) send some ERC20 Token Sample Solidity w/ SCVToken 36/50
  • 38. <- Don't forget * 10^18 (decimal) call! I forgot about that :( <- Target Addr Sample Solidity w/ SCVToken 37/50
  • 39. Sample Solidity w/ SCVToken 38/50
  • 41. - ㅊㅊㅊㅊㅊ차ㅗㅕ추ㅗㅕㅜㅠㅆㄹㅅ총여ㅜㅜㅎ퍄차아ㅣㄱ도셔ㅣㅕ핓 - It works! Smart contract send token to another address! Sample Solidity w/ SCVToken 40/50
  • 42. - Using call and delegatecall, there are way to DEPOSIT & WITHDRAW ERC20 Tokens. - Actually, ERC721, ERC1155 would works too. - So, We can construct one way trip to another chain or smart contract based asset management! - But If ERC20 Contract has function which force A to B transfer by admin, there are some problem on deposit or staking. :( - Actually, Ethereum transfer and ERC20 transfer can be never same thing. - But there are way to mock staking and desposit system. Sample Solidity w/ SCVToken 41/50
  • 43. - No one in Korea talks about deposit phase's importance (Really?) - There are lots of description about FFG, CBC, Chasper, and Beacon Chain.
 BUT there are few article on deposit contract. - Want to say there are extensible way to ERC-20 deposit/withdrawal activity. - ACHER -our first B2C project- has deposit/withdrawal action on smart contract by Call and DelegateCall. I can be adopted every another new contract! Sample Solidity w/ SCVToken 42/50
  • 44. - No one in Korea talks about deposit phase's importance (Really?) - There are lots of description about FFG, CBC, Chasper, and Beacon Chain
 BUT there are few article on deposit contract. - Want to say there are extensible way to ERC-20 deposit/withdrawal activity. - ACHER -our first B2C project- has deposit/withdrawal action on smart contract by Call and DelegateCall. It can be adopted every another new contract! Sample Solidity w/ SCVToken 43/50
  • 46. - ACHER -our first B2C project- has deposit/withdrawal action on smart contract by Call and DelegateCall. It can be adopted every another new contract! - Identification through smart contract which is called ERC-725 is used for DID and multi support of EOA. - Present day, Our Goal is using smart contract for Deposit and Withdrawal of any type of asset in Blockchain. - Using Depositable smart contract, BLOCKCHAIN WOULD BE MORE EASIER ACHER 45/50
  • 47. ACHER : Identification on blockchain User Signature Checking & Authorization Get Authority Info Private Key KYC Digital Signature Identification Crypto Wallet OAuth2 FIDO2 END Service ERC-725 ERC-1484 Smart Contract Service Blockchain Stack 46/50
  • 48. KYC Digital Signature Identification Crypto Wallet OAuth2 FIDO2 END Service Browser Extension
 (e.g. Metamask) iOS Android App Dapp (Centralized) Auth Server IPFS/ Swarm decentralize SDK (js/python) Service Blockchain Stack ERC-725 ERC-1484 Smart Contract ACHER : Identification on blockchain 47/50
  • 49. KYC Digital Signature Identification Crypto Wallet OAuth2 FIDO2 END Service Browser Extension
 (e.g. Metamask) iOS Android App Dapp (Centralized) Auth Server IPFS/ Swarm Service Blockchain Stack ERC-725 ERC-1484 Smart Contract B2B Part ACHER : Identification on blockchain decentralize SDK (js/python) 48/50
  • 50. KYC Digital Signature Identification Crypto Wallet OAuth2 FIDO2 END Service Browser Extension
 (e.g. Metamask) iOS Android App Dapp IPFS/ Swarm Service Blockchain Stack ERC-725 ERC-1484 Smart Contract B2C Part ACHER : Identification on blockchain decentralize SDK (js/python) (Centralized) Auth Server 49/50
  • 51. FIN