Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Deploying a Gnosis Safe Multi-Sig Wallet on a Testnet

Hello! In our last lesson, we established the theoretical foundation for multi-signature wallets, understanding their purpose for secure asset management and their architecture as smart contracts on Ethereum. We discussed why a single-key wallet is insufficient for managing a serious project's treasury and administrative controls.

Today, we transition from theory to practice. Your learning outcome is to deploy and configure a Gnosis Safe multi-sig wallet on a testnet. We'll be using Safe{Wallet} (the new name for Gnosis Safe), the industry-standard tool for this purpose. By the end of this lesson, you will have created your own secure, multi-owner wallet on the Sepolia testnet, a critical step in preparing for your token's launch.

Introduction to Safe{Wallet}

Safe is the most trusted platform for managing digital assets on Ethereum and other EVM-compatible chains. It began as a project within Gnosis and has since become the go-to solution for DAOs, businesses, and individuals needing robust security. At its core, a Safe is a smart contract wallet that you, and your team, will own and control.

Let's start with a short video that introduces Safe and its core value proposition.

Safe{Wallet}: How to Securely Set Up and Use Your Safe MultiSig Wallet (Step-by-Step Guide)

This video from The Defiant provides a concise overview of Safe{Wallet}, its history, and the fundamental concept of multi-signature smart accounts.

Watch the first 2 minutes and 49 seconds of the video to understand why Safe is the leading multi-sig provider and how its smart contract architecture offers enhanced security over standard Externally Owned Accounts (EOAs) like your MetaMask wallet.

Deploying Your First Safe on Sepolia

Now, let's get hands-on. We are going to create and deploy your own Safe on the Sepolia testnet. The process involves connecting your existing MetaMask wallet (which will act as one of the "signers"), defining the rules for your Safe, and deploying the smart contract.

We'll follow a step-by-step guide. While there are several resources available, the Cyfrin blog provides a clear and modern walkthrough that aligns perfectly with our goal.

How to Set Up a Safe Multi-Sig Wallet: Step-by-Step Guide

This article provides a complete, step-by-step guide for creating a Safe. We will use it as our primary reference for the deployment process.

Read the section titled 'Creating a Safe wallet'. Follow the steps carefully, but pause before you configure the signers, as we will discuss the setup in more detail below.

Configuring Owners and Threshold

This is the most critical step. As we learned previously, a multisig operates on an M-of-N model.

  • N: The total number of owner/signer addresses.
  • M: The required number of signatures (the threshold) to approve a transaction.

For this exercise, we will set up a 2-of-3 Safe. This configuration offers a great balance of security and redundancy. To do this, you will need three distinct Ethereum addresses. Your current MetaMask account can be the first one.

Action Required: Create Additional Signer Accounts
If you don't already have them, create two new accounts within your MetaMask wallet.

  1. Open MetaMask.
  2. Click the account circle/icon at the top right.
  3. Click "Create account".
  4. Give the accounts clear names (e.g., "Signer 2", "Signer 3").
  5. Make sure each new account has some Sepolia ETH. You can send it from your main account or use a faucet.

Now, you can proceed with the configuration in the Safe creation interface:

  1. Your connected MetaMask account will be listed as the first owner.
  2. Click "Add new owner" and paste the addresses of the two new accounts you just created.
  3. Set the confirmation threshold to 2. This means any two of the three owners can approve a transaction.
Gnosis Safe Account Creation on Sepolia Testnet
This image shows the configuration screen where you'll name your Safe, add owners, and set the signature threshold. For testnets like Sepolia, Safe often sponsors the deployment gas fee.

Once configured, review your setup and click "Create". You will be prompted to sign a transaction in MetaMask to deploy your Safe smart contract. After the transaction is confirmed, you'll be taken to your new Safe's dashboard!

Gnosis Safe Multi-signature Wallet Dashboard on Sepolia Testnet
The home dashboard of your newly created Safe. From here you can view assets, see pending transactions, and interact with other applications.

