Welcome back! In a previous week of Easy DeFi, I covered MetaMask and Ethereum wallets. This post assumes you have some understanding of wallets and how they are used to interact with Ethereum, so be sure to give that post a quick read if those concepts are foreign to you.
What is a Multisig Wallet?
In a regular Ethereum wallet, transactions are signed by the wallet owner with his or her private key. These accounts are called Externally Owned Accounts (EOAs) because they are owned by a single person. They're made up of a single public key and a single private key.
Conversely, in a multisignature (multisig) wallet, transactions must be signed by multiple users to be executed. The users associated with a multisig wallet are called owners.
How does a Multisig Work?
Behind the scenes, multisig wallets are simply smart contracts. A multisig wallet can be deployed by any user and accepts a few parameters.
First, the multisig must be configured with a list of owners. These owners are added by their personal EOAs (that is, the owners use their personal wallets to approve or deny transactions on the multisig).
Next, the multisig is configured with the number of owners that are required to approve transactions. Multisigs can either require all users or a subset of users to approve transactions. For example, let's say we set up a multisig with 3 owners. A 3-3 wallet would require all 3 owners to approve a transaction. A 2-3 wallet would require just 2 of the 3 users to approve a transaction.
As you can see, for a multisig to be functional, the required number of users to approve a transaction must also have access to their account. In the example above, if 2 of the 3 multisig owners lost their Ethereum accounts, the assets would be stranded in the multisig without any way to retrieve them.
What's the Purpose of a Multisig Wallet?
While an EOA is quicker and easier to use, it has a single point of failure: the account owner's private key. If someone steals the account's private key, all of the funds in the wallet are compromised.
Multisig wallets allow for trustless coordination and are useful when working with large sums of money or valuable NFTs.
In traditional finance, a multisig wallet looks most similar to a joint bank account. With joint bank accounts, a bank acts as the gatekeeper for who can withdraw funds. If an owner's name is not listed on the account, the bank will deny the transaction and not allow funds to leave the account.
This, however, requires trust in a third party, the bank. While banks largely do the right thing, they can also make mistakes or be slow and difficult to use. Further, banks don't look into where the funds are going. An account owner could drain the joint account to his or her personal bank account before the other owners realize what happened. That's not possible with multisig wallets since they can be configured to require more than one approval before any funds move at all (and approvers can see where the funds are going!)
Decentralized autonomous organizations (DAOs) who don't have a bank account can keep their assets in a multisig wallet that requires multiple owners to transfer assets. That way, one bad actor can't drain the DAO of its resources. If a malicious transaction is submitted, the account owners can simply reject the transaction and stop it from executing.
Crypto projects typically have treasury accounts that they need to manage in a secure manner. These treasury accounts may contain USDC from fundraising or native project tokens. Rather than entrusting these assets to one or two founders, a project can use a multisig wallet to provide extra security to the funds and prevent a bad actor from draining the account.
The most popular multisig: Gnosis Safe
The most popular multisig wallet in use today is Gnosis Safe.
Because Gnosis is the most widely use multisig wallet, developers of decentralized apps have built direct integrations with Gnosis. For example, users of a Gnosis Safe are able to easily make trades through 1inch or lend out their assets on Aave v2.
Gnosis safe also supports all ERC-20 and ERC-721 tokens (NFTs), so you can collect NFTs with your friends or DAO.
As with any DeFi project, Gnosis safe is permissionless and anonymous; once their multisig smart contract code was deployed to Ethereum, anyone could use it however they wish.
If you'd like to try setting up a multisig wallet yourself, check out this useful tutorial from Rabbithole.
As an important enabler of shared assets and transactions, Gnosis will be a crucial part of the DeFi ecosystem.