Wallet is the most important application on any blockchain. With their help, users interact with the platform. Some wallets, such as Bitcoin Core, or Ethereum Mist, are connected to the blockchain directly through a full node, while others use web services to access the blockchain.
At a basic level, the wallet provides services for receiving, sending, tracking and accounting for transactions in operations with cryptocurrencies. More advanced wallets provide increased security, or allow for more complex actions on the blockchain. This is especially true of the Ethereum network, as its users not only store their assets in wallets, but also perform various actions using smart contracts.
What is multi-signature
Since its introduction in 2013, wallets with several mandatory signatures (multi-signature, multi-sig) have gained wide popularity. Multi-signature accounts require several digital signatures for moving tokens, similar to how two keys are required to open a bank cell.
Multi-signature seriously complicates the task for attackers, because private keys can now be stored on different machines. In addition, it can be used to create structures with many users, for example, if the consent of several people is required for the payment.
Evolution from Bitcoin to Ethereum
The rapid growth of the air rate in 2016, due to the technical potential of the Ethereum network, has generated user demand for multi-signature web wallets. However, unlike all kinds of bitcoin clones, such as lightcoin and others, the Ethereum blockchain from the very beginning was built on a completely new set of consensus rules. Therefore, the architecture of multi-signature wallets on the Ethereum network is significantly different from analogues for Bitcoin.
Accounts and Addressing
A Bitcoin wallet should track multiple previous incoming transactions sent to addresses whose private keys this wallet owns (unspent, or UTXO). The total amount of unspent inputs is the current wallet balance. There is no concept of unspent entry in Ethereum – instead, each account has a balance that changes with each transaction.
In order to create and sign a transaction, it is no longer necessary to collect and save previous unspent inputs, all that is needed is the identification number (ID) of the last transaction (to prevent double spending) and the ID of a new transaction. Moreover, since instead of unspent inputs, only balances are monitored, this reduces the computational burden on the wallet. In this regard, creating transactions in Ethereum is much easier. However, for this simplicity you have to pay with privacy, since accounts are now tied to a single address, while a Bitcoin wallet can have many addresses, which makes it difficult to track transfers.
On the Bitcoin network, the size of the commission that the user pays to the miners is determined by the size of the transaction. The Ethereum commission is calculated based on the number of blockchain operations multiplied by the price that the user agrees to pay per unit of gas (the internal unit cost of a transaction or contract in Ethereum). Simply put, the commission depends on the number and complexity of operations, as well as the size of the transaction on the blockchain.
In the technical documentation you can find an accurate description of the cost of using the blockchain and the corresponding price of validation, but for beginners this is a rather difficult reading. A simple example: sending ether to a crowdfunding contract may require a completely different commission (the sender pays) than sending the same amount to a private user. There is an extensive field of activity for GUI developers: to help users understand the charges.
Various multi-signature implementations in Ethereum wallets
The following are the most common multisig contracts:
Standart Wallet.sol in dapp-bin
This is the very first contract written by Gavin Wood, one of the founders of the network. It is used in the official wallet of the Ethereum Fund – Mist.
Its latest version is implemented as “execution, then confirmation” (this is the first method – several transactions). In addition, the contract supports functions such as daily limits for transfers, as well as adding / removing users. A new version of the contract is expected, based on the second method (multi-signature in one transaction).
Another contract based on one transaction. It is written in the wake of the famous TheDAO hacking events, and intentionally offers the simplest set of functions to minimize the number of lines of code and prevent a surface attack. It contains the “safe mode” function, which, if activated, allows conclusions only to the address of its own signatures.
DappSys ‘Simple Multisig’
The add-on on the Dappsys contract platform is based on the multi-transaction method. Published in preparation for the Devcon-2 conference. The main advantage is the modular design of the code, which is very convenient for programmers developing wallets on this platform. Modules can be used for other asset storage scenarios.
A wide range of applications on the Ethereum platform provides a growing demand for multisig wallets with an expanded set of functions.
ERC-20 Token Support
Despite the variety of wallets with multi-signature for storing ether, only a few support tokens built on the Ethereum platform, such as Digix DGDs, Augur prediction market REP and others. Token contracts are an integral part of the ecosystem and they are all built on the common ERC-20 standard.
Support for other operations and scenarios
Looking a little further, we can say that the range of functions required by wallets will be significantly expanded. Ethereum contracts require intellectual functions, not just procedures for receiving and sending funds.
The development of interoperability standards is critical to the industry. It is necessary to develop a set of common functions that all wallets should support. Examples include purchase and sale operations, timelock (moderators), the ability to make bets, voting and others.
Further evolution of multi-signature: EIP101 standard (Serenity Protocol)
The upcoming Serenity release will receive several useful features that will greatly simplify the lives of users when working with multisig wallets.
- Functionality of the “pay-to-script-hash” type: the ability to create and deploy a wallet contract on the network only at the moment when the user transfers money. This will save users from having to create wallets in advance. More importantly, users will no longer have to pay gas fees before deploying a multi-signature wallet.
- Contracts will be able to independently pay commissions. Currently, gas commissions when withdrawing funds are paid from the address of the signature that sends the transaction to the wallet contract. This means that users have to keep a balance in two places: a wallet contract protected by multi-signature, and a signature address (to pay fees). Serenity will allow contracts to pay with their own gas, so users do not have to keep a separate account to pay fees.
Ultimately, users will choose wallets based not on any particular cryptocurrency, but on the applications that users need. People need super apps, not a super blockchain.