Setup your Multi-Signature Account on Edgeware
By: Matej Nemček
Tags: Multisignature, Polkadot Network, Blockchain, Parity Substrate, Funding

Multi-signature has been around for a while from the old world where it allows groups of users to sign a single document. Its main purpose is additional security for a group of people, i.e. maintaining funds flow or governance power.

In Edgeware it’s possible to create a multi-signature setup, formerly known multi-sig. This article will guide you through how you can create multi-sig and operate it among your team.

board decisions — legal entities such as businesses and foundations use multi-sigs to collectively govern over the entity’s treasury

Photo by Dane Deaner on Unsplash

What is Multi-signature for

Let’s dive into what are familiar use cases of multi signatures:

securing your own stash — you can use additional signatories as a 2FA mechanism to secure your funds. One signer can be on one computer, another can be on mobile, or in cold storage. This slows down your interactions with the chain but is orders of magnitude more secure.

— you can use additional signatories as a 2FA mechanism to secure your funds. One signer can be on one computer, another can be on mobile, or in cold storage. This slows down your interactions with the chain but is orders of magnitude more secure. board decisions — legal entities such as businesses and foundations use multi-sigs to collectively govern over the entity’s treasury

— legal entities such as businesses and foundations use multi-sigs to collectively govern over the entity’s treasury group participation in governance — a multi-sig account can do everything a regular account can. A multi-sig account could be a council member in Edgeware’s governance, where a set of community members could vote as one entity.

Technically, multi-signature accounts are composed of one or more addresses and a threshold. The threshold defines how many signatories (participating addresses) need to agree on the submission of an extrinsic in order for the call to be successful.

For example, Alice, Bob, and Charlie set up a multi-sig with a threshold of 2. This means Alice and Bob can execute any call even if Charlie disagrees with it. Likewise, Charlie and Bob can execute any call without Alice. A threshold is typically a number smaller than the total number of members but can also be equal to it, which means they all have to be in agreement.

Multisignature accounts cannot be modified after being created. Changing the set of members or altering the threshold is not possible and instead requires the dissolution of the current multi-sig and creation of a new one. As such, multi-sig account addresses are deterministic, i.e. you can always calculate the address of a multi-sig just by knowing the members and the threshold, without the account existing yet. This means one can send tokens to an address that does not exist yet, and if the entities designated as the recipients come together in a new multi-sig under a matching threshold, they will immediately have access to these tokens.

Create a Multi-Signature Account

Now it’s about time to create your multi-signature account and perform a test transaction from the account. As Apps does a lot of heavy lifting, it will be a breeze to create and operate your multi-sig. To not lose any valued tokens, we will demonstrate it on our locally running node.

Prerequisites:

Running local Edgeware node in development mode — this will popup accounts like Alice, Bob, Charlie, Dave, Eve &c

Browser

Open Browser and you will go to the Accounts in Apps to see your development accounts

Accounts

You will choose your signatures, i.e. your team mates accounts, in our scenario we choose Alice, Bob and Charlie. We set the threshold to 2, which means there is only a needed signature from two of three. You can set the threshold to be less or equal to the number of signatories for multi-sig. We call it our Team Funding account.

Choose signatories

Now we will top-up 1,000,000 tEDG to the Team Funding multi-signature account from Alice. Thank you, Alice!

Top-up team funding account

Create Transfer from Multi-Signature Account

Now that the Team Funding account has been seeded, we can pay DAVE 200,000 tEDG for the completion of a project. In our accounts list, hit Send from our Team Funding account.

Initiate Transfer from Multi-Sig

Now we are prompted (as ALICE) to authorize the transaction.

You will see multisig call data with a payload 0x0603ff306721211d5404bd9da88e0204360a1a9ab8b87c66c1bc2fcdd37f3c2222cc201b000000ed95c28f055a2a which is call data that can be supplied to a final call to multi approvals. It's what triggers chain logic to execute commands.

You should hit Sign and Submit.

Authorize Transaction as Alice

It was broadcasted to the chain, you can see the notification on the top right.

Multi-Signature First Call

Now, we click on the right three dots next to our Team Funding account as there is multisig approvals pending (red dot) and select Send

Multi-Signature Second Call

You as another signator (BOB) enter the same amount and destination to get the same final call payload.

Multi-Sig Transfer as Bob

Now we as BOB we can authorize transactions. The UI is smart enough to detect that BOB is signing the final approval. Under toggle Multisig message, you will see the same payload as we’re creating multisig transaction. Hit “Sign and Submit”. This should now be signed by 2-of-3 signatories which is enough for the transaction to be sent to DAVE.

Authorize Transaction as Bob

Funds secured. Woala, DAVE now has money on his account.

Multi-Signature Funds Transferred

You’ve managed to learn how to make transactions for multi-signature account. Multisignature has a broad use case and you can leverage the final call for your use case to trigger whatever you want on-chain.

If you want to dig deeper, you can find more content for Multi-Sig here on Edgewares Documentation.

Author

I’m Matej Nemček 💫🎋 (@yangwao) and I’m taking care of developer relations at Edgewa.re. For more upcoming content follow us @edg_developers on Twitter.

If you want to ask questions, feel free to show up at our Edgeware builders channel on Element or Telegram Edgeware Developers

Why use Substrate?

With Substrate, the runtime is your blockchain canvas, giving you maximum freedom to create and customize your blockchain precisely for your application or business logic. Within the runtime, you can compose any state transition function while utilizing built-in database management, libp2p networking, and the fast and safe consensus protocol GRANDPA.

Learn more about Substrate in recent Parity Technologies post https://www.parity.io/substrate-2-0-is-here/

What is Edgeware?

A self-improving smart contract blockchain.

Edgeware is a high-performance, self-upgrading WASM smart contract platform, in the Polkadot ecosystem.

Participants vote, delegate, and fund each other to upgrade the network.

If you are curious about Edgeware, learn more at Edgewa.re

Follow for more updates twitter.com/@heyedgeware