Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Yaunfitda on June 05, 2020, 01:58:51 PM



Title: The stair-pattern in time-locked Bitcoin transactions
Post by: Yaunfitda on June 05, 2020, 01:58:51 PM
I don't know if this has been tackled already, so pardon me if it is and point me to the right direction. I'm talking about the the supposedly bug in 'timelocked' transactions. It was exposed by supposedly by a German freelance developer, 0xB10C.

https://b10c.me/mempool-observations/1-locktime-stairs/

Quote
Conclusion
Some bitcoin wallets reduce the profitability by time-locking transactions to the next block. This appears as a stair-pattern when plotting the arrival time and the locktime of transactions. The plot reveals transactions with locktimes higher than the current block height. These should, usually, not be relayed through the Bitcoin network. This leads to the discovery that a large entity transacting on the Bitcoin network does not properly set the nSequence field of their transaction inputs. This allowed for the off-by-one-error in the transaction locktimes to remain unnoticed.

As per my understanding, timelocked transactions, is like a locking mechanism we found in banks, it is design to prevent or accessed a bitcoins until a certain number of blocks are added to the ledger.

But as per 0xB10C:

Quote
Some Bitcoin wallets specify a lock-by-block-height with the current height when creating a new transaction. This makes a potentially disruptive mining strategy, called fee-sniping, less profitable. Fee-sniping is currently not used by miners but could cause chain reorgs in the future. Since the block subsidy declines to zero over time, transaction fees will become the main monetary incentive for miners. If a recent block contains a transaction paying a relatively high fee, then it could be profitable for a larger miner to attempt to reorg this block. By mining a replacement block, the sniping miner can pay out the transaction fees to himself, as long as his block ends up in the strong-chain. The fee-sniping miner is not limited to pick the same transactions as the miner he is trying to snipe. He would want to maximize his profitability by picking the highest feerate transactions from both the to-be-replaced-block and the recently broadcast transactions currently residing in the mempool. The more hashrate a fee-sniping miner controls, the higher is the probability that he will win the block-race. Miners have the risk of losing such a block-race, leaving them without reward.


Title: Re: The stair-pattern in time-locked Bitcoin transactions
Post by: rhomelmabini on June 05, 2020, 02:27:22 PM
I am thinking this one was appropriate more on Devt and Technical Discussion board. You may opt to move this.