Crypto Academy / Season 3 / Week 5 - Homework Post for Prof @sapwood

in hive-108451 •  3 years ago 

Hello everyone!
Hope you all are enjoying learning and completing tasks about various interesting and informative lessons delivered by our professors. Here I am submitting my homework for Multisig[Electrum] wallet and hope it would be up to the required standard.


Steemit Crypto Academy - Season 2, Week 4.png


(1) What is a Multi-sig wallet? How is it different from a Single key wallet? What are the different uses of a Multisig wallet?


Multi-sig wallet

In the simplest way I can say that it is similar to the locker we acquire in the bank to keep our assets safe. We can't open the bank locker only with our key, two keys are required one of the bank's and another of the locker holder's, this system provides an extra layer of security.

Although a Multisig wallet is not exactly the same as a bank locker, It can be of different combinations like 2 of 3, 3 of 5, 5 of 7 and so on. Here 2 of 3 indicates that 2 out of 3 cosigners must agree to make a transaction, and a similar concept applies to 3 of 5 etc.

If A, B and C are cosigners then the transaction in 2 of 3 multisig wallet would be possible only when either A&B, B&C or A&C will be agreed to the transaction.

Multi-sig v/s single key wallet

The single key wallet is convenient and suitable for any individual as he/she is the owner of that wallet and responsible for the transaction but the multi-sig wallet is a necessity where multiple persons are involved and responsible for any transaction like in the corporates or joint family etc.

Even though a single key wallet is convenient and suitable for any individual but using a multisig wallet by any individual provide an extra level of security to their asset, as it works like a 2FA.

Where a single key wallet is more pronto attack by hackers as only one key is required to be hacked, in a multi-sig wallet it becomes almost impossible to hack the wallet.

The sudden death of Quadriga's owner Gerald Cotten is an example of how many problems an exchange/organization can cause if not using a multisig wallet. After his death, thousands of customers' US$190 million have not been recovered from his account because only he had the key to the wallet.

Single key walletMulti-sig wallet
Open with just one keyRequired multiple keys
Single ownerSingle/multiple owners
Prone to hackHighly secure
Suitable for individualsSuitable for individuals as well as organizations
Easy and fast to operateSomewhat complicated and time-consuming
If the only key is lost funds can't be recoveredFunds are safe in case if one key is lost

Different uses of multi-sig wallet

Extra layer of security

As mention above due to more than one key of a multisig wallet, it is safer than a single key wallet. E.g. if I use the 2 of 3 multi-sig wallet to keep my fund and use multiple devices to store my keys then in such case my funds are safe if one of my keys is hacked, stolen or lost. I can make transactions using 2 other keys.

Works as a 2FA

To make a transaction in a multisig wallet more than one key is required, it is the same as 2-factor authentication used by centralised exchanges to do the transaction. If I use 2 of 2 multi-sig wallet it could be risky but 2 of 3 is safer and work as a 2FA for me.

Uniformity in the decision in case of multiple stakeholders

Multisig wallets are very useful, where to make any transaction multiple consensuses are required. E.g, there are 7 members in a board of a director and any transaction required a majority consensus then 5 of 7 multi-sig wallet can be created. In such an arrangement, no member could misuse the fund and any transaction will be possible only if 5 members agree to that.

Similarly, it can be set up among family members to perform any transaction with the consensus of more than one member.

Escrow Transactions

In one of the previous lessons, we learned about decentralised p2p exchange. In such a type of exchange, the role of escrow is very important. If there is any dispute between the seller and buyer arbiter steps in. Here if the wallet is configured 2 of 3 then it becomes very easy to solve the dispute. After verification and investigation arbiter can return the funds to a buyer who paid money or transfers the funds to the seller who sold the asset using his private key.

line india.png

(2) Download, install & set up a 2-of-3 BTC Multisig wallet(Electrum)? What is the difference between Seed key and MPK? Would you share the seed key or MPK with your co-signer and Why? (Screenshots Needed)


Download, installation and set up of a 2of 3 Electrum

ms1.jpg

  • Installer was downloaded and run to complete the installation. 👇

ms4.jpg

  • The desktop icon was created, clicked on the icon.

  • Created wallet name as Wallet_1 and in the next step opted for Multi-signature wallet 👇

ms7.jpg

  • In the next step adjusted it to From 3 cosigners require 2 signature and opted for create a new seed 👇

ms11.jpg

  • Seed copied and saved. In the next step seed confirmed 👇

ms19.jpg

  • Master public key is generated for Wallet_1👇

    ms14.jpg

Similarly, the public key generated forWallet_2 and Wallet_3 also