A Practical Walkthrough: Creating and Using Your Safe

To solidify your understanding, let's watch a video that demonstrates the entire process, including creating a Safe and executing the first transaction. This will help you visualize the steps you've just performed and prepare you for the next task.

Safe{Wallet}: How to Securely Set Up and Use Your Safe MultiSig Wallet (Step-by-Step Guide)

This section of The Defiant's video guide walks through the creation process and, crucially, shows how to execute a transaction that requires multiple signatures.

Watch from 02:49 to 05:59. The first part (until 03:55) will be a recap of what you just did. The second part (from 03:55 onwards) is new and demonstrates how to fund the Safe and then create, sign, and execute a multi-signature transaction. Pay close attention to how the user switches between wallets to provide the necessary confirmations.

Exercise: Execute Your First Multi-Signature Transaction

Now it's your turn to put your 2-of-3 Safe to use.

  1. Fund Your Safe: Copy your Safe's address (it's a new Ethereum address, displayed prominently on the dashboard) and send it ~0.1 Sepolia ETH from one of your MetaMask accounts.
  2. Propose a Transaction:
    • On the Safe dashboard, click "New transaction" and then "Send tokens".
    • Enter one of your EOA addresses as the recipient.
    • Enter a small amount, like 0.01 ETH.
    • Review and submit the transaction. You will need to sign this submission with your first owner account.
  3. Confirm the Transaction:
    • The transaction will now appear in the "Pending" queue, showing "1/2" confirmations.
    • Open MetaMask and switch to one of your other signer accounts (e.g., "Signer 2").
    • The Safe interface will update, showing you are now connected as the second owner. You will see a "Confirm" button on the pending transaction.
    • Click "Confirm" and sign the transaction with your second account.
  4. Execute: After the second confirmation, the transaction is fully approved. The button will change to "Execute". Click it and sign one last time to send the transaction to the network.

Congratulations! You have successfully performed a multi-signature transaction, experiencing firsthand how the M-of-N signature scheme provides distributed control.

Test your understanding!

You've set up a 2-of-3 Safe for your project. One of the three co-founders loses their laptop and believes their private key is compromised.

  1. Are the project funds in the Safe at immediate risk?
  2. What steps should the remaining two co-founders take?
Show answer
  1. No, the funds are not at immediate risk. The attacker only has one key, but two signatures are required to execute any transaction.
  2. The two remaining co-founders should use their keys to propose and approve a special transaction. They would navigate to Settings > Owners in the Safe and initiate a "Replace owner" transaction. They would replace the compromised address with a new, secure address provided by the third co-founder. Since they have 2 of the 3 keys, they can reach the threshold to execute this settings change, securing the Safe once again.

Conclusion

In this lesson, you took a significant practical step by deploying and configuring an industry-standard Safe multi-signature wallet. This is not just an academic exercise; this is the exact tool you will use to manage your project's treasury, control upgrades, and handle other administrative tasks securely. You've experienced the workflow of proposing, confirming, and executing a transaction that requires distributed trust.

Key Takeaways:

  • Safe{Wallet} is a smart contract wallet that provides multi-signature capabilities on Ethereum.
  • Deployment involves connecting a signer wallet (like MetaMask), choosing a network, defining a list of owners (N), and setting a signature threshold (M).
  • A 2-of-3 setup is a common and robust configuration that provides security against a single point of failure while maintaining operational flexibility.
  • Executing a multisig transaction is a multi-step process: propose, confirm (with enough signers to meet the threshold), and execute.

Preview of the Next Lesson:

Now that you have a functional multi-sig wallet, the next step is to use it for a realistic purpose. In the next lesson, we will focus on the task of executing a treasury transaction. We'll simulate transferring funds from the Safe to another address, representing a common operational task like paying a developer or funding a marketing campaign, all under the security of your multi-signature setup.

Can't find a good explanation? Sign up and we'll make it for you

Sign up