Protocol-Based Fees

I gave much thought to the problem of transaction fees in the last few days and concluded that, confirming a post by Vitalik Buterin[sup][1][/sup], it has no market-based solution. The ultimate reason is that a market requires buyers and sellers while mining cannot become decentralized and still have sellers. Total decentralization turns mining into a public service, and sellers must be private: with only buyers left, transaction fees tend to zero.

Fortunately, I also found a protocol-based solution to the problem, which goes a step further from Peercoin:

  1. The reward for chaining proof-of-stake blocks comes from newly minted currency, like in Peercoin—which mints 1% new coins a year.

  2. Based on information from the block chain, an algorithm constantly adjusts destructive fees just to offset the newly minted coins.

This way we have both a stable money supply and self-adjusted fees. The newly minted coins transfer value to block miners—from those who skip minting—partially via inflation while destructive fees constantly offset that inflation, leaving a value transfer equivalent to formal payments.

Yet such a value transfer is impossible with formal payments: instead of going directly to miners, its destructive fees go to the whole network as deflation, and only then to miners according to their contribution to the same inflation offset by those deflationary fees.

[sup][1][/sup] http://blog.ethereum.org/2014/02/01/on-transaction-fees-market-based-solutions/

Except that the amount minted is fairly random, so your fee would end up being fairly random, and this would cause enormously higher transaction fees than are currently in place right now. Right now only a few thousand coins have been burned in transactions fees. If this was implemented transaction fees would be orders of magnitude higher.

Your are making two different objections.

First, you point to the problem of transaction fees ending up being “fairly random.” This only would happen if they self-adjusted every time someone minted new coins. However, that is not what I meant by those fees “constantly” self-adjusting. For example, Peercoin creates 1% new coins yearly, so the self-adjustment of transaction fees can wait until that 1% increase in the money supply has already happened. This way, as transaction fees would adjust themselves only after the money supply had increased by a fixed percentage, there would be no randomness in the amount of inflation to offset.

Second, you point to the problem of transaction fees becoming “enormously higher” than they are today. This is an illusion: each holder of Peercoins pays for the distributed network in both fees and inflation. With self-adjusted fees, the cost incurred as inflation would assume the form of transaction fees instead. This merely would show the real fees Peercoin users are already paying, with one difference: only someone making actual transactions would pay those fees.

hey mirelo,
I see two problems with your proposal:

  • During periods of low transaction volumes, the transaction fee would become even larger than it is now.

  • And during periods of high transaction volumes, the transaction fee could become two small, i.e. that mirco-transactions would be affordable. But we don’t want them, because this would enlarge our blockchain, which we want to grow healthy.

A good implementation of your idea could average these different periods and ease the mentioned impacts, but I think that a link between inflation and transaction fees would be wrong.
Personally, I am fine with the inflationary and deflationary aspect of peercoin. And if I would change the transaction, I would not link this fee to the inflation, but to the growths of the blockchain. Just like it was proposed in here:
http://www.peercointalk.org/index.php?topic=1539.msg13175

The two problems you mentioned result from the block chaining reward being fixed at 1%. This should not be the case: the reward for chaining a block with 10,000 transactions should be greater than that for chaining one with 10 transactions. So despite the solution being indeed to take the number of transactions into account, it involves not only the self-adjustment of transaction fees, but also that of the block chaining reward. Imagine this:

  1. Each new self-adjustment of transaction fees calculates a new average number of transactions per block.

  2. The mining reward self-adjusts at the ratio resulting from dividing the new average by the old one.

This way, a consistent, prolonged divergence in the number of transactions would affect the mining reward, counteracting the two adverse effects you mentioned.

To summarize:

  1. The constant fee of 0.01 PPC would self-adjust according to the latest block chaining reward and the future (predicted) number of transactions until the next (predicted) self-adjustment of that fee.

  2. The constant reward of 1% of stake would self-adjust according to past changes in the number of transactions per block.

Thus, in the long run, the money supply would remain stable: the block chaining reward would set the pace while the transaction fee would be always trying to cope.

