pull down to refresh

Are timelocks specific to a UTXO, or is it possible to make a bitcoin address timelocked? For example, if I wanted all the utxos in one btc address to be timelocked for 4 years from today (whatever # of blocks that would be more or less), is that possible?
A use case could be, potentially: I want to deposit btc when I have extra into an address and i don't want any of the btc in that address to be available for 5 years. Say for like a child or... could even be a fundraiser where you ask people to deposit into an address and the fundraiser ends in 6 months.
My gut says no it just isn't the way I think transactions work but would be curious for other perspectives.
292 sats \ 0 replies \ @Scoresby 13h
Every bitcoin address is really just a locking script (learnmeabitcoin is good on this). So you could create an address with a timelock that applies to all the coins sent to that address. But I don't think it would be a good idea.
Timelocks in Bitcoin are super confusing because there are a number of ways to do them.
You may have heard of nLocktime, which is a field in every bitcoin transaction. You can include a value here that is interpreted either as a date or blockheight and its inclusion means that the transaction will not be treated as valid (won't be mined into a block) until that date or blockheight is reached. This kind of timelock doesn't apply to coins, but rather to the transaction and is probably the least useful kind of timelock and it definitely wouldn't help you do what you describe.
There are also timelocks that are enforced by Bitcoin Script. You may have heard of CLTV and CSV. CLTV is a way of locking your coins so that they cannot be spent until a certain blockheight or date is reached. CSV is a way of locking your coins so that they cannot be spent until a certain blockheight or timelength has passed since the utxos were created.
Here's a CLTV example: you generate an address with a locking script that uses CLTV to lock any coins sent to that address till block 950000. After a transaction is confirmed where you send coins to that address they won't be able to be spent in another transaction until blockheight 950000 is reached. If you send new coins to this address, they also won't be able to be mined until 950000.
Here's a CSV example: you generate an address with a locking script that uses CSV to lock any coins sent to that address for 1000 blocks. After a transaction is confirmed where you send coins to that address, they won't be able to be spent in another transaction until 1000 blocks have passed. However, if you send new coins to that block, the 1000 lock timer will start fresh for those coins, but not the ones that were already there.
Very few wallets (I believe you can do it in Sparrow) allow you to do customizable CLTV timelocks because of the risk of locking coins for a long time. If you get the number wrong, there is no recourse. Also a long timelock (5+ years) risks that Bitcoin changes in the meantime.
Wallets like Liana, Nunchuk, Keeper, and Bitcoin Safe allow you to do CSV "relative" timelocks, usually in conjunction with other paths to spending so that it's harder to shoot yourself in the foot. The downside is that these relative timelocks have to be "refreshed" by sending the coins to yourself to restart the timer. This is a pretty safe way to use timelocks and might work for your use case.
As to reusing addresses:
Remember from the top of this comment that addresses are just encodings of the locking script on your coins? A wallet is a way of generating a bunch of these addresses that all have the same locking scripts except that they require a signature from a different private key. This different key is derived from the master key to the wallet. Using this kind of construction helps to preserve your privacy by keeping the inputs separate until you decide to combine them in a spend.
So if you are determined to do something like this, I'd suggest creating a wallet and generating a new address for each time someone wants to send coins to it.
reply
You can not timelock a specific address but all utxo send to this address can be timelocked. So the participants of the fundraise have to submit a timelocked tx.
reply
i see, so as it stands the time lock occurs to the utxo(s) when you broadcast the transaction
reply
155 sats \ 3 replies \ @DarthCoin 13h
Make a test with Sparrow, the simplest one. Yes are other wallet apps that can do that. Create a "destination" wallet. From "source" wallet send a UTXO and set the timelock. It could fixed (based on block number) or variable (time/date)
All UTXO "deposits" on that destination wallet will be timelocked as you wish. This is the basic thing you can do now. If you want more complex transactions, will need to wait for covenants.
reply
oh interesting. Ya I will play around with that in Sparrow thanks
reply
55 sats \ 1 reply \ @DarthCoin 13h
Be careful with the timelock calculations! There was a guy that instead of 10 years he put 1000 years.... šŸ˜‚šŸ˜‚šŸ˜‚šŸ˜‚
reply
hahah, ill be careful and use a small utxos to test
reply
0 sats \ 0 replies \ @OT 8h
Yes.
You use Jam right? I believe the fidelity bond is time locked. And for that you need to make an onchain TX.
reply
What you want it could be solved with covenants
reply
It could be possible if UTXO is in bear market or red market the cases differs.
reply
I think I will try this time lock šŸ”’ transaction. That can help secure some funds not to spent until a specific time period.
reply