SlideShare a Scribd company logo
TUCSON BLOCKCHAIN DEVELOPERS
MEETUP #4
Agenda:
15min - Introductions
45min - Ethereum Trezor Multisig Vault Contract & dApp by Destry
15min - Discussion/Planning
Ground Rules:
1. No Prices. No Politics.
2. Don’t be an asshole.
This week’s sponsors:
Borderlands Brewery
Unchained-Capital.com
UNCHAINED-CAPITAL.COM
We safely hold customer
collateral during the term of the
loan.
Open Source Ethereum Contract and dApp - https://github.com/unchained-capital/ethereum-multisig
Hosted dApp - https://ethereum-multisig.unchained-capital.com/
Blog Post -
https://blog.unchained-capital.com/a-simple-safe-multisig-ethereum-smart-contract-for-hardware-wallets-a
107bd90bb52
Bounty - https://www.unchained-capital.com/bounties/
Our MultiSig ‘Account’ Requirements
1. Anyone can deposit
2. N-of-M signatures required for spending/withdrawal
3. The private keys for the M signatures are controlled by Hardware Wallets
4. Account can be created without access to hardware wallet - easy to create.
5. Private keys are not reused.
6. ‘Hot’ wallets have no privileges
7. Simplest code possible
Disclaimer: I might gloss some details for the sake of clarity.
Bitcoin Multisig
1. Create Multisig Address using Alice, Bob, and Carol’s public keys.
2. Anyone can fund.
3. Create Spending Transaction - no special information needed
4. Alice and Bob sign spending Tx asynchronously
5. Once signed, anyone can broadcast.
Accounts vs. Smart Contracts
With Bitcoin, accounts and smart contracts are the same thing.
In Ethereum, there are 2 distinct types of accounts:
1. User Accounts
a. Single Signature (no code)
b. Can initiate transactions
c. Pays Fees
2. Contract Accounts
a. Code-based
b. Cannot initiate transactions, but can send transactions when authorized
c. Does NOT pay Fees
d. Cannot be interacted with directly
Two Types of Ethereum Accounts-Owner & Contract
Owner
Account
Owner
Account
Contract
Account
Contract
Account
Our MultiSig ‘Account’ Requirements
1. Anyone can deposit
2. N-of-M signatures required for spending/withdrawal
3. The private keys for the M signatures are controlled by Hardware Wallets
4. Account can be created without access to hardware wallet - easy to create.
5. Private keys are not reused.
6. ‘Hot’ wallets have no privileges
7. Simplest code possible
Previous Ethereum Multisig Accounts
Ethereum Foundation -
https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol
ConsenSys - https://github.com/ConsenSys/MultiSigWallet
Gnosis - https://github.com/gnosis/MultiSigWallet
Parity - beware!
I chose not to use any of the above because they were too complex
https://www.coindesk.com/ethereums-wallets-evolving/
- Multiple Transactions required to execute a spend
- Ability to ‘revoke’ a half-signed spend
- Owners can be changed
- 300+ lines of code
- Signers need a balance to pay fees for each transaction
- You NEED this if you use tx.orgin or msg.sender for authentication
(https://github.com/ConsenSys/MultiSigWallet/blob/master/MultiSigWalletWithDailyLimit.sol#L199)
Our Solution
1. Owners are specified when contract is created
2. To authorize a spend, a message is created that contains:
a. Contract Address
b. Destination Address
c. Amount
d. Nonce
3. Owners sign the message and give signatures to one person (server)
4. A single transaction is sent to the contract with the signatures, destination,
and amount.
Aside: Public Key (Asymmetric) Cryptography
https://www.petri.com/public_key_infrastructure_pki
Our MultiSig ‘Account’ Requirements
1. Anyone can deposit
2. N-of-M signatures required for spending/withdrawal
3. The private keys for the M signatures are controlled by Hardware Wallets
4. Account can be created without access to hardware wallet - easy to create.
5. Private keys are not reused.
6. ‘Hot’ wallets have no privileges
7. Simplest code possible
CODE TIME! - Questions?
https://github.com/unchained-capital/ethereum-multisig
Used Truffle for Contract Development and Testing
https://github.com/trufflesuite/truffle
Contract Factory
Anyone Can Pay
Message to Sign
Verify Signature
Tests!
Emacs/Terminal
dApp!
Go to browser
Things I totally skimmed over
- Trezor’s signing algorithm
- Hierarchical Deterministic Keys
- dApp code
- Bounties!

More Related Content

Similar to Tucson Blockchain Dev Meetup - Unchained Capital's Multisig Ethereum Contract

Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...
Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...
Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...
Cyber Fund
 
Build your own private blockchain based on ethereum
Build your own private blockchain based on ethereumBuild your own private blockchain based on ethereum
Build your own private blockchain based on ethereum
Mehran Pourvahab
 
Introduction_to_Blockchain_&_Ethereum.pptx
Introduction_to_Blockchain_&_Ethereum.pptxIntroduction_to_Blockchain_&_Ethereum.pptx
Introduction_to_Blockchain_&_Ethereum.pptx
WijdenBenothmen1
 
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Edureka!
 
Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
Beau Bullock
 
Explain Ethereum smart contract hacking like i am a five
Explain Ethereum smart contract hacking like i am a fiveExplain Ethereum smart contract hacking like i am a five
Explain Ethereum smart contract hacking like i am a five
Zoltan Balazs
 
Zoltán Balázs - Ethereum Smart Contract Hacking Explained like I’m Five
Zoltán Balázs - Ethereum Smart Contract Hacking Explained like I’m FiveZoltán Balázs - Ethereum Smart Contract Hacking Explained like I’m Five
Zoltán Balázs - Ethereum Smart Contract Hacking Explained like I’m Five
hacktivity
 
Top benefits to incur when you buy ethereum with Canadian dollars
Top benefits to incur when you buy ethereum with Canadian dollarsTop benefits to incur when you buy ethereum with Canadian dollars
Top benefits to incur when you buy ethereum with Canadian dollars
Bitcoin Wallet Canada
 
Blockchain for Notaries
Blockchain for NotariesBlockchain for Notaries
Blockchain for Notaries
Patrice Kerremans
 
Introducing Vault
Introducing VaultIntroducing Vault
Introducing Vault
Ramit Surana
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
Hu Kenneth
 
HSM (Hardware Security Module)
HSM (Hardware Security Module)HSM (Hardware Security Module)
HSM (Hardware Security Module)
Umesh Kolhe
 
FIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT DevicesFIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE
 
Kriptovaluták, hashbányászat és okoscicák
Kriptovaluták, hashbányászat és okoscicákKriptovaluták, hashbányászat és okoscicák
Kriptovaluták, hashbányászat és okoscicák
hackersuli
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart Contract
All Things Open
 
Ethereum
EthereumEthereum
State Of Smart Contract Platforms from Smart Contract JP
State Of Smart Contract Platforms from Smart Contract JP State Of Smart Contract Platforms from Smart Contract JP
State Of Smart Contract Platforms from Smart Contract JP
Tomoaki Sato
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dapps
Stefaan Ponnet
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchain
Priyab Satoshi
 
Top Bitcoin Wallets Of 2020 To Secure Your Digital Coins
Top Bitcoin Wallets Of 2020 To Secure Your Digital CoinsTop Bitcoin Wallets Of 2020 To Secure Your Digital Coins
Top Bitcoin Wallets Of 2020 To Secure Your Digital Coins
danialchristian
 

Similar to Tucson Blockchain Dev Meetup - Unchained Capital's Multisig Ethereum Contract (20)

Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...
Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...
Смарт-контракты: базовые инструменты для разработки и тестирования. Спикер: Д...
 
Build your own private blockchain based on ethereum
Build your own private blockchain based on ethereumBuild your own private blockchain based on ethereum
Build your own private blockchain based on ethereum
 
Introduction_to_Blockchain_&_Ethereum.pptx
Introduction_to_Blockchain_&_Ethereum.pptxIntroduction_to_Blockchain_&_Ethereum.pptx
Introduction_to_Blockchain_&_Ethereum.pptx
 
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
 
Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
 
Explain Ethereum smart contract hacking like i am a five
Explain Ethereum smart contract hacking like i am a fiveExplain Ethereum smart contract hacking like i am a five
Explain Ethereum smart contract hacking like i am a five
 
Zoltán Balázs - Ethereum Smart Contract Hacking Explained like I’m Five
Zoltán Balázs - Ethereum Smart Contract Hacking Explained like I’m FiveZoltán Balázs - Ethereum Smart Contract Hacking Explained like I’m Five
Zoltán Balázs - Ethereum Smart Contract Hacking Explained like I’m Five
 
Top benefits to incur when you buy ethereum with Canadian dollars
Top benefits to incur when you buy ethereum with Canadian dollarsTop benefits to incur when you buy ethereum with Canadian dollars
Top benefits to incur when you buy ethereum with Canadian dollars
 
Blockchain for Notaries
Blockchain for NotariesBlockchain for Notaries
Blockchain for Notaries
 
Introducing Vault
Introducing VaultIntroducing Vault
Introducing Vault
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
 
HSM (Hardware Security Module)
HSM (Hardware Security Module)HSM (Hardware Security Module)
HSM (Hardware Security Module)
 
FIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT DevicesFIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT Devices
 
Kriptovaluták, hashbányászat és okoscicák
Kriptovaluták, hashbányászat és okoscicákKriptovaluták, hashbányászat és okoscicák
Kriptovaluták, hashbányászat és okoscicák
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart Contract
 
Ethereum
EthereumEthereum
Ethereum
 
State Of Smart Contract Platforms from Smart Contract JP
State Of Smart Contract Platforms from Smart Contract JP State Of Smart Contract Platforms from Smart Contract JP
State Of Smart Contract Platforms from Smart Contract JP
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dapps
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchain
 
Top Bitcoin Wallets Of 2020 To Secure Your Digital Coins
Top Bitcoin Wallets Of 2020 To Secure Your Digital CoinsTop Bitcoin Wallets Of 2020 To Secure Your Digital Coins
Top Bitcoin Wallets Of 2020 To Secure Your Digital Coins
 

More from Destry Saul

Tucson Blockchain Developers Meetup - Sept 27 - Signed messages in ethereum p...
Tucson Blockchain Developers Meetup - Sept 27 - Signed messages in ethereum p...Tucson Blockchain Developers Meetup - Sept 27 - Signed messages in ethereum p...
Tucson Blockchain Developers Meetup - Sept 27 - Signed messages in ethereum p...
Destry Saul
 
TBD - Sept 13, 2018 - Signed messages in ethereum - destry saul
TBD - Sept 13, 2018 - Signed messages in ethereum - destry saulTBD - Sept 13, 2018 - Signed messages in ethereum - destry saul
TBD - Sept 13, 2018 - Signed messages in ethereum - destry saul
Destry Saul
 
atomic-swaps 08-02-18 Tucson Blockchain Devs Meetup
atomic-swaps  08-02-18 Tucson Blockchain Devs Meetupatomic-swaps  08-02-18 Tucson Blockchain Devs Meetup
atomic-swaps 08-02-18 Tucson Blockchain Devs Meetup
Destry Saul
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul
Destry Saul
 
Proof of stake - Tucson Blockchain Devs Meetup #5
Proof of stake - Tucson Blockchain Devs Meetup #5Proof of stake - Tucson Blockchain Devs Meetup #5
Proof of stake - Tucson Blockchain Devs Meetup #5
Destry Saul
 
Erc20
Erc20Erc20
Tucson Blockchain Developers Meetup #1 - Cryptokitties by Destry
Tucson Blockchain Developers Meetup #1 - Cryptokitties by DestryTucson Blockchain Developers Meetup #1 - Cryptokitties by Destry
Tucson Blockchain Developers Meetup #1 - Cryptokitties by Destry
Destry Saul
 

More from Destry Saul (7)

Tucson Blockchain Developers Meetup - Sept 27 - Signed messages in ethereum p...
Tucson Blockchain Developers Meetup - Sept 27 - Signed messages in ethereum p...Tucson Blockchain Developers Meetup - Sept 27 - Signed messages in ethereum p...
Tucson Blockchain Developers Meetup - Sept 27 - Signed messages in ethereum p...
 
TBD - Sept 13, 2018 - Signed messages in ethereum - destry saul
TBD - Sept 13, 2018 - Signed messages in ethereum - destry saulTBD - Sept 13, 2018 - Signed messages in ethereum - destry saul
TBD - Sept 13, 2018 - Signed messages in ethereum - destry saul
 
atomic-swaps 08-02-18 Tucson Blockchain Devs Meetup
atomic-swaps  08-02-18 Tucson Blockchain Devs Meetupatomic-swaps  08-02-18 Tucson Blockchain Devs Meetup
atomic-swaps 08-02-18 Tucson Blockchain Devs Meetup
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul
 
Proof of stake - Tucson Blockchain Devs Meetup #5
Proof of stake - Tucson Blockchain Devs Meetup #5Proof of stake - Tucson Blockchain Devs Meetup #5
Proof of stake - Tucson Blockchain Devs Meetup #5
 
Erc20
Erc20Erc20
Erc20
 
Tucson Blockchain Developers Meetup #1 - Cryptokitties by Destry
Tucson Blockchain Developers Meetup #1 - Cryptokitties by DestryTucson Blockchain Developers Meetup #1 - Cryptokitties by Destry
Tucson Blockchain Developers Meetup #1 - Cryptokitties by Destry
 

Recently uploaded

Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 

Recently uploaded (20)

Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 

Tucson Blockchain Dev Meetup - Unchained Capital's Multisig Ethereum Contract

  • 1. TUCSON BLOCKCHAIN DEVELOPERS MEETUP #4 Agenda: 15min - Introductions 45min - Ethereum Trezor Multisig Vault Contract & dApp by Destry 15min - Discussion/Planning Ground Rules: 1. No Prices. No Politics. 2. Don’t be an asshole. This week’s sponsors: Borderlands Brewery Unchained-Capital.com
  • 2. UNCHAINED-CAPITAL.COM We safely hold customer collateral during the term of the loan. Open Source Ethereum Contract and dApp - https://github.com/unchained-capital/ethereum-multisig Hosted dApp - https://ethereum-multisig.unchained-capital.com/ Blog Post - https://blog.unchained-capital.com/a-simple-safe-multisig-ethereum-smart-contract-for-hardware-wallets-a 107bd90bb52 Bounty - https://www.unchained-capital.com/bounties/
  • 3. Our MultiSig ‘Account’ Requirements 1. Anyone can deposit 2. N-of-M signatures required for spending/withdrawal 3. The private keys for the M signatures are controlled by Hardware Wallets 4. Account can be created without access to hardware wallet - easy to create. 5. Private keys are not reused. 6. ‘Hot’ wallets have no privileges 7. Simplest code possible Disclaimer: I might gloss some details for the sake of clarity.
  • 4. Bitcoin Multisig 1. Create Multisig Address using Alice, Bob, and Carol’s public keys. 2. Anyone can fund. 3. Create Spending Transaction - no special information needed 4. Alice and Bob sign spending Tx asynchronously 5. Once signed, anyone can broadcast.
  • 5. Accounts vs. Smart Contracts With Bitcoin, accounts and smart contracts are the same thing. In Ethereum, there are 2 distinct types of accounts: 1. User Accounts a. Single Signature (no code) b. Can initiate transactions c. Pays Fees 2. Contract Accounts a. Code-based b. Cannot initiate transactions, but can send transactions when authorized c. Does NOT pay Fees d. Cannot be interacted with directly
  • 6. Two Types of Ethereum Accounts-Owner & Contract Owner Account Owner Account Contract Account Contract Account
  • 7. Our MultiSig ‘Account’ Requirements 1. Anyone can deposit 2. N-of-M signatures required for spending/withdrawal 3. The private keys for the M signatures are controlled by Hardware Wallets 4. Account can be created without access to hardware wallet - easy to create. 5. Private keys are not reused. 6. ‘Hot’ wallets have no privileges 7. Simplest code possible
  • 8. Previous Ethereum Multisig Accounts Ethereum Foundation - https://github.com/ethereum/dapp-bin/blob/master/wallet/wallet.sol ConsenSys - https://github.com/ConsenSys/MultiSigWallet Gnosis - https://github.com/gnosis/MultiSigWallet Parity - beware! I chose not to use any of the above because they were too complex
  • 9. https://www.coindesk.com/ethereums-wallets-evolving/ - Multiple Transactions required to execute a spend - Ability to ‘revoke’ a half-signed spend - Owners can be changed - 300+ lines of code - Signers need a balance to pay fees for each transaction - You NEED this if you use tx.orgin or msg.sender for authentication (https://github.com/ConsenSys/MultiSigWallet/blob/master/MultiSigWalletWithDailyLimit.sol#L199)
  • 10. Our Solution 1. Owners are specified when contract is created 2. To authorize a spend, a message is created that contains: a. Contract Address b. Destination Address c. Amount d. Nonce 3. Owners sign the message and give signatures to one person (server) 4. A single transaction is sent to the contract with the signatures, destination, and amount.
  • 11. Aside: Public Key (Asymmetric) Cryptography https://www.petri.com/public_key_infrastructure_pki
  • 12. Our MultiSig ‘Account’ Requirements 1. Anyone can deposit 2. N-of-M signatures required for spending/withdrawal 3. The private keys for the M signatures are controlled by Hardware Wallets 4. Account can be created without access to hardware wallet - easy to create. 5. Private keys are not reused. 6. ‘Hot’ wallets have no privileges 7. Simplest code possible
  • 13. CODE TIME! - Questions?
  • 14. https://github.com/unchained-capital/ethereum-multisig Used Truffle for Contract Development and Testing https://github.com/trufflesuite/truffle
  • 21. Things I totally skimmed over - Trezor’s signing algorithm - Hierarchical Deterministic Keys - dApp code - Bounties!