[quote=“mirelo, post:6, topic:1967”]To summarize:

  1. The constant fee of 0.01 PPC would self-adjust according to the latest block chaining reward and the future (predicted) number of transactions until the next (predicted) self-adjustment of that fee.

  2. The constant reward of 1% of stake would self-adjust according to past changes in the number of transactions per block.

Thus, in the long run, the money supply would remain stable: the block chaining reward would set the pace while the transaction fee would be always trying to cope.[/quote]

Just like how the block difficulty and rewards self-adjust based on the current network hash rate (which I find to be a very elegant way to handle pay-outs, vs. hard steps), I really appreciate the dynamic nature of what you’re describing. Conceptually I like the idea, a lot. I’ll need to think through the real-world implications though, because as the network continues to scale up, we’re not 100% sure how the transaction volume will adjust.

Just like how the block difficulty and rewards self-adjust based on the current network hash rate (which I find to be a very elegant way to handle pay-outs, vs. hard steps), I really appreciate the dynamic nature of what you're describing. Conceptually I like the idea, a lot. I'll need to think through the real-world implications though, because as the network continues to scale up, we're not 100% sure how the transaction volume will adjust.

I am so glad you liked it, despite agreeing we are still in a mostly conceptual level here.

i like the idea

Here is a possible such extension to Peercoin’s proof-of-stake algorithm:

[ol][li]The target inflation varies by the square of the ratio between the number of transactions in each of the two last intervals between self-adjustments.[/li]
[li]The number of transactions expected until the next self-adjustment is the same found in the previous interval between self-adjustments.[/li]
[li]The transaction fee results from dividing the target inflation by the number of transactions expected until the next self-adjustment.[/li]
[li]The remaining inflation or deflation adds to the target inflation and subtracts from the transaction fee.[/li][/ol]

For example, with a fixed money supply of 21,000,000 PPC:

[ol][li]When the algorithm starts:
[list type=decimal]
[li]The money supply is 21,000,000 PPC.[/li]
[li]The target inflation is 0.0001%, or 21,000,000*0.000001=21 PPC.[/li]
[li]The number of expected transactions is 1,000.[/li]
[li]The transaction fee is 21/1,000=0.021.[/li]
[/list][/li]

[li]The network meets the target inflation:
[list type=decimal]
[li]The actual number of transactions was 800:
[list type=decimal]
[li]The paid fees totaled 8000.021=16.8.[/li]
[li]There is an excess money supply of 21−16.8=4.2 PPC.[/li]
[/list][/li]
[li]The number of expected transactions becomes 800, so the target inflation becomes 0.000001
((800/1,000)^2)=0.00000064:
[list type=decimal]
[li]The target inflation will be (21,000,000*0.00000064)−4.2=9.24 PPC.[/li]
[li]The transaction fee will be (9.24+4.2)/800=0.0168 PPC.[/li]
[/list][/li]
[/list][/li]

[li]Again, the network meets the target inflation:
[list type=decimal]
[li]The actual number of transactions was 1,000:
[list type=decimal]
[li]The paid fees totaled 1,0000.0168=16.8 PPC.[/li]
[li]There is an excess money supply of 9.24+4.2−16.8=−3.36 PPC.[/li]
[/list][/li]
[li]The number of expected transactions becomes 1,000, so the target inflation becomes 0.00000064
((1,000/800)^2)=0.000001:
[list type=decimal]
[li]The target inflation will be (21,000,000*0.000001)−(−3.36)=24.36 PPC.[/li]
[li]The transaction fee will be (24.36+(−3.36))/1,000=0.021 PPC.[/li]
[/list][/li]
[/list][/li]

[li]Again, the network meets the target inflation:
[list type=decimal]
[li]The actual number of transactions was 1,000:
[list type=decimal]
[li]The paid fees totaled 1,0000.021=21 PPC.[/li]
[li]There is an excess money supply of 24.36+(−3.36−21)=0 PPC.[/li]
[/list][/li]
[li]The number of expected transactions becomes 1,000, so the target inflation becomes 0.000001
((1,000/1,000)^2)=0.000001:
[list type=decimal]
[li]The target inflation will be (21,000,000*0.000001)−0=21 PPC.[/li]
[li]The transaction fee will be (21+0)/1,000=0.021 PPC.[/li]
[/list][/li]
[/list][/li]

