The following is wrong:

[quote=“pillow, post:66, topic:2518”]To calculate the odds of an attacker finding one block we first need to know something about what the attacker is up against:

coindaysOnMainChain = 4294901760 x proofOfStakeDifficulty / ( 60 * 600 )

Then if we know how many coins attacker has, we can calculate the maximum amount of coin days the attacker can use:

coindaysOfAttacker = coinsAttacker*90

Now we can calculate the odds of an attack successfully minting a new block:

attackerOddsOfSuccess = coindaysOfAttacker / ( coindaysOfAttacker + coindaysOnMainChain )

Now we can approximate the probability (see whitepaper for more details) of a deep reorganization like so:

deepReorgProbability = attackerOddsOfSuccess ^ ( z-1 )

Let’s plug in some numbers and see what happens. Given that the difficulty is 12.2, we get 4294901760 * 12.2 / ( 60 * 600) = 1455494.48533 coin days on the main chain. Suppose the attacker has 1% of the total supply of coins 21552942 * 0.01 = 215529.42, then given that the attacker has accumulated as much coin age as possible ( 90*215529.42 = 19397647.8 ), the odds of the attacker minting a block is 19397647.8 / ( 19397647.8 + 1455494.48533 ) = 0.93020263011. So, now we know that the attacker need 1% of all peercoins to mint a block with almost 100% certainty. At current market price of $1.48 it would cost about $318 983. It isn’t certain that the attacker will be able to find that many coins for sale at that price, but let’s say the attacker has those coins then what? As mentioned earlier, after the block has been minted the attacker now have to wait 30 days before the protocol allows those coins to be used to mint a new block. Meanwhile the attacker has 1% of all the coins locked in a stake and will be exposed to exchange risk for a period of time.

Obviosly we are still far from an attack. So what the attacker has to do, is to divide his coins into as many stakes as he want to mint blocks. Let’s say the attacker want to do a 6 deep block reorganization and divides the coin days used in the attack equally ( 90 * 215529.42 ) / 6 = 3232941.3 then all other things being equal the odds of finding a block is 3232941.3 / ( 3232941.3 + 1455494.48533 ) = 0.68955648494. It’s still fairly high, but remember that this is the odds of finding one block and the attacker need to find 6 consecutive blocks.

Accordingly to the formula the odds of this happening is 0.68955648494 ^ ( 6-1 ) = 0.1559011202. Since the coins in the stakes have to mature 30 days, the attacker can attempt this attack 2 times a year.[/quote]

Can you help me with the formula? I’ve studied many threads about this, but honestly I don’t trust that I’ve got a deep enough understanding to figure this out by myself.