In my courses I teach to multisig in smart contracts. I do get asked many times about multisig wallets and how they work. The logic is pretty straightforward, but I thought I would write about them here.
What is a Multisig Wallet?
A multisig wallet is a type of smart contract that requires multiple signatures or approvals from different parties to authorize transactions.
What is the benefit of a Multisig Wallet?
The multisig wallet that no single individual can unilaterally control the assets within the wallet, which enables better security, access control, and collaboration. Requiring multiple approvals, reduces the risk of theft, hacking, or misuse of funds.
How do they actually work?
Multisig wallets are built on smart contracts. As “programmable wallets” they establish the rules for how many signatures are needed to approve a transaction and who the authorized signatories will be. Kile all smart contracts deployed on the blockchain they contain the logic for managing addresses, signatures, and rules.
When a multisig wallet is created, the following parameters are defined:
- The number of signatories: This represents the total number of authorized signers who can approve transactions from the wallet.
- The number of required signatures: This is the minimum number of signatures needed to validate a transaction.
- The list of signatories’ public keys: These keys are used to verify the signatures and confirm the identity of the signatories.
A multisig wallet operates using a combination of cryptographic signatures and smart contract logic. When a transaction is proposed, it is stored within the wallet’s smart contract, along with the required number of signatures. As signatories provide their signatures, the smart contract validates them against the public keys of the authorized parties.
When a transaction is initiated, it is broadcasted to the signatories, who then sign it using their private keys. The smart contract then verifies if the required number of signatures have been collected. If the condition is met, the transaction is considered valid and can be executed on the blockchain. Otherwise, it remains pending until the necessary approvals are gathered, or simply rejected if that is part of the smart contract flow of execution.
Once the required signatures are collected and verified, the smart contract executes the transaction. If the transaction involves transferring assets, it updates the wallet’s balance accordingly. In the case of a function call to another smart contract, the multisig wallet’s smart contract forwards the call to the target contract.
I hope you found this article helpful.
Ref: Thank you thirdweb