[li]Again, the network meets the target inflation:
[list type=decimal]
[li]The actual number of transactions was 1,200:
[list type=decimal]
[li]The paid fees totaled 1,2000.021=25.2 PPC.[/li]
[li]There is an excess money supply of 21+(0−25.2)=−4.2 PPC.[/li]
[/list][/li]
[li]The number of expected transactions becomes 1,200, so the target inflation becomes 0.000001
((1,200/1,000)^2)=0.00000144:
[list type=decimal]
[li]The target inflation will be (21,000,000*0.00000144)−(−4.2)=34.44 PPC.[/li]
[li]The transaction fee will be (34.44+(−4.2))/1,200=0.0252 PPC.[/li]
[/list][/li]
[/list][/li]

[li]Etc.[/li][/ol]

I would also like to propose solution to peercoin’s biggest marketing issue, transaction fee.
Mirelo main purpose for transaction fees is not to fight inflation but to limit transactions volume per sec/block.

Currently transaction fees are hardcoded as magic number, that can’t be right.
I would make transaction fee exponentially adjustable to fit transactions volume, that is if number of transactions in block are more then X then in next block fee is multiplied with 2.
If someone starts flooding network when fee is minimal after 10 blocks fee will get 1000 times bigger after 20 blocks milion times bigger, so attacker would have to give up shortly.

In my proposal I still keep magic numbers but move them to optimal number of transactions per block.
This is still magic number and will have to change as hardware advances but if implemented right it should last longer than fixed fee without hard fork.

  1. I would set minimum transaction fee to 0.00000001PPC (magic number)
  2. Maximum number of transactions per block: 1400 (magic number ~2.33 tx/sec)
  3. Fee doubles when there is more than 1200 transactions and halfs when there is less then 600. (again magic numbers)

Pros:

  • When ppl imagine PPC price 1000$ they are turned off with 10$ fee and might dismiss it. Also peercoin could market it self as coin with cheapest fee (for some time).
  • Next hard fork date is not forced by coin acceptance in market, but instead with general hardware advancements.

Cons:

  • Users would have no idea what transaction fee will be tomorrow or what is currently without checking.
  • This would encourage higher transaction volume at the moment and block chain would increase more then it would with 0.01 fee.

I’ll try to implement this feature as peercoin alt, but is this really good idea? Is it worth diving into bitcoin/peercoin code?

Some of these suggestions that sound good from a network perspective are completely insane from a business perspective.

People need to create business models on something tangible. Not transaction fees fluctuating by magic numbers based on network usage or attacks.

The one thing that is stable with Peercoin is it’s mandatory 0.01 transaction fee which does not fluctuate. This is an excellent idea, it keeps our blockchain small, and keeps transactions from being moved around too often regardless of whether or not the network is busy.

By solving one problem with these proposed ideas, you are creating completely new problems. We have petar87 here suggesting that he wants to implement his idea as another peercoin alt and then asks “…is this worth diving into…”

Let’s look a the real world business models currently in place (and in future cases), and then look at how the infrastructure can deliver a supportive network . A problem with cryptocurrency today is that techies and geeks design networks a certain way, and then hope that business will cope and some how deal with it later.

If any of this is to be used as a cryptocurrency, the business flow chart, with some very stable factors (like transaction fees) need to be hard coded and adjusted RARELY, so that true business models can be built on top of it.

Imagine if every time you visited a real world ATM bank machine, the fee would fluctuate from a few cents, to several dollars, to hundreds of dollars, depending on network load or attacks on the system?

Who could transact business this way? I know we’re eager to solve these types of issues sooner than later, but my eyes widened when petar87 wants to create another alt coin, add these concepts in, and “see what happens”.

This kind of thinking is what has brought new coin creation to a saturation point and it is not good for the industry in general.

Whew. Now I need a coffee.

Hehe hold on I didn’t say I would launch alt coin and compete with peercoin just I would like to work a bit on peercoin on my own in spare time…

