The probability of mining a stale block is roughly 0.1%, considering there have been around
50 stale blocks in the past 52,500. That means the that mining a stale block on top of another stale block is about 1 in a million.
The chances can even be lower than that, but I'm more bothered about what the OP was asking about 2 confirmations. From what I understand, it takes the network 5-10 seconds to choose a block if two blocks were mined at the same time. So if it takes such a short time to choose a block, how can a transaction be in a stale block within 5 seconds and even get another confirmation, all before the network orphans the block? So is it possible to even have a transaction confirmed in a stale block, let alone two confirmations?
if 10 minutes is average time for a block
and 1 minute is quick
10 seconds is quicker than that
and making 4 blocks boom boom boom boom in under 1 second while unlikely is possible.
some math whiz can give you math on a 10 minute block
or a 1 minute block
or a 10 second block
or a 1 second block
or a very unlikely 4 blocks in under a second
to understand why it can happen is realize the networks hash rate is not
1th = 1 million hashs a second
or 1 ph 1 billion hashs a second
or 1eh 1 trillion hashs a second
or 100eh 100 trillion hashs a second
it is over 850eh
that means in 1 second
how many hashes a second is 1eh
1 EH/s (Exahash per second) is equal to 1,000,000,000,000,000,000 hashes per second. This unit is commonly used in cryptocurrency mining to measure the computational power of mining hardware.
Bitbo
850,000,000,000,000,000,000 shots at a block can happen
so yeah it is hard for a single hash to hit a block
it is even hard for 850,000,000,000,000,000,000 to hit a block
since 10 minutes is 60x10=600
600 seconds for 1
so 600x600x600x600=1.296×10¹¹ chance at 4 blocks in 1 second or less
that is 129,600,000,000 to 1 chance and since we only made 960,000 blocks
we have never seen 4 blocks in under 1 second or less