46

I want to store my ether in a form that requires more than one digital signature in order to authorise spends. How do I do on that on Ethereum?

3 Answers 3

44

"Multisignature" addresses on Ethereum differ from that of Bitcoin. Though both networks allow for arbitrary complex transactions, the concepts are not intrinsically the same:

In Bitcoin, there are 2 major classes of transactions:

  • pay to pubkey (addresses starting with "1")
  • pay to script hash (addresses starting with "3", also known as P2SH)

The former is the more traditional account-based system of Bitcoin, whereas the latter was a BIP extension written by Gavin Andresen to enable more complex transactions. Essentially, P2SH allows for an arbitrary script to be used to produce a signatures to consume some input.

In contrast, Ethereum there are 2 major classes of accounts:

  • externally-owned accounts
  • contract accounts

The major difference between these is that contract accounts contain code that can execute and interact with the blockchain. Because Ethereum is "turing-complete", the code can be anything, including a multisignature-type wallet. In comparison, Bitcoin has a more limited scripting language that allow for some scripting features of Ethereum, but not all.

Execute contract

For example, here is some Wallet code, written in Solidity, which compiles to run on the Ethereum network as a contract account. It has various features including multiple signature support (with unlimited participants) and daily withdraw limits, allowing you to spend small amounts, but require multiple signatures for large transactions. This wallet runs entirely on the Blochchain and is available in Mist, (Ethereum DApp browser) with an easy-to-use HTML interface requiring no programming knowledge.

Multisignature contract in Mist

6

I would recommend you download the Ethereum Wallet beta release here.

enter image description here

The wallet gives you an easy GUI to create a multi-sig wallet contract.

6

Recently I worked on universal Solidity smart contract for multi-signature: https://github.com/bitclave/Multiownable

You can easily ship multi-signatire functionality to any smart contract by subclassing from Multiownable and adding onlyManyOwners modifier to methods you want to protect. This is an example of simplest multisig wallet you may imagine:

contract SimplestMultiWallet is Multiownable {
    function transferTo(address to, uint256 amount) onlyManyOwners {
        to.transfer(amount);
    }
}

Technically you will be able to transferOwnership to array of addresses and protected with onlyManyOwners modifier method will be executed only when latest of the owners will call this method with the same arguments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.