Yea I can see that fluctuating fees could be problem from business perspective. I have kinda wandering if sacrifice of stable transaction fee would be acceptable by market. Because it would solve other problems…
I wanna say that fixed fees when too high are maybe bigger problem than fluctuating fees?

Currently this is solved by centrally adjusting fee but this can’t be permanent solution. Something better must come up until peercoin is completely decentralized don’t you think?

My proposed algorithm has a fixed transaction fee for each expected number of transactions. For example, the fee for an individual transaction whenever the algorithm expects 1,000 transactions until the next self-adjustment is 0.021 PPC.

This is because the ratio by which the target inflation varies is the square of the ratio between the number of transactions in each of the two last intervals between self-adjustments. However, the ratio by which the transaction fee varies needs not depend just on the relative number of additional transactions.

In the proposed algorithm, transaction fees exist not only to prevent network abuse (by making transactions costly) but also to pay the reward for chaining blocks (for the money supply to remain stable). On the other hand, the target inflation exists not only to counteract those fees, but also and mainly to create an incentive to chain blocks. Hence, the same target inflation should not depend only on the relative number of additional transactions, but also on the needed incentive to chain blocks. Yet how could an algorithm estimate such an incentive?

Fortunately, proof-of-stake provides a solution: the algorithm can multiply the target inflation by the ratio between the ratios between the average and total successful stakes in the two last intervals between self-adjustments. This way, the higher the ratio between the average and total successful stakes, the higher the target inflation, and conversely. The reason is that one same target inflation provides a higher absolute incentive to big stakes than to small ones: a higher target inflation gives low stakes the additional incentive they need to start chaining blocks.

For example, with a fixed money supply of 21,000,000 PPC:

[ol][li]When the algorithm starts:
[list type=decimal]
[li]The money supply is 21,000,000 PPC.[/li]
[li]The target inflation is 0.0001%, or 21,000,000*0.000001=21 PPC.[/li]
[li]The number of expected transactions is 1,000.[/li]
[li]The transaction fee is 21/1,000=0.021.[/li]
[/list][/li]

[li]The network meets the target inflation:
[list type=decimal]
[li]The ratio between the average and total successful stakes decreased by 10%, having thus varied by 0.9.[/li]
[li]The actual number of transactions was 800:
[list type=decimal]
[li]The paid fees totaled 8000.021=16.8.[/li]
[li]There is an excess money supply of 21−16.8=4.2 PPC.[/li]
[/list][/li]
[li]The number of expected transactions becomes 800, so the target inflation becomes 0.000001
((800/1,000)^2)0.9=0.000000576:
[list type=decimal]
[li]The target inflation will be (21,000,000
0.000000576)−4.2=7.896 PPC.[/li]
[li]The transaction fee will be (7.896+4.2)/800=0.01512 PPC.[/li]
[/list][/li]
[/list][/li]

[li]Etc.[/li][/ol]

Network protection should be complex when blocks are created, whether proof-of-stake or proof-of-work.

Miners just run mining software, and when it says “yay! hit a block” then they know they did it. No one really cares much behind the scenes about block creation.

Transaction fees, on the other hand, are in everyone’s face. They need to be SIMPLE, and FAIR.

This long described proposed algorithm simply wouldn’t work in the real world.

Sunny King has already stated that he never said transaction fees would always remain at 0.01. But that is something that can be dealt with later.

For now, if you have some suggestions for network security and safety, then put your thoughts into block generation and not transaction fees.

That would make Peercoin more “business friendly”. It would also stop opportunists who would constantly scan the block chain and fight to push transactions through at different times depending on when the algorithm was about to change. Like I said, this could create a whole new set of problems.

Sorry, mirelo, I completely disagree with your self-adjusting transaction fee scheme, and that’s simply my own opinion.

I’ll bow out of this discussion temporarily so you can try to sell it to other people who might have a different opinion.

[quote=“ppcman, post:15, topic:1967”]Network protection should be complex when blocks are created, whether proof-of-stake or proof-of-work.

Miners just run mining software, and when it says “yay! hit a block” then they know they did it. No one really cares much behind the scenes about block creation.

