Withdrawing Ethereum & ERC20 Tokens
Make a suggestion Improve this page
In this section, we construct a “signed transaction” in our quarantined environments, verify it, and then use QR codes to extract it from the quarantined environment to pass on to additional quarantined environments for additional signatures and eventually extract it for execution.
This protocol is divided into two sub-protocols: Proposing Transfers and Confirming Transfers. The flow is one signatory will propose and the rest will confirm.
Gather the required information
Every signatory needs to execute this section
- Make sure you have your Cold Storage Information Packets
on hand (you’ll need the 24-word BIP39 Mnemonic).
- You will also need to coordinate with M-1 signatories who will in turn need their Cold Storage Information Packets.
On any Internet-connected computer:
- Find your current account’s Nonce
- Navigate to etherscan.io and enter your Ethereum Public Address, also known as MESSAGE E on your Cold Storage Information Packet.
- Find your last outgoing transaction and click on it, find the
Nonce
value, add one to it and write it down on a piece of paper. If there are no outgoing transactions, then record the number0
.
- Navigate to ethgasstation.info and record the recommended gas price in Gwei on the same piece of paper
- If you are Proposing A Transfer:
- Install the required software (on a Mac, only required the first time):
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" $ brew install qrencode
- Create and print QR code with the destination address
- On terminal
$ qrencode -s 5 -o destination.png <ENTER_DESTINATION_ADDRESS>
- Open the QR Code:
$ open destination.png
- Print the QR Code
- On terminal
- If you are withdrawing from an ERC20 Token, make sure you repeat the step above for the ERC20 Token Contract Address. You can find the ERC20 Contract Address on etherscan.io Make sure you also note the Contract Decimals (usually 18) in the piece of paper.
- On the same piece of paper carefully write down the amount of ETH or ERC20 Tokens that you are withdrawing.
- Install the required software (on a Mac, only required the first time):
- If you are Confirming a Transfer:
- Obtain the Transfer ID:
- Open multisigweb on an internet connected device
- Import the Ethereum Cold Wallet Address.
- Open the Wallet and navigate to the
Multisig Transactions
section - Verify the details (amount + destination) of the Transfer you are looking to confirm and write down on the piece of paper the ID (left-most column)
- Obtain the Transfer ID:
- Finally, remember that each signatory’s Ethereum account will be making transactions on the blockchain, so make sure each account has some ETH balance.
Proposing Transfers
Only one signatory needs to propose transfers. If a signatory has already proposed a transfer and you need to confirm it, see section below on Confirming Transfers
Again, the following steps will need to be done by 1 signatories:
- Execute Section VI of the Setup Protocol to prepare your quarantined workspace.
-
Create and sign the transaction
On the Q1 computer:
- Create your ETH account keystore file
- Execute the cryptoglacier script
$ node ~/cryptoglacier/setup.js --ether
- You will be prompted to enter your 24-word BIP39 Mnemonic
- If this is your first transaction, please see the “First transaction” section below
- The script will write an
ethereum.json
file to your~/cryptoglacier
directory
- Execute the cryptoglacier script
- Set the gas price on multisigweb
- Start multisigweb
$ multisigweb
- Accept the TOS and Privacy Policy
- Select
Light Wallet
- Click on
Settings
tab - Enter the gas price in Wei (multiply by 10^9)
- Under
Wallet factory contract
selectCustom contract
- Click
Update settings
- Exit the program (Upper left Menu, Application -> Quit)
- Start multisigweb
- Import your keystore file into multisigweb
- Start multisigweb
$ multisigweb
- Click on
Accounts
tab - Click on
Import
- Select
Browse
and select theethereum.json
file in thecryptoglacier
directory - Enter
cryptoglacier
as your password - Name the account as you wish
- Import Account
- Start multisigweb
- Import required data
- Start the QR code reader
- On Terminal, open a new tab with
Ctrl+Shift+T
- Start zbarcam
$ zbarcam
A window will appear with your laptop’s video feed.
- On Terminal, open a new tab with
- Scan the Ethereum Cold Wallet Address
from your Cold Storage Information Packet.
- Hold the QR code up to the webcam
- When a green square appears around the QR code on the video feed, it has been successfully read.
- Verify the decoded QR code is shown in the terminal window. Example:
QR-Code:0xe46295248fab5f8749af13eeea7021aec098c4ba
- Copy-paste the data into the Quarantined Scratchpad under a “CONTRACT ADDRESS” header
- Repeat the step above for the destination address QR code with a “DESTINATION ADDRESS” header in the Quarantined Scratchpad
- If you are withdrawing an ERC20 Token, repeat the step above for the ERC20 Token Contract Address QR code with a “TOKEN ADDRESS” header in the Quarantined Scratchpad
- Start the QR code reader
- Import your Wallet Contract into multisigweb
- Click on
Wallets
tab - Click on
Add
- Select
Restore deployed wallet
and clickNext
- Enter any name you wish and then copy the Ethereum Cold Wallet Address
from your Quarantined Scratchpad and click
Ok
- Click on
- Create the transaction
- Click on the Name of the Wallet
- For ETH Transactions
- Click on
Add
next toExecute offline
- Enter the
Destination
(from the Scratchpad) and theAmount
(from the piece of paper) and clickSign offline
- Click on
- For ERC20 Transactions
- Click the
Add
button in theTokens
section - Enter the “TOKEN ADDRESS” in the
Address
field - Enter any
Symbol
- Enter the
Decimals
from the piece of paper and clickOk
- Scroll through the
Tokens
until you find theSymbol
you just added. ClickWithdraw
- Enter the
Amount
(from the piece of paper) and theDestination
(from the Scratchpad) and clickSign offline
- Click the
- Enter the
Nonce
you recorded on the piece of paper and clickOk
- Enter
cryptoglacier
as the password and clickOk
- You will receive the hex code. Select it and click
Copy
- Build the QR Code for the transaction
$ qrencode -o tx.png [PASTE USING CTRL+SHIFT+V]
- Display the QR Code
$ eog tx.png
- If this is your first transaction, please also display the QR Code for the
first transaction
- On Terminal, open a new tab with
Ctrl+Shift+T
- Display the QR Code for the first transaction
$ eog tx0.png
- On Terminal, open a new tab with
- Create your ETH account keystore file
-
Visually hide all critically sensitive data.
We’ll be using a smartphone with a live Internet connection to read QR codes from the quarantined computer screens. Any malware (or a malicious QR reader app) could steal sensitive data if it is not visually hidden.
This step is important. Failing to execute it properly creates a substantial security risk.
- Put your Cold Storage Information Packets out of sight – this prevents a smartphone camera from accidentally seeing them.
- Extract the signed transaction from the quarantined environment.
- QR reader setup
- Transfer the signed transaction data to a non-quarantined computer.
- Use the smartphone’s QR code reader to read the QR code.
- Visually inspect that the hex code is the same and send it to yourself using a messaging app which you can access from a laptop.
- Shut down the quarantined computer entirely. As a precaution against
side channel attacks, the quarantined computers should not be active except
when they absolutely need to be.
$ sudo shutdown now
The recommended Acer laptop may require you to hold down the power button for several seconds to complete the shutdown.
- Skip to the section “Broadcasting and verifying transactions” below
Confirming Transfers
M-1 signatories need to confirm transfers. Only Transfers that have been proposed can be confirmed.
If you are a signatory and are looking to confirm a transfer:
- Execute Section VI of the Setup Protocol to prepare your quarantined workspace.
-
Sign the confirmation transaction
On the Q1 computer:
- Create your ETH account keystore file
- Execute the cryptoglacier script
$ node ~/cryptoglacier/setup.js --ether
- You will be prompted to enter your 24-word BIP39 Mnemonic
- If this is your first transaction, please see the “First transaction” section below
- The script will write an
ethereum.json
file to your~/cryptoglacier
directory
- Execute the cryptoglacier script
- Set the gas price on multisigweb
- Start multisigweb
$ multisigweb
- Accept the TOS and Privacy Policy
- Select
Light Wallet
- Click on
Settings
tab - Enter the gas price in Wei (multiply by 10^9)
- Under
Wallet factory contract
selectCustom contract
- Click
Update settings
- Exit the program (Upper left Menu, Application -> Quit)
- Start multisigweb
- Import your keystore file into multisigweb
- Start multisigweb
$ multisigweb
- Click on
Accounts
tab - Click on
Import
- Select
Browse
and select theethereum.json
file in thecryptoglacier
directory - Enter
cryptoglacier
as your password - Name the account as you wish
- Import Account
- Start multisigweb
- Import required data
- Start the QR code reader
- On Terminal, open a new tab with
Ctrl+Shift+T
- Start zbarcam
$ zbarcam
A window will appear with your laptop’s video feed.
- On Terminal, open a new tab with
- Scan the Ethereum Cold Wallet Address
from your Cold Storage Information Packet.
- Hold the QR code up to the webcam
- When a green square appears around the QR code on the video feed, it has been successfully read.
- Verify the decoded QR code is shown in the terminal window. Example:
QR-Code:0xe46295248fab5f8749af13eeea7021aec098c4ba
- Copy-paste the data into the Quarantined Scratchpad under a “CONTRACT ADDRESS” header
- Start the QR code reader
- Import your Wallet Contract into multisigweb
- Click on
Wallets
tab - Click on
Add
- Select
Restore deployed wallet
and clickNext
- Enter any name you wish and then copy the Ethereum Cold Wallet Address
from your Quarantined Scratchpad and click
Ok
- Click on
- Confirm the transaction
- Click on the Name of the Wallet
- Click
Confirm offline
- Enter the
Transaction ID
as written on the piece of paper and clickConfirm offline
- Enter the
Nonce
you recorded on the piece of paper and clickOk
- Enter
cryptoglacier
as the password and clickOk
- You will receive the hex code. Select it and click
Copy
- Build the QR Code for the transaction
$ qrencode -o tx.png [PASTE USING CTRL+SHIFT+V]
- Display the QR Code
$ eog tx.png
- If this is your first transaction, please also display the QR Code for the
first transaction
- On Terminal, open a new tab with
Ctrl+Shift+T
- Display the QR Code for the first transaction
$ eog tx0.png
- On Terminal, open a new tab with
- Create your ETH account keystore file
-
Visually hide all critically sensitive data.
We’ll be using a smartphone with a live Internet connection to read QR codes from the quarantined computer screens. Any malware (or a malicious QR reader app) could steal sensitive data if it is not visually hidden.
This step is important. Failing to execute it properly creates a substantial security risk.
- Put your Cold Storage Information Packets out of sight – this prevents a smartphone camera from accidentally seeing them.
- Extract the signed transaction from the quarantined environment.
- QR reader setup
- Transfer the signed transaction data to a non-quarantined computer.
- Use the smartphone’s QR code reader to read the QR code(s).
- Visually inspect that the hex code is the same and send it to yourself using a messaging app which you can access from a laptop.
- Shut down the quarantined computer entirely. As a precaution against
side channel attacks, the quarantined computers should not be active except
when they absolutely need to be.
$ sudo shutdown now
The recommended Acer laptop may require you to hold down the power button for several seconds to complete the shutdown.
- Follow the section “Broadcasting and verifying transactions” below
Broadcasting and verifying transactions
On any Internet-connected computer:
- Send the Transaction
- Access the hex Code of the fully signed transaction you sent yourself from your smartphone previously.
- Open blockchair.com/broadcast/ and paste the hex code in the text box.
- Select
Ethereum
in theNetwork
drop-down menu - Click on
Broadcast Transaction
- Wait until the transaction gets into an ethereum block by checking etherscan.io
- Verify the transaction status by opening multisigweb on an internet connected device and importing the Ethereum Cold Wallet Address
First Transaction
There is a known bug that prevents
Multisigweb from signing the very first ETH transaction which would have a nonce of zero.
While Multisigweb is fixed, setup.js
script will prompt you to see if this is your first
transaction. If this is your first transaction, the script will create a tx0.png
file
that you will also need to extract from your quarantined environment and broadcast to the
network.