# Probabilty of a Race Attack in time t with hashing power q

I read the original Satoshi's paper on bitcoin as well as Rosenfeld's paper on "Analysis of hashrate-based double-spending". However, they don't answer my question, which is as follows.

Let's assume attacker has q hash power (less or more than 50%) and that the merchant is waiting k confirmations (e.g. 6). What is the probability that after time t (e.g. 12 hours), the attacker will produce longer chain in order to double-spend money?

I have seen formulas to calculate the probability, that the attacker will eventually produce the chain, but what I am looking for is, what happens if the attacker is constrainted by time t. I know that the attacker has 100% chance on eventually getting the longer chain, but I also know that when the hashing power q is around 50%, it would take a lot of time and you would normally need around 60-70% of hashing power.

• The attacker is only guaranteed to eventually get the longer chain when they have more than 50% of hashpower. – Nick ODell Nov 30 '15 at 17:41
• @Nick Yes, I know that, but my question is: If the attacker has q hashing power and transaction requires 6 confirmation, then what is the probability, that he will succeed with the attack if he has some time t to perform attack. Let's say he has only control of q hashing power for t time. I think this can be seen as Gambler's Ruin, but trying to calculate the probability of getting x coins with an unfair coin of prob. q – Maciej Żurad Nov 30 '15 at 18:44