12

Funds get blocked for a few blocks while sending/getting a transaction.

What is the purpose of it and how does it work?

2 Answers 2

10

I think the main purpose is to just prevent you from trying to spend a tx output that gets re-orged out of existence. At any point a block, or the last several blocks, or a lot of blocks can get orphaned, and the transactions included in them will be invalidated. However, the probability of a block getting orphaned decreases exponentially as more blocks are built on top of it (see the frequency of orphaned blocks here). So, it is really just a judgment call by the client software that after 'x' number of blocks there is an extremely low probability that the block containing that tx will get orphaned. In Monero the coins are "locked" for ten blocks, or what is now about 20 minutes, while in Bitcoin the core client software recommends waiting six blocks, or about 60 minutes (although the Bitcoin software refers to these coins as unconfirmed, not locked).

5

As jwinterm said, this is to avoid outputs being reused shortly after being created, in case of reorganizations.

It is important to realize that the effects of an output being invalidated are more severe in Monero than Bitcoin. In Bitcoin, if an input is invalidated, any transaction using it as an input is also invalidated. In Monero, the same applies, but the difference is that this output can be used by any blockchain user in Monero, as a partner in ring signatures, so an output can potentially be reused early with more probability than in Bitcoin.

3
  • So do I get this right: when picking decoy outputs for mixin, we're using those older than 10 blocks to avoid the risk of them disappearing due to re-org and invalidating the tx. If we know everyone is doing this, then an output in my transaction using, say, an output 2 blocks old would clearly be sticking out, and that's why we have to lock it - not only for reorgs, but also for privacy? If someone were to mod the client to not lock, he'd have to also make transactions take some decoys from the <10 height to maintain privacy but then he's exposed to re-org risk...
    – JollyMort
    Commented Nov 28, 2016 at 0:05
  • The tx would be rejected.
    – user36303
    Commented Nov 28, 2016 at 0:19
  • Follow-up: monero.stackexchange.com/questions/4579/… :)
    – JollyMort
    Commented Jul 24, 2017 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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