Transactions can be prepared in advance and sent at a certain time. Locktime further improves privacy when Broadcast over a different network. Transactions can be created that will send funds to another address if the transaction is not replaced by a certain time, acting as a dead man's switch.
Locktime can preserve privacy by letting you sign your transaction, copy the signed data to a memory stick, and broadcast it from a public location so you don't reveal your IP address or other identifying data.
Locktime can also be used to set funds to transfer if no action is taken by the user. This could be useful for easy inheritance planning for cryptocurrency: send a transaction to an address owned by your next of kin with Locktime set for one year. If you are still alive and well when the transaction is due to be sent, resend the same transaction but extend the Locktime by one more year.
It sets the earliest time a transaction can be mined into a block. It is possible to use locktime with Trezor to make sure that a transaction is locked until a specific block height or a point in time.
1. Calculate the block you would like to add your transaction into: current block height + number of blocks to wait for adding the transaction.
2. In the account Send tab, click on 'Add locktime' in the bottom-left corner of the transaction details pane:
3. If you add a future block as a locktime in your transaction, an error will appear on your screen. No need to worry, Trezor Suite just cannot broadcast the transaction because of the selected locktime. You can now copy the raw transaction in hex format and save it. It is necessary to broadcast the transaction after the given block is reached directly within Trezor Suite or by using any external broadcast transaction tool like this one.
Using block height to set a Locktime is not very accurate as new blocks are mined on average once every 10 minutes, meaning around 144 blocks mined per day. This number varies depending on the state of the network, and some blocks can take much longer to be mined.
Unix timestamps are used for more precise timing synchronized across computers. They track the number of seconds which have passed since January 1, 1970.
Use a Unix timestamp converter to see the current timestamp and calculate a timestamp for a precise time in the future. Setting a Locktime is as simple as increasing the current timestamp by the number of seconds it should be delayed.
For example, if the current timestamp is 1625215800 and the desired Locktime is one week, the Unix timestamp to enter would be 1625820600 (the current timestamp plus one week, or 604800 seconds).