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)
Why do you draw the line at 0.001 ltc? is there really a special use case where someone would need to send tons of ~0.005 ltc to other people and only pay .1 in fees?
It is really just an acknowledgment that my imagination is limited and other people might be able to come up with something useful that wouldn't be possible with higher fees. Pay per share mining is one possible example, but I haven't every joined a pay per share pool so I don't know what they do when someone is due a very small payout. I'm also thinking that if someone started trying to spam with >= 0.001 ltc then it would quickly add up to a useful amount of ltc. Dust spam would still be prohibitively expensive though.
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;
I've thought about this, but that's effectively just doubling the nBaseFee. So I'd rather change the base fee than mess with that code b/c there are other places that expect 1*basefee per 1000 bytes. (like the GUI)
It isn't quite the same since we use nBaseFee other places, like in the small transaction case. If it is too hard to change then it might not be worth it.
BOOST_FOREACH(const CTxOut& txout, vout) {
if (txout.nValue < (CENT/10))
nMinFee += nBaseFee;
else if ((txout.nValue < CENT) && (nMinFee < nBaseFee))
nMinFee = nBaseFee;
}
I may want change CENT here to nBaseFee/10. As Litecoin gets more popular, and ltc price goes higher, what's classified as dust spam should also be lower.
I like your concept of auto-scaling the definition of spam. Much better than requiring periodic intervention.