A Smarter Fee

Cryptocurrency has its roots firmly in spam and denials of service. The pioneers of Proof-of-Work took the computation of a puzzle to be a…

A Smarter Fee
The transaction fee protects the chain from spam. Image credit It’s Always Sunny in Philadelphia

Cryptocurrency has its roots firmly in spam and denials of service. The pioneers of Proof-of-Work took the computation of a puzzle to be a fee that could be paid to force spammers and attackers to lose something in their efforts, that didn’t cost the friendlies enough to be a deterrent to real communication. The concept of a fee carries forward into blockchains, where it is denominated in the native currencies instead of in computation, and it still prevents spam and denial of service attacks. Some projects use the fee for other things, like funding an organization of developers as a tax, or some denominate the fee in an alternative currency to support a host chain, etc. In this article, we will only talk about base-level fees that are targeted at just keeping the blockchain running and secure against spam and attackers. We will compare the approaches from Bitcoin and Peercoin, then we will highlight some ways we could smarten up either approach with application to Peercoin. By taking a practical perspective, we will develop an understanding of how the fee can facilitate long-term stability of the chain.

Blockchains record data in a distributed fashion, such that each full node maintains a historic copy of all published activity that occurs. It is no surprise that such a high amount of redundancy is not able to support the level of transaction necessary to compete with credit card servers and high frequency trading. The approaches taken by different cryptocurrency communities vary, but the trend is in the direction of blockchain as a settlement layer. This includes approaches such as Lightning Network, side chains, and even the run of the mill cryptocurrency exchanges which allow for many transactions between clients before settling out on-chain. With understanding of the fundamental limitation of throughput in a truly decentralized record keeping system, let’s take a look at two very different approaches to how to value on-chain data: Bitcoin’s fee market and Peercoin’s fixed fee approach.

Before we dive into the fee, it is necessary that we understand that there are two distinct concerns regarding data throughout. The first is ‘bandwidth’, by which we will mean any and all short-term limitations to data throughput. The second is the cost associated with storing data long-term. While apparently independent, the solution to the short-term problem often winds up affecting the long-term situation. This can be most easily seen by considering the blocksize limit.

Bitcoin has a 1 MB blocksize limit to prevent denial of service attacks, which has limited the size of nearly every block for years now. This function is important to how the chain operates in practice and the community felt so strongly about the various sides of the discussion that there was a contentious hardfork and the moniker ‘Bitcoin Cash’ was formed around a 32 MB blocksize. Many of the arguments that were espoused by the various sides of the debate are useful for our discussion regarding the fee market because the blocksize limit is necessary to promote competition and activity on that market. The limit is an arbitrarily even number picked to prevent bandwidth denials of service, but it is affecting the transaction fee which intuitively should represent the cost associated with storing the transaction long-term. Peercoin leadership generally recognizes that this behavior is sub-optimal and, while the blocksize limit is still 1MB, there is general consensus that should the network start using more data that limit will be lifted to a higher number.

Looking at the fee as the cost associated with making the transaction is informative, but mathematically difficult to pin down. This is because the data storage is hypothetically permanent, if the blockchain survives entirely intact then every transaction must occupy space on every full node until the end of time. If nothing else, this has a concrete cost of entropy and must be paid for. But how do we price out eternal storage in a heavily redundant network without knowing how many full nodes will exist throughout time? On the other hand, both the hardware and software is expected to get better and more efficient with time, so we should expect an unknown decrease in the price of information. Trying to subsume all cost associated with a transaction in the transaction fee itself is simply not possible to predict with 100% efficiency. This leads to two schools of thought: either each minting/mining node charge only what is needed for them to recoup their personal costs and any full node service that does not participate in block creation must pay their own way, or we establish stable operation with the fee above this minimum service level such that the system can support additional services. While there are subtleties associated with whether the fee is burnt or given to the miners, in general the fee acts as a spam filter by restricting use of the chain only to more serious activities and thereby limits the size of the long-term record. By increasing the restrictions, we have the opportunity to open the doors to less serious third parties that contribute to the redundancy of the chain by participating as full nodes. By reducing the fees of the network, we let more transactions take place but we limit our potential for easy redundancy.

