4

Electrum includes a locktime in all transactions by default.

Usually the value is equal to the current block height, eg 592918, however it sometimes drops perhaps 20 or so blocks.

What is going on here?

5

The locktime value is deliberately set to discourage a subtle attack known as "Fee sniping" and randomly set to an earlier block height to improve privacy (eg for CoinJoin users that need more setup time).

This is also done in Bitcoin Core with the nLockTime.

| improve this answer | |
1

Both Bitcoin Core and Electrum have very similar behavior when it comes to setting the locktime. As already stated in your answer, this is used to prevent fee sniping. However, besides setting the locktime to the current block height, they also choose a random block height from 99 blocks into the past on average every 10 transactions here in Bitcoin, here in Electrum. This is additionally done to give better privacy to transactions that are withheld for some time after signing (like Coinjoin transactions).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.