Transaction fees, on the other hand, are in everyone’s face. They need to be SIMPLE, and FAIR.[/quote]

I agree, but it seems you are confusing the complexity of the algorithm with the complexity of its outcome. People will not mind if transaction fees vary as long as they do not vary too much.

This is a work in progress, and it needs a lot of number crunching to evaluate its performance in the real world.

Wouldn’t it be better if we already knew what to do when that time comes?

One of the concerns about Bitcoin is what will happen when it relies on transaction fees only. This tends to be an underestimated problem because this moment remains far in the future while Bitcoin remains the reference for altcoins, even in their exchange value. However, it does not seem to have a simple solution, so I think we better start working on it as soon as possible.

See my next post.

[quote=“ppcman, post:15, topic:1967”]Sorry, mirelo, I completely disagree with your self-adjusting transaction fee scheme, and that’s simply my own opinion.

I’ll bow out of this discussion temporarily so you can try to sell it to other people who might have a different opinion.[/quote]

Fair enough.

In Peercoin, if I have 100 PPC, then I can make 100 transactions a year for free as those transactions will cost me 100 * 0.01 = 1 PPC, which I can recover by minting 1% of my stake (of 100 PPC). By their being free, I simply mean that, despite preventing me from earning additional money, they are not making me lose money I already have. So Peercoin currently allows for about 21,000,000 free transactions a year.

This has an important consequence: the nominal value of the transaction fee is only relevant for the transactions that exceed my annual free ones.

Put another way: given a fixed money supply, the proportion between inflation and the transaction fee only means the total of allowed free transactions. For example, if Peercoin had a fixed money supply of 21,000,000 PPC, an annual inflation of 1%, and a transaction fee of 0.02, then it would allow for only 10,500,000 free transactions a year (instead of 21,000,000).

Put yet another way: the nominal money supply, target inflation, or transaction fee is irrelevant: regarding the number of allowed free transactions, only the proportion between them is relevant.

Let us call S the algorithm proposed here: http://www.peercointalk.org/index.php?topic=2269.msg19211#msg19211. In S, the target inflation and transaction fee both vary with the number of expected transactions while the money supply remains the same: when the number of allowed free transactions vary, the transaction fee varies proportionally. For example, if the total of expected transactions increases by 10%, then the transaction fee also increases by 10%. This means the following difference from Peercoin:

  1. In Peercoin, each transaction exceeding my 100 annual free ones costs me the same regardless of the total number of transactions in the network.

  2. In S, the cost of each transaction exceeding my free ones increases with the total number of transactions in the network.

With S, we also have the following advantages:

  1. Money Supply Stability

A fixed transaction fee of 0.01 PPC and a fixed annual inflation of 1% result in an unstable money supply, hence in a monetary value less predictable than otherwise it could be. Monetary value can always change because it must express the exchange value of goods and services, which can always change. Hence a stable money supply being so important: it reduces monetary value instability to that of the exchange value of goods and services, which facilitates identifying the source of any price instability, and so makes prices more predictable.

  1. Explicit Transaction Costs

A fixed transaction fee of 0.01 PPC and a fixed annual inflation of 1% result in an implicit transaction fee, paid by unsuccessful or inactive block chainers to successful ones as inflation. By offsetting inflation with transaction fees, we make those fees both explicit and limited to those making actual transactions.

mirelo,

The part where I personally don’t agree with you is when you are taking into account inflation rate. Fees will fight inflation but that is just non-important side effect.

If computers could magically process unlimited number of transactions per second then transaction fee would be 0 and that would be best number even though nothing would fight 1% inflation.

As network abilities are very limited (e.g. bitcoin is limited to ~7 transactions per second), then transaction fee must be in place as only tool to limit number of transactions.

Problem:

  1. If fees are to low network would be overwhelmed with load and could become useless or fork out of existence etc…
  2. If fess are to high network could become mainly useless to people because of the high cost.

So main concentration should be to have fees that will give incentive to people to transact and use peercoin the more the better BUT not to go above network capabilities.

It’s not that hard to solve this single problem, but as ppcman said solution to this problem could easily introduce whole set of new problems if not done right.

