1

In the wallet I use a transaction gets a "number of confirmations" and is indicated as "low" (red), "medium"(yellow), or "high"(green) confidence based on that number.

I have access to db-sync and can examine all sorts of information about transactions, but am not seeing how "number of confirmations" is derived..?

1 Answer 1

4

Number of confirmations refers to how "deep" the block containing the transaction is in the chain, relative to the current tip. For example, if my transaction was included in block #10, then it will be "confirmed" 5 times once my local copy of the chain is at block #15.

In other words, number of confirmations is the difference between the current block height and the height of the block in which the transaction was initially submitted.

3
  • Thank you! I still don't understand how being 100 blocks "old" makes a transaction any more immutable than it already was once it was a transaction on the most recently accepted block. Nonetheless, your answer makes perfect sense and allows me to understand how to include "Number of Confirmations" in my own code, so thank you. Commented Jul 29, 2022 at 22:41
  • 1
    For blockchains with probabilistic finality (i.e. Bitcoin or Cardano), the deeper a transaction is in the chain, the less likely that a rollback will result in a null/dropped transaction. (Read more about finality: medium.com/mechanism-labs/… )
    – zhekson
    Commented Jul 29, 2022 at 23:47
  • 1
    The most recently added block might roll back, however the further away from the chain tip a block is the less likely a rollback. Rollbacks of more that 2160 blocks are strictly prohibited by the protocol. Commented Jul 30, 2022 at 13:04

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.