The cost of running a full node is a hidden fee of the network. Image credit Dave Blazek

The fixed fee method of Peercoin whereby all transactions pay 0.01 ppc/KB has resulted in a chain that is orders of magnitude smaller than others while being one of the oldest chains. The intentional lack of a commitment to the blocksize limit implies that Peercoin will never have a full blown fee market and that the fixed fee is the primary anti-spam measure. If we ignore the bandwidth issue and focus only on the long-term costs, this approach has the potential for fine tuning to match the highest efficiency point where we walk the balance between on-chain uses and third party redundancy.

The Bitcoin fee market has resulted in a number of services that attempt to handle the variability of the fee, such as fee estimation and ‘return by fee’ to unstick transactions that were submitted with too little paid. These methods do not make for an intuitive user experience. Moreover, we should expect the fundamental costs associated with making a transaction to vary on a much longer timescale than the block spacing. A method for broadcasting each minter’s desired fee and converging on a consensus of what the current fee must be to have the transaction included in the chain would allow users to know precisely what to expect. This kind of a ‘smart fee market’ becomes almost indistinguishable from block producers setting the fixed fee by vote. For example, each block could include the minimum fee each producer would accept, and the network can take the median of that fee requirement for a number of past blocks as the current ‘fixed fee’. All block producers would then consent to accept transactions with a fee higher than this mutually accepted compromise, and no lower. In this way, the fee can adapt to a changing market while still being consistent and predictable.

One of the benefits of a permanent fixed fee is the ability to know exactly how many peercoin are needed to support a given level of transaction frequency. For example, if a business needs to do 1 KB of transactions per day, they need to have 3.65 ppc per year on-hand to pay for fees. With the PoS rewards process, the business knows it can set aside around 100 ppc for minting and will be able to pay all transaction fees on average forever. This sustainability is tantalizing, and is discarded with a variable fee system such as a fee market or fee voting. This property can only be recovered if the fee is independent from something unpredictable like the market price of the coin it is denominated in, or the ebb and flow of majority.

Taking the example of a minting company seriously, we can seek out an alternative fee calculation that is internally consistent. While the actual inflation of Peercoin is about 3% currently, the PoS inflation is around 1% of the total supply. This equates to about 4 ppc/block on average. If we take Bitcoin Cash’s arguments for a 32 MB block size, we can calculate what the fee would need to be to consume all mint rewards in the year if we filled 32 MB blocks continuously. The result is just over 0.0001 ppc/KB, which is 2 orders of magnitude lower than the current fee. This implies that full 32 MB blocks at the current fee rate would result in deflation of the supply. By targeting the supply equilibrium number, we create a self-consistent method of fee determination that is independent of coin price and that can persist long-term.

Discover long-term equilibrium that will promote a healthy chain for all time. Image credit Eric Feldman

A method of voting for the fee would certainly make the system more adaptable, but it can also result in a tragedy of the commons, as minters may forgo doing any calculations themselves and will simply rely on external suggestions for what to set their fee vote at. This is not to say we need to protect people from themselves, but rather it is useful to note that every protocol fork can be seen as a vote amongst minters. If we find a good algorithmic determination of the fee that has broad consensus, we do not need to rely on a more complex sub-consensus using blockchain voting.

Whether we do it democratically or through direct consensus on a new fee, these arguments tend to show that the current Peercoin fee is objectively high. Indeed, the current fee would result in supply equilibrium if all blocks were full at just 1 MB with 2.5% inflation. While this is not critical at the current Peercoin valuation (a simple transaction costs around $0.002) it is difficult to know if some applications for micro-transactions have been stifled by this fee, and what will happen if transaction demand changes substantially.

It seems abundantly clear that a smart approach to fee determination is superior to the blocksize limited fee market of Bitcoin. However, there is certainly room for improvement over how we handle the cost of information storage in the most secure and redundant record systems available today.