Multi-Sig ownership

Hey all, pretty new to Solana development and the tools involved but I’ve done some work in Solidity and C++. I’m trying to create a contract (I believe it’s a program) that takes in payments from multiple accounts, signatures from multiple accounts, and when everyone has added their part it executes.

I found the multisig package from serum and I think it addresses my issue but I’ve ran into a situation I don’t think I encountered in Solidity. The serum package will only take input/a signature from accounts that “own” the program. As part of my functionality I won’t know who the accounts who want to make payments will be until they choose to engage with my program.

Is there a way to assign ownership on the fly, and then burn that ownership after execution? Is this just a fundamental disconnect with the way I should work with this program? Any solutions or input welcome, thank you for your time!

Hi @Nzupp and welcome to the forum! :wave:

I’ve not seen the multisig program from Serum before, but it looks very cool and useful so thanks for pointing it out! :slight_smile:

Anyway, after looking deeper into it, I think I know what your issue is.

:information_source: Note: Before I go any further I want to make clear that you don’t need the multisig program, if you are able to get the signatures from multiple users at the same time through some off-chain mechanism.

For instance, if your web-app had all the users who needed to sign the transaction online at the same time or connected to some server app, then you could have that app collect signatures for all the users before submitting the transaction to the chain, all without requiring the special multisig program.

The multisig program is only needed if you want to be able to have multiple users sign a transaction fully on-chain, with no other coordination mechanism.

First, let’s make sure we’re on the same page on the general workflow for using the multisig program.

  1. You have some kind of operation that needs multiple signatures to be approved.
  2. Any of your users creates a new multisig address.
    • This requires submitting a create_multisig transaction to the multisig program to create the address.
    • When creating the multisig address we specify the owners of the address and how many must sign transactions for approval
  3. Now any of the owners can create a multisig transaction by sending the create_transaction instruction to the multisig program
  4. After the transaction has been created, the specified numbers of users must then submit an approve transaction to the multisig program, specifying the multisig transaction that was previously created in step 3.
  5. One of the owners of the multisig account must then send the execute_transaction command to the multisig program, specifying the transaction created in step 3.

I think you are getting stuck at step 2, where you try to pass in the multisig account, right?

The account that you pass in as an argument to the create_multisig instruction must be uninitialized. You create the account address by generating a keypair, getting the public address, passing that address into the program. You should not initialize the account with any data. Also you need to use the account’s keypair to sign the create_multisig transaction.

That’s not quite right. It’s the other way around. The multisig program needs to own the account passed in. That is why we pass in an uninitialized account. Then the create_multisig instruction will take that un-initialized account and transfer ownership of the account to the multisig program. This ensures that nobody can now use that multisig account to sign transactions, other than the multisig program itself.

I hope that helps explain things a little bit. If you have any questions let me know!

Also, I haven’t used this program specifically before, so I may not have gotten everything right either.

If this post helped you I’d really appreciate a tip, no matter how small, in whatever tokens you prefer. It will help me spend time helping people on this forum and learning more about crypto.

My Solana/SPL token wallet address is BE5xzCpwikZGDu7Gmbs33vgEAXxWTuJYWjZrqkFFexZy .
My Ethereum/BSC/ERC-20/BEP-20 wallet address is 0x336ba81544f782D4D403e293De97cC50Ad902C81.


I just discovered that there already seems to be a multisignature functionality in some smart contract, used by the SPL token example. I’m not sure if it’s general purpose enough to be used by anything or not yet, though:

Edit: Looks like it’s specific to use with the SPL token program, so not general purpose, but if all you need is a multisig authority for SPL tokens that could still be useful to you.

1 Like

hi there, a bit late to this thread but wanted to share our latest multisig product here, in case anyone might find it useful. and as others mentioned, serum multisig and spl governance program are great options as well.

It doesn’t have support for assigning ownership on the fly and burn after execution, but something we might look into if this is enough demand for such use case. another option I could think of is to spin up a multisig and close it right after execution.


1 Like