bitcoin-keeper icon indicating copy to clipboard operation
bitcoin-keeper copied to clipboard

Timelock

Open antuz123 opened this issue 3 years ago • 6 comments
trafficstars

A user can choose to additionally apply a time lock on their Vault. This can be done from:

  1. Vault settings - a new Vault gets created and transfer happens like any ~~2. While upgrading or downgrading or changing SD, the user has an additional option to add time lock.~~ Parked for later - pls create an issue.

When the user initiates Timelock, they enter time. The UI shows corresponding blocks as approximation for that time (similar to the fee in Hexa). The user is warned after this that they can't change it once applied. If the user confirms, they do the transfer to the new Vault and the time lock is applied.

A time lock when applied can be seen on the Vault details screen and the Home Screen.

When the user tries to send before the time lock expires, the app suggests that "it seems you have applied a time lock" the user can broadcast anyway or cancel sending. If the user does broadcast/ send, there should be a proper error that is handled. Error message "One or more of the script condition not met".

antuz123 avatar Oct 03 '22 05:10 antuz123

Vault Settings: https://xd.adobe.com/view/2f898159-6ee5-4b4a-836f-71408f7e5b5a-7ada/screen/bf791a99-c0d8-411a-b5dd-e14eab68ef6a/

Vault Detail: https://xd.adobe.com/view/2f898159-6ee5-4b4a-836f-71408f7e5b5a-7ada/screen/807f3d33-377b-4186-9a43-618321a1915e/

Home Screen: https://xd.adobe.com/view/2f898159-6ee5-4b4a-836f-71408f7e5b5a-7ada/screen/dd3af8e4-4637-4393-8982-a28429edb66c/

summikhan11 avatar Oct 05 '22 04:10 summikhan11

Latest on timelock: https://github.com/bithyve/bitcoin-keeper/commit/0ce31d7bf7adcb61c574edac887655899ef9b2e3

Timelock has been parked in the backlog as finalizing a PSBT w/ a custom bitcoin-script(time-locked multi-sig) is leading to issues as bitcoinjs-lib doesn't provide API for timelock(absolute or relative). There's an example provided by bitcoinjs-lib on how to perform finalization for such custom scripts, however, is not officially supported by the bitcoinjs team.

Parsh avatar Oct 20 '22 12:10 Parsh

Notes:

Time lock(POC):

  • Feasibility check (one address & timelock)
  • Sufficient warnings(multisig not possible, it is experimental, don’t lock for long)
  • Limited time, 6m, 1yr (2yr/5yr options shown but disabled)
  • How to recover a timelock-based vault outside of Keeper(independent recovery)

Parsh avatar Jan 11 '23 03:01 Parsh

This may have to be done with Ledger and Miniscript. Also, BitBox and Spector it seems - https://twitter.com/StepanSnigirev/status/1231017175546236928?s=20&t=zlekjrEWPComZVUixObfKw

antuz123 avatar Jan 16 '23 05:01 antuz123

Note: Given that we've multiple vaults now, the description of this issue should be read with that context in mind.

Parsh avatar Jan 22 '24 10:01 Parsh

Dependency #3864 Tracked via #4007

Parsh avatar Mar 01 '24 04:03 Parsh