ZooBC wiki
Transactions

Multisignature

A multisignature account is an account that no single key controls. It is defined by a list of participants and a threshold, and it spends only when at least that many participants have signed the same transaction: two of three, three of five, and so on. The participants may use different key types, so a ZooBC key, an Ethereum key and a Bitcoin key can share one account.

The account

A multisignature account is defined by its threshold (from 1 up to the number of participants), a nonce and its participant addresses. Its address is a hash of them:

address = SHA3-256( threshold ‖ nonce ‖ count ‖ sorted participant addresses )

The result is used as an ordinary type-0 account, so it can receive ZBC like any address. Nobody holds a private key for it, so the only way to spend from it is to collect participant signatures.

Spending, step by step

A timeline: a proposal holding the inner payment, signature 1, signature 2, the counter reaching the threshold, and the payment leaving the account once
A timeline: a proposal holding the inner payment, signature 1, signature 2, the counter reaching the threshold, and the payment leaving the account once
  1. Someone proposes an inner transaction, such as a payment, inside a MultiSignature transaction. The inner transaction is unsigned, and its sender is the multisignature account.
  2. Participants add their signatures, all at once or in later MultiSignature transactions, in any order. A MultiSignature body may carry any combination of the account's definition, the inner transaction and signatures, so several of these wrappers can build up one inner transaction.
  3. Each participant signs the inner transaction's chain-bound digest, SHA3-256("ZBC-TX" ‖ genesis hash ‖ inner bytes), with its own key type's scheme (see signing a transaction). The signatures are stored under the inner transaction's hash. A signature from a non-participant, or one that does not verify, is simply not counted.
  4. When the valid signatures reach the threshold, the inner transaction runs once. The multisignature account pays its fee, at least the inner transaction's floor, and the inner transaction is marked executed for ever, so it can never be replayed.

The sender of each MultiSignature wrapper pays that wrapper's own fee.

No joint signature is built off-chain and no signing order is imposed: each key signs alone, with its own scheme.

A pending inner payment stored by its hash; ZooBC, Ethereum and Bitcoin keys sign in separate wrappers; two valid signatures reach the threshold and the payment runs once
A pending inner payment stored by its hash; ZooBC, Ethereum and Bitcoin keys sign in separate wrappers; two valid signatures reach the threshold and the payment runs once

What it can do

The inner transaction may be one of these types:

  • Empty or SendZBC;
  • one of the four node-registration types (register, update, remove and claim a node registration);
  • SetSplitPolicy;
  • one of the four account-group types (LinkAccount, UnlinkAccount, SetMemberPermissions and TransferGroupControl).

So a multisignature account can pay ZBC, hold a node registration, share its income with a split policy and take part in an account group, but it does not send tokens directly. It can consent to joining a group by its threshold, just as a single key consents with its own signature.

Under the rule of one transaction per account per block, an inner transaction counts for the multisignature account when it runs.

Who has a say

Only the participants' signatures count. Registered nodes do not sign for the account; they only check the participants' signatures, as they check any other. The ZooBC Foundation has no say over it either, whatever the amount.

See also