Post
Topic
Board Development & Technical Discussion
Merits 2 from 2 users
Re: Lightning Network over mempool using Replace By Fee
by
HeRetiK
on 20/02/2020, 14:34:21 UTC
⭐ Merited by Wind_FURY (1) ,ETFbitcoin (1)
The network will see Alice->Bob transaction earlier than Alice->Daniel transaction and reject the second one as a double-spending attempt. A node should know all replaced transactions before doing a replacement, because it is needed to prove that it is not a double-spending attempt.

I don't think so. As far as I know, you can invalidate a timelock transaction if you spend one of its inputs before the timelock. It shouldn't be considered as a double-spend attempt.

Yep. Timelocking a transaction only ensures that the timelocked transaction itself won't be accepted before the end of the timelock. You can still spend the very same coins in other transactions. That's why you can use them as part of a Dead Man's switch setup, for example.

Also, I wouldn't rely on the mempool alone to prevent double-spending. If that's all it took we wouldn't need a blockchain.

Also, mempools don't stick around forever. A timelocked transaction that's not being added to the blockchain, will get removed eventually. To make matters worse each mempool keeps transactions around for different timeframes. So the "channel state" will quicky diverge over time as mempools diverge.

Come to think of it, I'm not even sure whether a not-yet-spendable timelocked transaction is guarantueed to stick around the mempool in the first place.