How to calculate confirmed?

I used:

  • Polygon - smart contract event
  • Cloud func - trigger afterSave
  • server Moralis

and their confirmed distance is almost 4’


createdAt: confirmed = false
updatedAt: confirmed = true

confirmed usually means when it is confirmed on chain after a number of blocks, so that a reorg of last blocks has a very low probability on that time, a reorg could completely change the status of the transactions that were initially included in a block

but, according to my calculation, the distance of the number of confirmation blocks is 100
that is too big, my expectation is 12 confirmation blocks

you don’t have to follow our confirmed flag
our flag is based on our experience with different chains and re-orgs they have

if you have other preference you can do however you want of course and the risk of chain re-org you want to take