nochowderforyou / clams

Clam Project
MIT License
62 stars 58 forks source link

Don't enforce tx fee as consensus rule #213

Closed l0rdicon closed 8 years ago

l0rdicon commented 8 years ago

I'm unclear what the exact benefits of doing so would be but this is more in line with Bitcoin. Of course just because bitcoin does it doesn't mean its a good idea.

Does anyone have any thoughts on this?

Its a simple change for a hardfork

dooglus commented 8 years ago

The consensus rule is to require 0.0001 CLAM per kB isn't it? That's less than 1/25th of a US cent. Or in other words you can make a 25kB transaction for 1 US cent.

I think the consensus-enforced fee is small enough that removing it makes very little difference. When the block reward is fixed at 1 CLAM, or 10,000 times the fee-per-kB, the required fees are never going to be a significant to stakers. The maximum block size is 1000 kB, and so even a full block will only require 0.1 CLAM in fees, compared to 1 CLAM in staking reward.

The one thing a minimum fee does is makes it non-free to spam the blockchain. Not by much, but maybe by enough to discourage aimless spamming.

creativecuriosity commented 8 years ago

There was some talk that enforcing a per byte tx fee would make sense; given the promotion of CLAMspeech as a state machine/distributed DB platform.

The problem becomes making incentives that make sense.

You can't require additional per byte fee specifically for CLAMspeech. As dooglus has previously pointed out, this would only remove the utility that CLAMspeech offers, as users would simply then encode data into the chain in other ways.

The alternative then is to charge a static fee per byte, regardless of whether that byte is a part of the CLAMspeech platform or not.

Assuming someone was to create a token/currency on top of CLAMspeech, or some other type of application, you end up in a situation where the application "free-loads" on the CLAM chain. This is the rationale behind having some type of per byte fee that rewards staking full nodes and the network as a whole for the added chain weight that hosting the application entails.


This explanation was a bit dis-jointed, but I hope it outlined a few of the concerns/ideas surrounding consensus enforced fees.

dooglus commented 8 years ago

Agree with all that. We pretty much already do have a per-byte fee - it's just that it's rounded up to the next multiple of 1000 bytes. We could change it so that the (minimum, compulsory) fee is 1e-7 CLAMs per byte instead of 1e-4 CLAMs per 1000 bytes (or part thereof) if that seems better. Or are you thinking that the fees should be increased? What is a reasonable amount to charge for storing a byte forever, on every full node's hard drive?

creativecuriosity commented 8 years ago

Ideally, I suppose, one would calculate the marginal cost of that storage and bandwidth now, and then extrapolate out via some mechanism like Moore's Law.

Despite the term being forever, I think it would be reasonable to stop this extrapolation once the long-term cost has fell to small enough portion of the resulting figure.

This way be demons and fuzzy silliness.

robvanmieghem commented 8 years ago

Free transactions do feel like opening pandora's box. BTC had a transaction attack lately because transaction fees are relatively low. The current fee indeed feels rather low and useless but even though I don't really like it to be increased, putting it to 0 just does not seem right. We might have a hard time getting it back in when we do need to increase transaction fees.

creativecuriosity commented 8 years ago

Re: https://github.com/nochowderforyou/clams/issues/221 I still personally believe that a unified change, which aligns competing incentives properly, would be the best case scenario.

The only way to properly account for the marginal long-term cost of chain storage would be to include time in the calculation. This would effectively convert the "per-byte" fee into a "per-byte-per-block" fee. Such a system would require CPP(child-pays-for-parent) or RBF(replace-by-fee); such that transactions could be re-broadcast if for whatever reason they were not included until after a time in which the originally included fee was no longer sufficient.

creativecuriosity commented 8 years ago

Will be handled as part of a larger effort to protect against DDoS/Bloat and align incentives, Re: https://github.com/nochowderforyou/clams/issues/221

Closing.