Taproot Multisig
Slides: https://jimmysong.github.io/taproot-multisig
Overview
- Review Taproot
- Traditional Multisig
- Single-leaf k-of-n Multisig
- Multi-leaf k-of-k Multisig
- Multi-leaf k-of-k MuSig
- Everything Multisig
- Degrading MultiSig
Taproot Overview
- Key Path spend requires a Schnorr signature of the point on the Elliptic Curve.
- Script Path spend requires satisfying a TapScript from a TapRoot tree.
- A TapRoot tree can have up to $2^{128}$ different TapScripts!
Traditional Multisig Script
ScriptPubKey
OP_2
PubKey A
PubKey B
PubKey C
OP_3
OP_CHECKMULTISIG
ScriptSig
OP_0
Signature for A
Signature for C
Stack
OP_0
Signature for A
Signature for C
OP_2
PubKey A
PubKey B
PubKey C
OP_3
OP_CHECKMULTISIG
Traditional Multisig Script
Execution
OP_0
Signature for A
Signature for C
OP_2
PubKey A
PubKey B
PubKey C
OP_3
OP_CHECKMULTISIG
Traditional Multisig Script
Current OP
OP_CHECKMULTISIG
Stack
3
PubKey C
PubKey B
PubKey A
2
Signature for C
Signature for A
0
Traditional Multisig Script
Traditional Advantages/Disadvantages
- Non-interactive
- Signers can be determined as you go
- All unlocking conditions revealed
- Public Keys identified
- Large fees
Single-leaf Multisig TapScript
Taproot Structure
-
Tweaked Pubkey
-
3-of-3 MuSig
-
2-of-3 TapScript
k-of-n TapScript
TapScript
PubKey A
OP_CHECKSIG
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Witness
Signature for C
''
Signature for A
Execution
Signature for C
''
Signature for A
PubKey A
OP_CHECKSIG
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Execution
Signature for C
''
Signature for A
PubKey A
OP_CHECKSIG
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Single-leaf Multisig
Execution
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Stack
PubKey A
Signature for A
''
Signature for C
Single-leaf Multisig
Execution
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Stack
1
''
Signature for C
Single-leaf Multisig
Execution
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Current OP
OP_CHECKSIGADD
Stack
PubKey B
1
''
Signature for C
Single-leaf Multisig
Execution
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Single-leaf Multisig
Execution
OP_2
OP_NUMEQUAL
Current OP
OP_CHECKSIGADD
Stack
PubKey C
1
Signature for C
Single-leaf Multisig
Execution
OP_2
OP_NUMEQUAL
Single-Leaf Advantages/Disadvantages
- Non-interactive
- Signers can be determined as you go
- All unlocking conditions revealed
- Public Keys Identifiable
- Large fees
Multi-leaf k-of-k TapScript
k-of-k TapScript
TapScript
PubKey A
OP_CHECKSIG
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Witness
Signature for C
Signature for A
Execution
Signature for C
Signature for A
PubKey A
OP_CHECKSIG
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Execution
Signature for C
Signature for A
PubKey A
OP_CHECKSIG
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Multi-leaf k-of-k Multisig
Execution
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Stack
PubKey A
Signature for A
Signature for C
Multi-leaf k-of-k Multisig
Execution
PubKey C
OP_CHECKSIGADD
OP_2
OP_NUMEQUAL
Multi-leaf k-of-k Multisig
Execution
OP_2
OP_NUMEQUAL
Current OP
OP_CHECKSIGADD
Stack
PubKey C
1
Signature for C
Multi-leaf k-of-k Multisig
Execution
OP_2
OP_NUMEQUAL
Multi-leaf k-of-k Multisig
Multi-leaf k-of-k Multisig
Multi-leaf Advantages/Disadvantages
- Non-interactive
- Signers must be determined beforehand
- Only one unlocking condition revealed
- Public Keys Identifiable
- Smaller fees
Multi-leaf Musig TapScript
Taproot Structure
-
Tweaked Pubkey
-
2-of-2 MuSig
-
Tweak
-
2-of-2 MuSig
-
2-of-2 MuSig
Multi-leaf MuSig
TapScript
PubKey A+C
OP_CHECKSIG
Execution
Sig for A+C
PubKey A+C
OP_CHECKSIG
Multi-leaf MuSig
Execution
Sig for A+C
PubKey A+C
OP_CHECKSIG
Multi-leaf MuSig
Stack
PubKey A+C
Sig for A+C
Multi-leaf MuSig Advantages/Disadvantages
- Interactive
- Signers must be determined beforehand
- Only one unlocking condition revealed
- Public Keys not revealed, higher privacy
- Smallest fees
Everything Advantages/Disadvantages
- Interactive or Non-interactive
- Signers can be determined beforehand
- Reveal whatever conditions you want
- Public Keys may or may not be identifiable
- Fees traded off
Degrading Multisig TapScript
timelocked k-1-of-n TapScript
TapScript
1 yr
OP_CSV
OP_DROP
PubKey A
OP_CHECKSIG
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_1
OP_NUMEQUAL
Witness
''
Signature for B
''
Execution
''
Signature for B
''
1 yr
OP_CSV
OP_DROP
PubKey A
OP_CHECKSIG
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_1
OP_NUMEQUAL
Execution
''
Signature for B
''
1 yr
OP_CSV
OP_DROP
PubKey A
OP_CHECKSIG
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_1
OP_NUMEQUAL
Degrading Multisig
Execution
OP_DROP
PubKey A
OP_CHECKSIG
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_1
OP_NUMEQUAL
Stack
1 yr
''
Signature for B
''
Degrading Multisig
Execution
PubKey A
OP_CHECKSIG
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_1
OP_NUMEQUAL
Stack
1 yr
''
Signature for B
''
Degrading Multisig
Execution
PubKey B
OP_CHECKSIGADD
PubKey C
OP_CHECKSIGADD
OP_1
OP_NUMEQUAL
Stack
PubKey A
''
Signature for B
''
Degrading Multisig
Execution
PubKey C
OP_CHECKSIGADD
OP_1
OP_NUMEQUAL
Current OP
OP_CHECKSIGADD
Stack
PubKey B
0
Signature for B
''
Degrading Multisig
Execution
OP_1
OP_NUMEQUAL
Current OP
OP_CHECKSIGADD
Degrading Multisig Advantages/Disadvantages
- Backup in case of Key Loss
- Built-in Inheritance/Estate planning
- Funds have to be moved before timelock