pull down to refresh

Reviewing your script, I think it has two problems:
(1) it appears like the 3 of 5 option has to wait a year. Based on your description, I don't think that's what you want. You said, "You can spend money at any time with 3 of 5." But the script for the 3 of 5 has a 1 year timelock just like the one for the non-3-of-5.
(2) It appears like the 2-of-5 script and the 1-of-5 script are currently encumbered by an identical timelock. Which means the 1-of-5 person can take the money after waiting only 1 year. Based on your description, I don't think that's what you want. You said, "after another 52596 blocks, the multi-sig reverts to 1 of 5," and I think by "another 52596 blocks" you mean "an additional 52596 blocks."
To fix these issues, you could rewrite the script like this:
IF //this branch requires no timelock at all, so the 3 of 5 can spend at any time 3 <pubKey1> <pubKey2> <pubKey3> <pubKey4> <pubKey5> 5 OP_CHECKMULTISIG ELSE //the following branches are encumbered by different timelocks IF //if you only have 2 keys out of 5, you have to wait 1 year //but the 3 of 5 can renew the 1 year wait time by spending the money //before the year is up using the branch above this one <52596> OP_CHECKSEQUENCEVERIFY OP_DROP 2 <pubKey1> <pubKey2> <pubKey3> <pubKey4> <pubKey5> 5 OP_CHECKMULTISIG ELSE //if you only have 1 key out of 5, you have to wait 2 years //but the 3 of 5 can renew the 2 year wait time by spending the money //before the 2 years are up using the first branch //and the 2 of 5 can also renew the 2 year wait time by spending the money //before the 2 years are up using the branch above this one //though only after themselves waiting at least 1 year <105192> OP_CHECKSEQUENCEVERIFY OP_DROP 1 <pubKey1> <pubKey2> <pubKey3> <pubKey4> <pubKey5> 5 OP_CHECKMULTISIG ENDIF ENDIF
This is very helpful! I really enjoy these OP code puzzles that solve established use cases. Cheers!
reply