[quote=“petar87, post:18, topic:1967”]mirelo,

The part where I personally don’t agree with you is when you are taking into account inflation rate. Fees will fight inflation but that is just non-important side effect.[/quote]

The problem with any variation in the money supply is that, as I pointed out, it introduces an additional source of price variation. With a stable money supply, there is only one source of price variation: the exchange value of goods and services (abstracting of money velocity). This is one thing Bitcoin got right: a stable money supply makes prices more transparent, and more predictable. Additionally, the present fixed inflation and fee create not a steady inflation, but rather an unpredictable rate of inflation or deflation, depending on the number of transactions.

This would be better than a fixed positive transaction fee because at least we would have a steady inflation. Still, a stable money supply remains a better option.

We all know computer resources are never infinite.

[quote=“petar87, post:18, topic:1967”]Problem:

  1. If fees are to low network would be overwhelmed with load and could become useless or fork out of existence etc…
  2. If fess are to high network could become mainly useless to people because of the high cost.[/quote]

As I pointed out, fees have a very different meaning whether they are below or above the reward for chaining blocks. If they are below, then they just partially offset the gain with block chaining. In this case, their nominal value is irrelevant as long as they represent the same fractional reduction of that gain. However, if they are above the reward for chaining blocks, then their nominal value is all that matters. This gives us a great tool: we can give people a fixed fee below a maximum number of transactions, and a variable one above that maximum, which increases with overall network use.

[quote=“petar87, post:18, topic:1967”]So main concentration should be to have fees that will give incentive to people to transact and use peercoin the more the better BUT not to go above network capabilities.

It’s not that hard to solve this single problem, but as ppcman said solution to this problem could easily introduce whole set of new problems if not done right.[/quote]

The problem is to make people understand they participate in the network in two ways: making transactions and chaining blocks. The first gives them a cost while the second gives them a reward. Up to a certain point, their loss just offsets their gain. This is how many transactions the network can comfortably take. Above that level, people must have a loss to make additional transactions. Additionally, with my proposed algorithm, that loss increases the more transactions they collectively make as each additional transaction puts additional stress on the network. Then, we have only two concerns:

  1. The nominal fee must be a fraction of the lowest meaningful stake.
  2. The proportion between the fixed money supply, the percentual reward (inflation) and the fee for a certain volume of transactions must reflect the number of transactions the network can comfortably take.

Additionally, the proposed algorithm (http://www.peercointalk.org/index.php?topic=2269.msg19211#msg19211) already makes the number of allowed free transactions in the network self-adjust:

[ol][li]If the actual transactions were more than the allowed free ones in the last interval between self-adjustments, then in the next such interval the number of expected transactions increases to the same of those actual past ones. This is because the transaction cost in that last interval was above the reward for chaining blocks, indicating the lack of allowed free transactions in the network. Then, the new target reward and transaction fee both increase by the same proportion, which further increases the nominal cost of excess transactions, making it less likely that they happen again.[/li]
[li]If the number of actual transactions were less than the allowed free ones in the last interval between self-adjustments, then in the next such interval the number of expected transactions decreases to the same of those actual past ones. This is because the transaction cost in that last interval was below the reward for chaining blocks, indicating the excess of allowed free transactions in the network. Then, the new target reward and transaction fee both decrease by the same proportion, which decreases the nominal cost of excess transactions, making it more likely that they now happen.[/li][/ol]

Finally, we can make the target reward self-adjust according to variations in its monetary value as proposed at http://www.peercointalk.org/index.php?topic=2269.msg19363#msg19363:

[ol][li]A decrease in the ratio between the average and total successful stakes means an increase in the exchange value of the monetary unit. The reason is that, when the value of the monetary unit increases, the absolute incentive for small stakes to chain blocks also increases, causing many of them to start doing so. This decreases the ratio between the average and total successful stakes.[/li]
[li]An increase in the ratio between the average and total successful stakes means a decrease in the exchange value of the monetary unit. The reason is that, when the value of the monetary unit decreases, the absolute incentive for small stakes to chain blocks also decreases, causing many of them to stop doing so. This increases the ratio between the average and total successful stakes.[/li][/ol]