P2SH-P2WSH Overview
P2SH-P2WSH: Nested SegWit Multisig
P2SH-P2WSH (Nested SegWit Multisig) is the more advanced sibling of the single-key Nested SegWit format. It allows organizations and power users to run complex multisig wallets with lower fees while maintaining compatibility with legacy Bitcoin "3" addresses.
1. Multi-Layer Security
Nested SegWit Multisig uses a three-layer "Matryoshka doll" structure:
-
Layer 1 (The P2SH Wrapper): A standard address starting with 3.
-
Layer 2 (The P2WSH Signal): A 34-byte script that tells the network to use the Witness logic.
-
Layer 3 (The Witness Script): The actual M-of-N multisig logic.
2. Why Use Nested Multisig?
In 2017 and 2018, many multisig hardware wallets and institutional custody providers were slow to adopt the new Bech32 (bc1...) addresses. Nested SegWit Multisig allowed them to:
-
Save Money: Multisig transactions are large. Moving the signatures to the Witness field provided massive fee savings (often 40-50% for complex scripts).
-
Compatibility: They could still receive funds from old exchanges that only understood "1" and "3" addresses.
3. The 34-Byte Identifier
While single-key Nested SegWit uses a 22-byte script, Multisig Nested SegWit uses a 34-byte script. This difference is critical for nodes to know whether they are looking for a public key or a complex script hash.
4. The Legacy Standard
For several years, P2SH-P2WSH was the "Gold Standard" for institutional Bitcoin storage. It combined the battle-tested security of P2SH with the modern efficiency of SegWit.
| Feature | Legacy Multisig (P2SH) | Nested SegWit Multisig | Native SegWit Multisig |
|---|---|---|---|
| Address | Starts with 3 | Starts with 3 | Starts with bc1q |
| Hash Size | 20 Bytes (HASH160) | 32 Bytes (SHA256) | 32 Bytes (SHA256) |
| Fee Savings | 0% | ~40-50% | ~50-60% |
| Structure | Script in Input | Script in Witness | Script in Witness |
In the next section, we will analyze the 34-byte Redeem Script.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: