Crypto Academy / Season 3 / Week 5 - Homework Post for @sapwood - Multisig Wallet (Electrum) - "m of n" Combinations

in SteemitCryptoAcademy3 years ago (edited)

Good day everyone. Thanks to @sapwood for such a wonderful lecture on Multisig Wallet (Electrum)- "m of n" Combinations. I will be doing the homework from the lecture, so sit back and look for somewhere quite quiet and comfortable as you read through this amazing article I created just for you(😉). Let's get started!!!


HomeWork.jpg


Banner.jpg

Question 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?

Banner.jpg

A multi-sig wallet is a type of wallet that requires more than one signature for a transaction to be broadcasted to the network. For instance, you have a bank account, and before you can make any transaction, you require the authorization of some other person or people, who you gave the authority, these people can be called cosigners. Let's further imagine, that you trust two people and made them your cosigners. Before you can be able to perform any transaction from your bank, you must require one or both(depending on your setting) of them to authorize such transaction before such transaction can be processed. That's exactly what Multi-sig is about.

Multi-sig wallet is a crypto wallet that requires not only you, the owner of the wallet to sign a transaction before it can be broadcasted to the network. It requires cosigners to sign the transaction, then and only then it can be processed and broadcasted to the network.

Now, how many cosigners do I need? This is the question that gave rise to combination "m" and "n" in Multi-sig wallets. "m" stands for, number of signatures needed for a transaction to be broadcasted to the network. While "n" stands for the number of cosigners to a wallet.

For most Multi-sig wallets and for the wallet we would be looking at later in the article, which is Electrum, the maximum "n" is usually 15. Hence, there could be a combination of 15 of 15 wallet, which means that, before any transaction from such wallet can be broadcasted, all the cosigners to that wallet has to sign it. So, if we have a combination of 9 of 15 wallet, that means, if 9 cosigners should sign the transaction, the transaction would be broadcasted. So, the owners of the wallets can choose whichever combination that suits them best. They can go for a combination of 2 of 2, 4 of 10, 3 of 7, 5 of 10, or the most commonly used combination, 2 of 3. NOTE: cosigners doesn't have to be a person, it can be a device. Let's take for instance, I can use a 2 of 2 wallet combination. I can use my desktop as the owner of the wallet and my phone as the cosigner to the wallet. So, before a transaction can be processed and broadcasted to the network, I will have to sign the transaction on both devices.

I hope you now fully comprehend what Multi-sig wallet is.


Differences Between Multi-sig Wallets and Single Key Wallets


Multi-sig wallets are very much different from single key wallet, in some categories, such as;


  • Signatures Needed
  • Security
  • Suitability
  • Speed

  • Signatures Needed: Single key wallet requires just only one signature for a transaction to be processed and broadcasted to the network, while Multi-sig requires multiple signatures for a transaction to processed and broadcasted to the network.

  • Security: Both type of wallets are highly secured, but Multi-sig wallets are more secured than Single key wallets, as it is harder to be hacked when using Multi-sig wallets as compared to Single key wallets.

  • Suitability: Single key wallets are quite more suitable for individuals while Multi-sig wallets are more suitable for organizations, as no single person should be able to have complete access to the organization's fund. Before any transaction should take place, some number of people must sign(in other words, approve) it, hence, this is literally the best checks and balances for organizations.

  • Speed: The Single key wallet is very much faster in completing transactions than Multi-sig wallets that require multiple people to sign a transaction before it can be broadcasted to the network, which may take minutes, hours and sometimes, even days.

Use Cases Of Multi-sig Wallets


There are many good use cases of Multi-sig wallets, which brought about the invention of it, in the first place. Below are my 3 major use cases of Multi-sig wallets;


  • Check And Balance
  • Added Security
  • Joint Account

  • Check And Balance: This is the best solution for accountability in organizations. It will completely reduce or even erase the chances of an employee embezzling an organizations' funds, because it is literally impossible, as many people will have to sign the transaction for the transaction to be processed and broadcasted to the network.

  • Added Security: Let's imagine, your phone gets stolen and your private keys and seed phrase are in your Gmail in your phone which is now compromised. Your funds are gone for good. But with Multi-sig wallets, your funds are intact, there are not going anywhere, because before the hacker/thief can send your funds out of your wallet, my cosigners will have to sign such transactions.

  • Joint Account: Multi-sig wallet can very much act as a better joint account than our conventional joint bank accounts, which can be compromised by any of the partners involved, as they can make transactions without the approval or signature of the other partner. But with Multi-sig wallet, before any transaction is made, it is known and approved by both partners. Note: partners is this context are Husband and Wife.

Banner.jpg

Question 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?

Banner.jpg

If you follow my steps, you should be able to download, install and set up a 2 of 3 BTC wallet combination on Electrum.


  • Click on this link to land on Electrum download page.

  • When you arrive on the page, click on the suitable installer for your device. For me, I'm using Windows, so I clicked on Windows Installer. After clicking, it started to download immediately.

1.1.jpg


  • After it was successfully download, open the file and click on "Install".

3.3.jpg


  • After it finished installing, you can start creating your Electrum wallet.

