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
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.
- board decisions — 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.
- Running local Edgeware node in development mode — this will popup accounts like Alice, Bob, Charlie, Dave, Eve &c
Open Browser and you will go to the Accounts in Apps to see your development 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.
Now we will top-up 1,000,000 tEDG to the Team Funding multi-signature account from Alice. Thank you, Alice!
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.
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.
It was broadcasted to the chain, you can see the notification on the top right.
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
You as another signator (BOB) enter the same amount and destination to get the same final call payload.
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.
Funds secured. Woala, DAVE now has money on his account.
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.
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.
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