turnley.dev

PHP and MySQL code for faucet operators

Tools & Calculators

Tool

Reward table designer

Set the prize tiers and weights, see the odds, the expected cost per claim and what the jackpot really costs you.

Weighted rewards keep a faucet interesting and are also how faucets go broke. A jackpot with a weight that looks tiny can quietly account for most of what you pay out, and nothing in the code will tell you.

Put your tiers in as units:weight, one per line. Weights are relative — they do not need to add up to anything.

The column to watch is share of cost. If a tier nobody ever wins is eating forty percent of your payout budget, that is the tier to change.

Expected cost per claim
7.300units, averaged over many claims
Per 1,000 claims
7,300 units
Per day at 2,000 claims
14,600 units · $0.01
Tiers
5 · total weight 10,000
RewardWeightChanceOne inShare of cost
59,00090.0000%161.6%
109009.0000%1112.3%
50900.9000%1116.2%
50090.0900%1,1116.2%
10,00010.0100%10,00013.7%

Notes

Expected cost is an average over many claims. On any given day a jackpot either lands or it does not, so a faucet needs a balance that survives the unlucky version of the week, not the average one.

Weights should be integers. Fractional weights invite rounding surprises at the tier boundaries.

Use random_int rather than rand or mt_rand when you implement the draw. Anything deciding a payout should come from a cryptographically secure source.

Other tools