← notes

A faucet whose reward scales with what you hold

May 22, 2023

An ETH faucet that pays by merit rather than a flat drip, and the three places that idea leaks.

Most faucets pay a flat amount on a timer, which makes them a farming target and nothing else. This one pays against holdings instead. The owner marks NFT contracts as eligible, the caller passes the contracts it wants counted, and the contract sums a base reward multiplied by the caller’s balance in each eligible collection. A day has to pass between claims per address.

The interesting line is what happens after the sum. The total is multiplied again by the number of eligible collections the caller held anything in, so holding across several collections does not add, it compounds. Whether that is the intent or an accident matters, because the daily limit is checked against the same count squared. The cap is not a fixed ceiling on a day’s payout. It grows quadratically with how many collections you can present, which means the setting named dailyLimit does not bound the daily spend.

The cooldown is keyed on the sending address, so it costs one fresh address to reset it. Any per-address rate limit on an open contract is really a limit per wallet someone is willing to create, and holdings-based eligibility does not fix that on its own, since the same NFTs can be presented from a wallet that borrowed or was transferred them.

Payout uses transfer, which forwards a fixed 2300 gas stipend. That was the safe default when this was written and it is the wrong default now, because it reverts for any recipient whose receive path costs more than the stipend, which includes most smart contract wallets.

The caller also supplies the contract list, so gas grows with the length of the input. The eligibility check bounds what gets paid out, not what gets iterated.