4.1.jpg


  • Ensure you choose a "Multi-signature wallet" and then click on "Next". I will be using a 2 of 3 wallet combination, so my consigners should be set to 3 while my signatures be set to 2.

5.1.jpg

6.1.jpg


  • Next, click on "Create a new seed" and the click on "Next".

7.1.jpg


  • Your wallet seed will be displayed. Ensure you stored it somewhere very secured because if it gets stolen or lost, you won't be able to recover your wallet again, so store it somewhere very safe. You will then be asked to confirm your wallet seed, to ensure that you have successfully stored it somewhere safe. Retype your seed and click on "Next".

12.1.jpg

13.1.jpg


  • Your "Master Public Key (MPK)" will be displayed, ensure you copy it. After that, this is when you have to create the other two wallets. Do same process, and ensure you copy your MPK because that is what you will be sending to all wallets, for each wallet to be able to have the capacity to sign transactions.

8.1.jpg

9.1.jpg


  • After you have successfully created and sent the other two wallets' MPK, you will then be able to create a password for your wallet.

14.1.jpg


  • Boom!!! Congrats!!! Your wallet is activate and ready.

15.1.jpg


  • I had to verify if all the 3 wallets have the same receiving address, in order to know if they have successfully bonded with each other. To, do that, you need to open your three wallets and click on "Receive" and then click on "New Address" on all 3 wallets, in order to verify if you will get similar receiving address.

18.1.jpg

19.1.jpg


  • Boom!!! All 3 wallets are bonded, as they all have the same receiving address. The wallet is now officially a 2 of 3 wallet combination.

17.1.jpg


Difference Between Seed Key and Master Public Key


Seed Key is the wallet highest security, if all keys fails, we resort to the Seed key, so it is the all powerful key. For it instance, on steemit we have 3 main keys, Posting Key, Active Key and Master Key. The Master Key is the ultimate key to your wallet. Your Posting Key, as well as your Active Key can be compromised, and you won't be so afraid, because you can change your keys and have new Private and Active Keys through your Master Key. But if your Master Key is compromised, your wallet is gone for good. Seed key is like Master Key in steemit.

Whereas Master Public Key (MPK) is simply used to add consigners to your Multi-signature wallets. Master Public Key is derived from Seed Key.


Would You Share The Seed Key Or MPK With Your Co-signer And Why?


I would share my MPK with my cosigners in other to bond our wallets, so we can perform multi-signature transactions. But I won't share my Seed key, as it is my personal wallet safety key and should be kept safely and without anyone knowing or seeing it. And also, it was obviously stated when your Seed key was displayed during the process of creating your wallet, that you should never disclose your seed.


12.2.jpg


Banner.jpg

Question 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?

Banner.jpg

The number of "m of n combination" in Electrum platform varies, as we have the maximum combination to be 15 of 15 when using a desktop and the maximum combination to be 5 of 5 when using a smartphone. So, the total number of different "m of n combination" on Electrum platform is dependent on the device a user is making use of.

The total number of different "m of n combinations" in Electrum desktop platform is 105 and for smartphone application is 10. Why 105 and 10? For a transaction to be multi-sig, it must involve at least 2 cosigners, you, the owner of the wallet and a consigner who will have to sign a transaction before it can be processed and broadcasted to the network. So, combination such as "1 of 2" or "1 of 5" are invalid multi-sig wallets, because since only the signature of the owner of the wallet is good enough for a transaction to be processed and broadcasted to the network, it erase the need for the use of Multi-sig wallet. Because if your device is compromised by a hacker, he/she can easily send funds out of the wallet without the need of the cosigners' signatures. Hence, valid m of n combination, should have at least two cosigners and that's why when you want to create a new wallet on Electrum, you are displayed with a 2 of 2 combination, because that's minimum valid m of n combination. Although, 1 of 2 or 1 of 15 combination can still be created but I feel it's just like having a Single Key wallet, because as soon as you make a transaction, you don't need any cosigner to sign it, before it gets processed and broadcasted to the network.


20.1.jpg


Exporting Of Your Seed Key In A Multi-sig Wallet


If you follow my steps, you should be able to export your Seed key quite easily on Electrum.


  • Open your Electrum. At the homepage of the application. Click on wallet which is located at the Headers sector. When you click, you will see a dropdown, then click on Seed. You will then, have to input your password.

21.1.jpg

22.1.jpg


  • After inputting your password, you will be able to see your Seed Key, write it down and store it somewhere very safe.

23.1.jpg


That's how you export Seed Key in a Multi-sig wallet.


Exporting Of Your Private Key In A Multi-sig Wallet


If you follow my steps, you should be able to export your Private key quite easily on Electrum.


  • Open your Electrum. At the homepage of the application. Click on wallet which is located at the Headers sector. When you click, you will see a dropdown, then click on Private Keys. You will notice two options will open which will be Sweep and Export. Click on Export and then input your password.

24.1.jpg

22.1.jpg


  • After inputting your password successfully, you will get a warning that, Private keys cannot be backed up by simply exporting. Click on "Ok".