WalletPublic key
Wallet_1Zpub6xpCm1ZEYkFww1BPNSzoVmaJdQSuMNAVZcDJtfj2NF2X8UwJE5FMVjoZCF6kSvuhG7ouYzVXXFxdZP8UgXtthWqaCsJV2nuHuoFa35616fQ
Wallet_2Zpub6xU9QdqqztnCrDgCmWMTypRU4yUrBhZMEcsVW9kHi6qVLVvhDCTLzt78QfmcqoYjHvAMoiTV7nMaWyrvrSRRXWp9LhNd1Zwk5UzRCbEQc8x
Wallet_3Zpub6zEgqFn1TkT5RqswYfsDn31YUuGSaxUCXn64mcd6tPJwxVtYuawpP7QHgHYhxohLyi5FQjet2aQ8NeSAuCp67cRcgb46kR8tjYc7wQYz6xN
  • In Wallet_1 keys of the other two wallets Wallet_2 and Wallet_3 were entered and the same procedure was repeated for Wallet_2 and Wallet_3 as well.

ms20.jpg

  • In the next step password created 👇

ms18.jpg

  • For the other 2 cosigners (Wallet_2 and Wallet_3) also this process repeated.

Wallet is created now How to send money will demonstrate in task 4. The wallet looks like this 👇

ms21.jpg

  • To receive money click on Receive then Add new address. Expiry selected - Never
  • Receiving address should be the same for all cosigners and it must be cross-checked before transaction. We can see in Wallet_2 receiving address is the same as in Wallet_1.

ms23.jpg

ms22.jpg

  • We can see in both cosigner Wallet_1 and in Wallet_2 receiving address is the same.
  • I deposited BTC in Electrum from my other wallet. For that 1st I created an ordinary wallet as the Multisig wallet address does not support other exchanges. Later from an ordinary wallet, I transferred BTC to multisig wallet. Now the balance is 0.30087 mBTC in my wallet as shown below in the screenshot.

ms24.jpg

Difference between Seed key and MPK

Seed key is a list of random words 12, 18 or 24, here in multisig wallet seed key is of 12 words. It is used to recover funds by generating a new key in case of the key is lost or hacked. Seed key is also known as seed phrase, recovery key or recovery seed.

While generating any new wallet seed key must be noted down on paper physically as memorizing the phrase is not a viable option. It also should not be stored online on devices that are prone to hack.

Master public key or MPK is an alphanumeric combination (numbers, lowercase and uppercase) use to perform the transactions. In a multisig wallet, it is exchanged with cosigners. In case of loss or hack, MPK can be generated using the seed key.

Sharing of Seed key or MPK

Seed keys should be kept confidential and should not be shared in any circumstances. If the seed key is lost MPK can not be changed and you can lose control over your wallet.
MPK can be shared and required to be shared in multisig wallet.

line india.png

(3) How many different "m of n combinations" Multisig wallet you can construct in Electrum? How do you Export your Seed & Private Key(Electrum) in a Multi-sig wallet? (Screenshots needed)


Combinations of "m of n"

In Electrum to create a multisig wallet, there is an option of min 2 cosigners and a maximum of 15 cosigners. Option for signature is minimum 1 to a maximum of 15.
m = 1 to 15
n = 2 to 15
Theoretically, the following combinations can be formed.

m and nCombinations m of nTotal combinations
m=1-2, n=21 of 2, 2 of 22
m=1-3, n=31 of 3, 2 of 3, 3 of 33
m=1-4, n=41 of 4, 2 of 4, 3 of4, 4 of 44
m=1-5, n=51 of 5, 2 of 5, 3 of 5, 4 of 5, 5 of 55
m=1-6, n=61 of 6, 2 of 6, 3 of 6, 4 of 6 and so on up to 6 of 66
m=1-7, n=71 of 7, 2 of 7, 3 of 7, 4 of 7 and so on up to 7 of 77
m=1-8, n=81 of 8, 2 of 8, 3 of 8, 4 of 8 and so on up to 8 of 88
m=1-9, n=91 of 9, 2 of 9, 3 of 9, 4 of 9 and so on up to 9 of 99
m=1-10, n=101 of 10, 2 of 10, 3 of 10, 4 of 10 and so on up to 10 of 1010
m=1-11, n=111 of 11, 2 of 11, 3 of 11, 4 of 11 and so on up to 11 of 1111
m=1-12, n=121 of 12, 2 of 12, 3 of 12, 4 of 12 and so on up to 12 of 1212
m=1-13, n=131 of 13, 2 of 13, 3 of 13, 4 of 13 and so on up to 13 of 1313
m=1-14, n=141 of 14, 2 of 14, 3 of 14, 4 of 14 and so on up to 14 of 1414
m=1-15, n=151 of 15, 2 of 15, 3 of 15, 4 of 15 and so on up to 15 of 1515
Total combinations ===>>119

