author: "Samuel Bourque" samuel.bourque@nomadic-labs.com
A Multi-Signature Contract behaves as a generalized treasury for holding assets, which can be managed by multiple sets of keys.
Real-world banking analogies are: a joint account for a couple, or a corporate account.
A MultiSig is generally described by M of N; i.e. M number of signatures out required of N number of actors in order to approve an operation.
What makes this wallet implementation distinct from others:
- approval is an on-chain event
- approval status is managed on-chain
- no changes in configuration are permitted, once initialized
- no additional features that wouldn't feature in a straightforward wallet (e.g. feeless)
- To prevent collective assets to be absconded by any single actor
- To observe checks-and-balances within a management group
- When assets could/would/should not be held by an individual, when it could/would/should be held by an entity
Actors who participate in a MultiSig:
- owner: one who deploys the contract and initializes the contract's parameters--may or may not be a signer
- signers: anyone with some degree of claim/right/authority to/over the assets contained/held within the MultiSig
pre-condition: no contract exists yet effect: initialized contract
- Alice deploys the contract; with the following paramaters:
- identifying herself (or someone else if she chooses) as Owner
- signature threshold--i.e. how many signatures are required for a proposal to be considered approved
- signers--the list of tz addresses for all actors who may sign
pre-condition: contract exists effect: metadata is set
- Owner initializes metadata using
set_metadata_uri
pre-condition: contract exists effect: contract's balance increases
- Dany--who may or not be a signer--funds the MultiSig contract using the
defaultentry
pre-condition: contract exists effect: operation is injected assumes: 2 of 3 signature threshold
- Bob--a signer--proposes an operation
O1using theproposeentry; he setsthe_durationto3d - Carl--another signer--approves on the next day Bob's proposed
O1operation using theapproveentry - Alice--another signer--executes the
O1operation using theexecuteentry
pre-condition: contract exists
effect: operation Op2 is not injected
assumes: 2 of 3 signature threshold
- Bob--a signer--proposes an operation
O1using theproposeentry; he setsthe_durationto3d - Carl--another signer--approves, 4 days later, Bob's proposed
O1operation using theapproveentry--fails with "EXPIRED" - Alice--another signer--executes
01--fails with "NOT YET APPROVED"
pre-condition: contract exists
effect: operation Op3 is not injected
assumes: 2 of 3 signature threshold
- Bob--a signer--proposes an operation
O1using theproposeentry; he setsthe_durationto3d - Alice--another signer--executes
01--fails with "NOT YET APPROVED"
- Parameters/Configuration can not be edited once contract is in-effect; this includes:
- signature threshold
- signers
- All signatures are of equal weight
- What To Do When we need to edit the paramaters? (e.g. Add/Remove actors to signers group)
Deploy and Initialize a new Multisig contract and transfer assets to it.
- What To Do When enough signers lose their keys (or are unreachable) and we cannot gain enough approval to do anything?
Nothing can be done. If you cannot ever achieve sufficient approval, this contract will never execute any operations again... then its assets are stuck forever (unless you can recover/remember the keys)... not so dissimilar to regular wallets/accounts.
Plan accordingly to mitigate this risk.