Basically, we were setting min fee to at least 0.1 LTC if any of your output is less than 0.01 LTC. I'd like to extend that to add 0.1 LTC for every output less than 0.01 LTC. So using sendmany to send to 1000 outputs is fine as long as you are paying the 0.1 LTC fee per 1000 bytes. But if you are sending 0.00000001 LTC to each of those 1000 outputs, then you need to pay an additional 100 LTC in fees.
// To limit dust spam, add MIN_TX_FEE/MIN_RELAY_TX_FEE for any output is less than 0.01
BOOST_FOREACH(const CTxOut& txout, vout)
if (txout.nValue < CENT)
nMinFee += nBaseFee;
The spammer can still send a ton of 0.01 outputs, but this will deal with the dust spam. It's really hard for the receiving end to collect these worthless transactions.
I like the idea of charging higher fees for lots of small outputs, however, we risk capturing small-but-useful transactions in the mix. I also want to have fee formulas we can keep instead of temporarily changing them and planning on changing them back. Instead of two tiers we could have three with only the lowest tier getting charged per-output fees
large value = no fee
small value = .1 fee per transaction
very small value = .1 fee per output
Make "very small" be 10% of small and all these too small to be useful even when aggregated transactions are really expensive, but leaves open the possibility of small but potentially useful transactions (like paypershare mining)
If we are making the fees additive, we'd want to remove the "if (nMinFee < nBaseFee)" check so people can't escape the per txout fee by making the block larger.
We can also have a higher fee for large-sized transactions.
From: int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee;
To: int64 nMinFee = (1 + (int64)nBytes / 500) * nBaseFee;
That would only have an effect on blocks larger than 27000 bytes (but we could make that smaller too).
BOOST_FOREACH(const CTxOut& txout, vout) {
if (txout.nValue < (CENT/10))
nMinFee += nBaseFee;
else if ((txout.nValue < CENT) && (nMinFee < nBaseFee))
nMinFee = nBaseFee;
}
This would be independent of any nMinFee scaling that was done based on difficulty.