Skip to main content

Multisig Wallet Spec

See DAO Frontier for more on purpose and future direction of DAOs. For more on engineering how-to, see source code analysis of leading DAO projects.

Fundamentals

Governance / Voting

  • Immutable
  • Decentralised
  • Transparent

Design

Verified Address owners can Vote on Proposals to implement Transactions.

Taking a Proposal as a Transaction that has not been executed.

Decisions to be made on how to design and implement the operations of the DAO.

Questions

  • What different types of decisions?
  • What works best?
  • What decisions are more problematic?
  • How is accountability tracked?

Voting Mechanism

ERC20 token or NFT to provide voting power. Important decision

Voting Communication

Needs a place for discourse to work out what is being voted on.

Can use snapshot as tool to manage votes or run preliminary check on sentiment.

Question

Do most DAOs have this offchain?

UX Flow

See Compound for an example governance flow.

See coordinape

SRE Challenge

Completing this challenge will:

  • Provide a DAO starter kit
  • Know how to better protect your funds
  • Learn how to use calldata
  • How to recover signatures (essential)

Clone scaffold-eth from the master branch then you can refer to the following branch to cherry pick code you think you need to implement the challenge.

https://github.com/scaffold-eth/scaffold-eth-examples/tree/meta-multi-sig
caution

There are some weird things in the meta-multi-sig branch you don't need like the transferFunds (instead of just sending value in the call) So the UI also has some extra weirdness.

Checkpoints

  • edit and deploy the contract with a 2/3 multisig with two of your addresses and the buidlguidl multisig as the third signer. (buidlguidl.eth is like your backup recovery.)
  • propose basic transactions with the frontend that sends them to the backend.
  • vote on a proposal/transaction as other signers
  • execute the transaction
  • add or remove signers with a custom dialog (that just sends you to the create transaction dialog with the correct calldata)????
tip

🧪 This build will require a good knowledge of signed messages. See signature-recover branch

https://github.com/scaffold-eth/scaffold-eth-examples/tree/signature-recover

Notes

MaartenD

So is the main objective is making the call() work to transferFunds?

Austin

Yeah that's a good first start 🙂 Getting multiple signers together to send eth out of the multisig.

But once you can make a transaction, the next step is to craft the calldata to allow your multisig interact with other dapps.

For instance what if you want your multisig to swap ETH to DAI using Uniswap? The secret here is to wallet connect (See punk wallet) into Uniswap as your multisig performing the swap in the UI which then proposes the swap back to your multisig.

Steve

It's fair that you have questions! One of the missions of this cohort is to help create the more formal, updated repo that will serve as the go-to challenge for multisig.

For now, this is how I interpret the challenge:

  1. Write a multisig contract with addSigner and removeSigner functions.
  2. Get the front-end working with it and understand how the project works with off-chain and on-chain transactions / steps. Hint: use of recover and understanding how hexstrings and hashes work.
  3. Pull components from scaffoled-eth example repo that Chris has updated (thanks!). The front-end components will work nicely with your code.
  4. Once you get the base of the challenge done, see if you can call a function from an external contract such as uniswap swap ETH for DAI, and have your multisig owners vote on it.

The first 3 steps... tbh you can probably just use the implementation code (smart contracts) and front-end that Chris has created. You'll have to figure out how to bring in a scanning component from punkwallet branch from scaffold-eth repo (not scaffold-eth examples repo)

Unclear

  • for contributing back to the challenges and making components out of these UI elements that can go back to master or be forked to make a formal challenge - ????
  • multisig as a service! Create a deploy button with a copy paste dialog for sharing so anyone can make a multisig at your url with your frontend - ????

SRE Solution

👉 Post your Multisig build and others to 🏤 (https://bazaar.buidlguidl.com/) Bazaar.BuidlGuidl.com (DM @austingriffith your ENS for access)

💬 Further clarifications for future folks who'll drop in later: Autograder and other SE challenges related components goes to the Scafold-eth-challenges branch, the meta-multi-sig is there to inspire a functionning build as it serves as an example.

Variations

https://github.com/gjacuna/multisigchallenge
https://github.com/squirtleDevs/squirtle-scaffold-eth-examples/tree/challenge-4-meta-multi-sig
https://github.com/squirtleDevs/squirtle-scaffold-eth-examples/tree/challenge-4-scanning-meta-multi-sig

Context