I'm seriously dumbfounded why this contract is so popular. I have a much superior pyramid I made a few days ago, you can find my posting here if interested, but the code behind this pyramid is terrible, and the intentions of its creator are questionable.
Take for example:
// collect fees and update contract balance
if (idx != 0) {
collectedFees += msg.value / 10;
balance += msg.value;
}
else {
// first participant has no one above him,
// so it goes all to fees
collectedFees += msg.value;
}
Basically this piece of code ensures the first person's investment goes fully to the owner, guess who the first person that invested was, the script writer himself. So technically, the script writer gave himself a 3x payout, because he invested 5 ether, and got a total of 15 out of it.
Here's an example of how your payouts are being severely undercut:
uint transactionAmount = 2 * (participants[payoutIdx].amount - participants[payoutIdx].amount / 10);
Let's say you invest 1 Ether.
2 * (1 - 1/10)
2 * (0.9)
1.8
This is a "doubler" contract, yet your payout is only 1.8x? False advertisement much?
The next issue, and most major one of all is that the contract is only capable of ever paying out one person at a time. This means if there's 1 million people in the pyramid, waiting to be paid out 1.8 Ether each, and someone comes into the pyramid and puts in 1,800,000 Ether, all the others in the pyramid, should be paid out right? Keyword here, SHOULD, but they are NOT. This contract would ONLY pay out 1.8 ether, to ONE person after the 1.8M enters the pyramid. This means, for the other million to be paid out, irregardless of how much is in the pyramid, it would take another 1.799M addresses to enter into the pyramid.
This is a scam pyramid, whether on purpose or by way of bad coding. If you'd like one that is more sure fire and actually has had vigorous testing on the testnet, look into my Dynamic Pyramid.