I hadn't thought about that. Other pools I've mined in (Slush and BitMinter) don't do that to my knowledge, but in the context of P2Pool, it's probably a very good idea!
I think some pools have a minimum payout though. If the fee is 0.0005, then not much paying out if the total is less than 0.001 (and that is 50% fee if you do).
No, a diff 50 share does count - a diff 50 share has a score of around 3.9. Even my miners with only 2 USB Erupters (around 600-650MH/s) are averaging 130 pseudo-shares that are higher than diff 50 per 12 hour shift.
Ahh ok, I assumed log((difficulty) / (minimum diff))
At the moment it's the natural log rounded to 5 decimal places, ie the score for a diff 50 share is:
You might want to consider just having 3 types of shares based on their difficulty.
A) 50 = local share
B) 22000 = p2pool share
C) 68 million = bitcoin block
The miner who hits B should be given an incentive to turn the share in.
However, type C shares (very rare) would earn the local pool 0.5% of a BTC block reward (the p2pool finder fee), which is worth 0.125 BTC.
A should pay 50
B should pay 50 + 22000 * (0.5%) = 160
C should pay 50 + 22000 * (0.5%) + ((68 million) * 0.5%) * 0.5% = 1860
(You need to fill in the actual difficulty for both bitcoin blocks and p2pool shares)
A person who hits a share just gets 50 "points"
A person who hits the p2pool share also gets 0.5% of the p2pool reward (so 0.5% of 22000 "points")
A person who hits the bitcoin blocks also gets 0.5% of the finder bonus that p2pool pays (which is itself 0.5% of a block)
This is also a good idea, although I'll have to have a think about how to implement it.
I think your log system makes it more difficult, since you have to do the math to make sure all difficulty selections by the miner give the same average reward.
Under the scheme I suggested miner who picks difficulty 500 would get
A pays 500 (since only difficulty > 500 shares are accepted)
B pays 500 + 22000 * (0.5%) = 610
C pays 500 + 22000 * (0.5%) + ((68 million) * 0.5%) * 0.5% = 2310