A 2-of-3 multisig wallet is a bitcoin wallet with three keys, where any two of them must sign to spend. No single key can move the coins, and no single lost key can lock them. This article explains how that works at the script level, what it protects against, what it costs you in complexity, and how to set one up without making a mess of the backups.
What a 2-of-3 multisig actually is
Bitcoin lets an output be locked to a script instead of a single public key. In a 2-of-3 multisig, the script holds three public keys and requires valid signatures from any two of them. On the modern segwit form, the script is hashed and the address commits to that hash (P2WSH). The three public keys only become visible on chain when you spend.
The three keys are independent. They are normally generated on different devices, by different people or in different places. That is the whole point: an attacker, a failed disk or a mistake has to hit two of them, not one.
Wallet software describes this setup with a descriptor. A descriptor is a short text that lists the script type, the threshold and the three extended public keys, so any compatible wallet can rebuild the same addresses. The multisig form is defined in BIP 383. The common sortedmulti variant sorts the public keys before building the script, so the order in which you list the keys does not change the address.
What 2-of-3 multisig protects against
The threshold of two gives you two kinds of safety at once.
- Loss. If one key is destroyed, the other two still sign. You then move the coins to a new wallet and replace the lost key.
- Theft or compromise. If one key leaks, the thief holds one signature out of the two needed. They cannot spend.
It does not protect against two keys failing together. If two keys are lost, the coins are gone. If two keys are stolen, the thief can spend. Good key placement is mostly about making that combination unlikely, for example by never keeping two keys in the same building, on the same phone or with the same person.
The table compares it with a single key.
| Event | Single key | 2-of-3 multisig |
|---|---|---|
| One key lost | Funds lost unless a backup exists | Funds safe, rotate the key |
| One key stolen | Funds stolen | Funds safe, rotate the key |
| Two keys lost | Funds lost | Funds lost |
| Two keys stolen | Funds stolen | Funds stolen |
| Setup and recovery effort | Low | Higher |
How a spend is signed
Signing is a passing of a partially signed transaction between devices. The format for this is the PSBT, defined in BIP 174. One device builds the transaction and adds its signature. The file then goes to a second device, which checks the details and adds the second signature. Once two signatures are present, the transaction is finalized and broadcast.
The practical consequence is that the keys never need to sit on one machine. A phone can hold one, a hardware device another, and a third can live in a safe. Only the PSBT travels.
Key derivation matters here too. Keys for multisig usually follow the paths in BIP 48, so that different wallets agree on where each key lives under the seed. Record the derivation path with each key. A seed alone, without the path, can make recovery slow.
Where the third key comes from
People often ask who should hold the three keys. There is no single right answer, but there are patterns that work.
- Everyday key. A device you use to sign day to day, ideally protected by a passkey or a hardware device.
- Backup key. Stored offline, away from the first. Some people split this key into shares with SLIP-39, so that any 2 of 3 shares restore it, and hand the shares to people they trust. No single share holder can rebuild the key alone.
- Third key. Held by a service, a second device or a trusted party that signs only when you ask.
If you use a service as one key holder, check one thing before anything else: can the service move funds with only its own key plus a second key it controls? In a correct setup it cannot, because it holds one key out of three. The other two must stay with you.
A setup and test checklist
In practice the hard part of multisig is process, not cryptography. Work through this list before you put meaningful money in.
- Generate each key on a separate device. Never create two keys from the same seed.
- Export the descriptor, with all three extended public keys. Store copies in several places. Without it, two seeds are not enough to find your coins quickly.
- Write down the derivation path and script type next to each key backup.
- Receive a small test amount to the first address and confirm the address matches on every signing device.
- Spend part of it, using two different signers, and watch the PSBT flow end to end.
- Practice a recovery: restore the wallet from the descriptor and two keys on a clean machine, without the third key.
- Write down who holds what, and what each person is asked to do if you are unreachable.
- Repeat the recovery test after any change to the setup.
Step 6 is the one people skip. A backup you have never restored is a guess.
The costs to accept
A multisig spend has more data in it than a single-key spend, because it carries several signatures and the script itself. The transaction is larger and so usually costs more in fees. Setup takes longer. Hardware wallet support varies, and not every app can read every descriptor. You also carry more secrets and more instructions to keep current. For a small amount you spend often, a single key may be the better fit. For savings you want to last years, the extra steps usually pay for themselves.
How Agent Treasury approaches it
Agent Treasury is a working prototype on regtest, a private bitcoin test network, at iteration 7. No real money moves and it is not live on mainnet. Its bitcoin vault for people is a 2-of-3 multisig (P2WSH sortedmulti, BIP 48 paths, descriptors and PSBT). The keys are the owner's device key, a recovery key split into Shamir shares for people the owner trusts, and the server key. The server signs only after the owner confirms that exact transaction with a passkey, so it cannot move funds alone. The device key and recovery key together can move funds without the server, and an exit tool ships with the software. An independent security audit is planned and has not been done. You can read the design in how Agent Treasury works.
This is non-custodial software in development, not a bank and not a licensed financial service. A public beta on signet is planned first, then mainnet with balance caps. Pricing is early access and billed only once mainnet opens; see early access for the plans.
Sources
Questions
What does 2 of 3 multisig mean?
It means a bitcoin wallet has three keys and any two of them must sign to spend. One key alone can neither spend nor, if lost, lock the funds.
What happens if I lose one key in a 2 of 3 multisig wallet?
You can still spend with the other two keys. Move the coins to a new wallet and replace the lost key, since you are now one failure away from losing access.
Do I need the wallet descriptor to recover a multisig wallet?
Yes, keep it. The descriptor lists the script type, threshold and all three public keys, and without it recovering the right addresses from two seeds is slow and error-prone.
Is 2 of 3 multisig safer than a single-key wallet?
It tolerates one lost or one stolen key, which a single key does not. It also adds setup effort and backup duties, so mistakes in the process can cancel the benefit.
Can I use hardware wallets in a 2 of 3 multisig?
Often yes, if they support multisig and PSBT signing. Check support for your script type and derivation path first, and test a small spend and a recovery before adding larger amounts.
Agent Treasury is a prototype on a bitcoin test network: no real money moves yet, and it has not been independently audited. This article is general information, not legal, tax or investment advice.