It has been some years since we left Bitcoin Core behind, but there are still various ways of thinking lingering now. Their ways of thinking affected everything about Bitcoin, and many times not for the better.
I want to address one item that used to be like scripture. Taboo to discuss and change. Mining transaction priorities.
Transactions are picked by the miners currently based on the amount of fees they pay. Zero-fee transactions have been seen as people taking advantage of the system for some time. And I think its time to look at this and find out if that actually makes sense.
I want to propose that mining software gives the ability to prioritize transactions based on something else than just purely the mining fee. Instead it could look at more properties of the individual transactions. The higher the priority, the better chance of inclusion in the next block. The factors I personally like best for setting mining priority are (in order of most important first):
Coin-age of spent coin (days-destroyed). Older is better.
Ratio of inputs to outputs in one transaction. More inputs is better.
Sigops count. Less is better.
Transaction size in bytes. Smaller is better.
Fees paid to the miner.
To put this simple, if your transaction scores high in the first factors, you need to pay less fee in order to be included in the first block.
The reason we have been told fees were "a good thing" is because they would protect us against "spam attacks".
Ignoring for a moment that any paying transaction is a excluded from being "spam", we can't completely ignore that need. If we allow zero fees then people could create many many transactions with the effect that if I went and tried to pay my beer in the pub, it would not go through. Essentially disabling the usecase of money. We can’t ignore that threat.
Already in 2010 Satoshi introduced a concept best called “Coin Age”. The older the money is that I spent, the higher the priority. This uses the idea that a normal payment keeps money in their wallet for days or months whereas an automated system may reuse a coin within minutes. This allows normal people making everyday payments to be prioritized with a precious commodity you can't create otherwise. Age.
If a spammer spends tons of 10 minute old coins, it would have no effect on real uses transactions that in general are quite a bit older.
Point 2 (ratio of inputs vs outputs) requires you to know what implementation do.
A transaction that has outputs consumes space in the UTXO (unspent transaction output) database. Its inputs remove rows in that database. So stating we prefer a ratio where the database gets smaller is a good idea. Especially if that means people can pay a lower fee to get their transaction mined.
But that is not the full story.
Imagine how a mining pool, or even read.cash is handling transactions. There are a lot of people paying very small amounts to a single person. Each payment to you is added to your balance, but on the blockchain you have hundreds of inputs to sign in order to move that money afterwards. At some point creation of a single output is useless because it would be too expensive to spend it later (due to fees).
With point 2 giving a higher priority the natural consequence is that spending those hundreds of tiny transactions you received requires a much lower fee. And this brings into question the reason of the ‘dust limit’. If you can still spend an output even if it holds just a small amount of money, then do we still need a dust limit? We can probably significantly lower the dust limit when its no longer a problem to spend outputs that are not holding a lot of value each individually.
Do you think my idea for the priority table is in need of improvement? What would you make of it?