Export of Seed and Private Key

  • Open the wallet and click of "Wallet" option

ms25.jpg

To export the Seed key clicked on Seed, it asks for a password and after entering the password Seed Key will be displayed. There is no option to export it so just noted it down on paper.
To export the private key clicked on Private key >> Export. It asks for a password and after entering the password all private keys will be displayed and can be exported in two formats CVS and json

ms26.jpg

ms27.jpg

line india.png

(4) Perform a real transaction(Send BTC) to another Address using a 2 of 3 Multisig wallet? (You can perform a micro-transaction for this Task, also send a partial amount to demonstrate your experience with Change Address, screenshots needed).


Real BTC transaction from Electrum 2 of 3 multisig wallet to other address.

  • Open the wallet and click on send.
  • It will ask for receiving address, description and amount to be sent in mBTC. Here I will send 0.2mBTC out of 0.3mBTC

ms28.jpg

ms29.jpg

  • After filling in all required information click on send, the following window is open.

ms30.jpg

I entered only one address to send BTC but it is showing 2 outputs one is the same as entered by me with the amount and the second one is yellow highlighted with some other amount. This is the Change address, which means Electrum will send all the amount available to the input address and the remaining balance will send back to the wallet. After deducting the fee I will get 0.092 mBTC in my wallet which will be my wallet balance for the next transaction.

Here transaction is not completed yet as it is 2 of 3 multisig wallet so one more signature is required to complete the transaction. Here I exported the transaction to file and saved it.

Now I will go to Wallet_2 and click on Tools >> Load transaction>>From file

ms31.jpg

  • File is opened

ms32.jpg

  • It is showing Status 1/2 signed so need to sign to complete the transaction.
  • Clicked on Sign, entered password >>> states changed to signed.
  • Finally, click on Broadcast and confirmation of payment sent received.

ms33.jpg

ms34.jpg

Thus transaction of 0.2mBTC is completed using 2 of 3 Multisig wallet.

line india.png

(5) What is the difference between Receiving Address & Change Address? Demonstrate your experience with a Change Address?


Receiving address is generated specifically to receive the payment from others. If we want to receive any payment in the wallet, receiving address is shared and payment will be received in the wallet.

Change address is generated automatically in the wallet and we don't have to do anything with it. Amount received in the change address is nothing but the change amount. In the wallet, the receiving and change addresses are highlighted with green and yellow colors.

ms35.jpg

I made a transaction from Electrum wallet to send some BTC to another address. My wallet balance was 0.3mBTC also known as unspent transaction output UTXO. But here I wanted to send a fraction i.e. 0.2mBTC. In such a case, the wallet doesn't send a fraction of the available BTC it sends the complete amount available and the remaining amount returned by creating a change address. As I transfer 0.2mBTC out of 0.3mBTC 0.2 was sent to the address I wanted to send and after deducting the transaction fee I received 0.09mBTC in my wallet via change address, and it will be UTXO for the next transaction. Again if I want to send a fraction of this amount same mechanism will be followed and I will receive the remaining amount in a new change address.

It is similar to the situation when we go to the market and buy something of 90 Rs but we have a 100 Rs note in our wallet and we give it to the shopkeeper. In such case, shopkeeper will return 10 Rs to us and our net wallet balance would be Rs 10.

line india.png

Conclusion


Setting up of 2 of 3 multisig wallet and performing transactions was totally a new experience for me as I never did in the past. Of course, Electrum multisig wallet is very useful for any organization but I found this wallet very secure for personal use also and security can be enhanced by using 3 of 4 or higher if we want to keep a big amount in the wallet.
I am thankful to Prof.@sapwood for delivering such an interesting and informative lecture.

line india with id.jpg

tfsb.png

UFR.png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
Loading...

Wow amazing Explanation from you. I am also dont hear or use it before.

First time I learning about it.

Nice presentation From You ,Take care.

Your work is amazing sir. Please i have a question how did you create an ordinary wallet in Electrum, is the same as creating a standard wallet?

Yes, there is an option before creating wallet, you can opt for that.

You have been upvoted by @sapwood, a Country Representative from INDIA. We are voting with the Steemit Community Curator @steemcurator07 account to support the newcomers coming into Steemit.

Engagement is essential to foster a sense of community. Therefore we would request our members to visit each other's post and make insightful comments.

Thank you