26.1.jpg


  • You will be able to see your Private keys right about now. You can then choose which format you want your Private keys to be saved in, either CSV or JSON. After that, click on Export, and your Private Keys will be saved to your system.

27.1.jpg


That's how you export Private Keys in a Multi-sig wallet.


Banner.jpg

Question 4: Perform a real transaction(Send BTC) to another Address using a 2 of 3 Multisig wallet?

Banner.jpg

After couple of hours trying to figure out ChangeNow I finally did and was able to send some BTC to a Standard wallet in Electrum(I created a standard wallet) and from that wallet, I was able to send some mBTC to my 2 of 3 combination wallet.


28.2.jpg


  • Next, I click on Send, which can be found at the top headers of the page. I filled in the necessary details needed to be filled on the page and then click on "Pay". Look at the image below for more vivid understanding.

29.1.jpg


  • Next, input your password and click on "Send"

30.1.jpg


  • The transaction has not been broadcasted yet, as the button to click on broadcast, is not yet activated. So, another wallet needs to sign the transaction before it can be processed and broadcasted. So, you have to export the transaction, so that you can send it to another cosigner who will help to sign the transaction. As it stands now, the transaction status is "Partially signed".

31.1.jpg


  • Open your second wallet. Then click "Tools", which can be found at the top headers of the page, then click on "Load transaction", then click on "From file" to get the exported file. Look at the image below for more vivid understanding.

32.1.jpg


  • Look for the file at the folder where you exported it to. Then Open it.

33.1.jpg


  • When opened, you can see the button to sign at the bottom left corner of the screen. Click on "Sign".

34.1.jpg


  • You will have to input your password after clicking on "Sign".

35.1.jpg


  • Now the transaction has been signed successfully. The Status confirms it. You can now click on "Broadcast", in order to broadcast the transaction to the network.

36.1.jpg


  • You will get a confirmation pop up, that the amount has been sent.

37.1.jpg


That's how to perform a 2 of 3 combination transaction in Multi-sig wallet.


Blockchain Explorer

  • I tried getting my transaction details on Blockchain explorer, because I noticed two outputs from a single input. I noticed some coloring and some details to the coloring. As yellow, indicates Change Address and Green, indicates, Receiving Address.

38.1.jpg


  • I copied the Transaction ID of the transaction, which you can see at the top right corner of the screen. Look at the image below for more vivid understanding.

38.2.jpg


  • I went on to Blockchain explorer and inputted the Transaction ID, to fully comprehend. My initial fund in the wallet was about 0.00034 BTC, I sent out 0.00026 BTC, hence, I will be having 0.000044 BTC remaining. And I could understand it better from Blockchain explorer, as the transaction showed that, 0.00026 BTC was spent and the address, showed where I sent the BTC to. The other transaction showed, 0.000044 Unspent, and it was sent back to my Multi-sig wallet.

39.1.jpg


Banner.jpg

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

Banner.jpg

The difference between Receiving address and Change address, is quite simple, as Receiving address is the address you share in order to receive funds into your account. For instance, our receiving address on steemit is our username, so whenever you want to receive STEEM, you share your username, that's our Receiving address in Steemit. Receiving address is like your bank account. When you want someone to send money to you, you share them your bank account details right? That's exactly what Receiving address is, in the crypto world.

Whereas Change address wasn't created to receive our funds but to hold our unspent amount. Whenever we make a transaction and have a balance, instead of it to remain in our Receiving address, it goes to our Change address. The amount in our Change Address is not lost, it is waiting for when next you would transact, before amount in your Receiving address is spent, the Change Address amount is first spent. It acts as a store room for our funds that are not sent out when a transaction has been made.

For instance, imagine someone sent you 50 Steem, it will enter you Receiving Address and not your Change Address. From the 50 Steem in your Receiving Address, you sent 40 Steem out, hence, there should be 10 Steem remaining in your Receiving address, right? But No!! The remaining 10 Steem will be moved to your Change Address.


My experience when I made multiple signature transaction above, was great, as it made me understand Change Address even better. Because I had 0.00034 BTC and then I sent 0.00026 BTC, to my BTC wallet, that means I should still be having 0.000044 BTC remaining. But I noticed that, it wasn't only the 0.00026 BTC that was sent, but the total BTC in my Receiving Address that was sent, i.e 0.00034 BTC was sent and 0.00026 BTC was sent to the desired wallet I sent it to and the remaining 0.000044 BTC was rerouted to my Multi-sig wallet but entered my Change Address, instead of my Receiving address.


I hope you now fully comprehend the differences between Receiving Address and Change Address.

Banner.jpg

Conclusion


A Multi-sig wallet has it's amazing benefits and for any organization that has adopted cryptocurrency, this wallet will act as Check and Balance, so that every fund spent will be accountable by cosigners. This is the future of wallets, as I believe, that more and more people will start making use of this kind of wallets, in order to safe guard their funds even better. This is a welcomed development in the cryptocurrency ecosystem.


Special thanks to you, @sapwood , for organizing this amazing class and giving this nice assignment, as it has helped me in understanding Multi-sig wallets.

Sort:  
Loading...