Bitcoin Fragment Address

There are 3 ways which the sweep script can be redeemed:

  1. 3 of 5 Signature + SweepHash

  2. 3 of 5 Signature + Refund Signature

  3. 3 of 5 Signature after timeout

This address will be used for both Sweep and Refund Tx. Before the address can receive a sweep, it must sign a refund tx with a timeout.

# multisig check
<cltv_expiry> OP_CHECKTIMELOCKVERIFY OP_DROP 
3 <Public Key A> <Public Key B> <Public Key C> <Public Key D> <Public Key E> 5 
CHECKMULTISIGVERIFY

# Sweep preimage check 
OP_SIZE 32 OP_EQUALVERIFY OP_HASH160 <RIPEMD160(sweep_hash)> OP_EQUAL

OP_IFDUP 

OP_NOTIF
# Refund signature check 
<judge_pubkey> OP_CHECKSIG
		
		OP_NOTIF
		# timelock check
		'DelayPeriod' OP_CHECKSEQUENCEVERIFY OP_DROP
		OP_ENDIF

OP_ENDIF

Judge Pub key in the OP_NOTIF is different than the active fragment judge for the sweep.

Scenario 1

SweepTx Redeem Script

<sweep_preimage_true> 0 <sig1> <sig2> <sig3> //<cltv_expiry>

Scenario 2

RefundTx Redeem Script

<refund_sig> <sweep_preimage_false> <> 0 //<cltv_expiry>

Scenario 3

Timeout Redeem Script

<> <0?> <sweep_preimage_false> 0 <sig1> <sig2> <sig3> //<cltv_expiry>

Last updated