<p>Yes, you can create a script to lock your funds for a certain amount of time/blocks. For example, this script requires you to wait 2016 blocks (about 2 weeks) after the output is confirmed before you can spend it with a single key:</p>
<pre><code>OP_PUSHBYTES_2 0xe007
OP_CHECKSEQUENCEVERIFY
OP_DROP
OP_PUSHBYTES_33 &lt;public key&gt;
OP_CHECKSIG
</code></pre>
<p>In this case, the script does not in any way permit spending the output before the locktime expires, so it is as you say &quot;completely locked&quot;. However, you can add conditional branches to the script that allow you to skip the timelock if some other condition is satisfied. For example, this script requires you to either wait 2016 blocks and spend with one of two keys, or spend with both keys at any time:</p>
<pre><code>OP_IF
  OP_PUSHBYTES_2 0xe007
  OP_CHECKSEQUENCEVERIFY
  OP_DROP
  OP_1
OP_ELSE
  OP_2
OP_ENDIF
OP_PUSHBYTES_33 &lt;public key 1&gt;
OP_PUSHBYTES_33 &lt;public key 2&gt;
OP_2
OP_CHECKMULTISIG
</code></pre>

CC BY-SA 4.0
2024-10-18T22:36:14.263Z
2024-10-18T22:36:14.263Z
Vojtěch Strnad
<p>Context: I want to send funds to myself in Bitcoin but prevent them from being spent until a specified period has passed, using Relative Locktime (BIP 68). I'm exploring whether this is possible and how it affects the state of the UTXOs before the locktime expires.</p>
<p>Question:</p>
<ol>
<li>Is it possible to use Relative Locktime (BIP 68) to send funds to myself that will only become spendable after a certain amount of time or blocks have passed?</li>
<li>What is the state of the UTXOs before the relative locktime expires? Can they be used in any way, or are they completely locked until the specified time or block count has passed?
Thank you in advance for your insights!</li>
</ol>

<script><utxo><locktime><hash-time-locked-contract><checksequenceverify>
Can I use Relative Locktime (BIP 68) to send funds to myself that can only be spent after a specific time in Bitcoin?
Nerses Asaturyan
# Can I use Relative Locktime (BIP 68) to send funds to myself that can only be spent after a specific time in Bitcoin?

(Asked by: username_0 on 2024-10-18)

Context: I want to send funds to myself in Bitcoin but prevent them from being spent until a specified period has passed, using Relative Locktime (BIP 68). I'm exploring whether this is possible and how it affects the state of the UTXOs before the locktime expires.

Question:

1. Is it possible to use Relative Locktime (BIP 68) to send funds to myself that will only become spendable after a certain amount of time or blocks have passed?
2. What is the state of the UTXOs before the relative locktime expires? Can they be used in any way, or are they completely locked until the specified time or block count has passed?
   Thank you in advance for your insights!

**Tags:** script, utxo, locktime, hash-time-locked-contract, checksequenceverify


---

## 1 answers

### Answer by username_1 on 2024-10-18. Score: 2 | Accepted answer

Yes, you can create a script to lock your funds for a certain amount of time/blocks. For example, this script requires you to wait 2016 blocks (about 2 weeks) after the output is confirmed before you can spend it with a single key:

```
OP_PUSHBYTES_2 0xe007
OP_CHECKSEQUENCEVERIFY
OP_DROP
OP_PUSHBYTES_33 <public key>
OP_CHECKSIG

```

In this case, the script does not in any way permit spending the output before the locktime expires, so it is as you say "completely locked". However, you can add conditional branches to the script that allow you to skip the timelock if some other condition is satisfied. For example, this script requires you to either wait 2016 blocks and spend with one of two keys, or spend with both keys at any time:

```
OP_IF
  OP_PUSHBYTES_2 0xe007
  OP_CHECKSEQUENCEVERIFY
  OP_DROP
  OP_1
OP_ELSE
  OP_2
OP_ENDIF
OP_PUSHBYTES_33 <public key 1>
OP_PUSHBYTES_33 <public key 2>
OP_2
OP_CHECKMULTISIG

```


---

