Rational Spam — When does it make sense to spam the Bitcoin network?
Over the past year, transaction spam has become a fixture in Bitcoin. Users have encountered delays and paid higher fees as a result. Often spam is thought of an attack, but this need not be the case. Below, profit-based reasons to generate spam will be explored along with some possible mitigations.
Let us assume that there is a miner (or a cabal of cooperating miners) working to increase fees and then look at costs and revenue opportunities available to them. Revenue comes in the form of inflated fees that miners are able to collect. These increase with the number and average fee of confirmed transactions which are not spam.
On the other hand, miners lose money whenever spam transactions are mined by other (non-cooperating) miners. This cost goes up with the fee rate on spam itself, the number of spam transactions that are confirmed, and the percentage of hash rate that is non-cooperative.
Comparing revenue and cost yields an equilibrium for confirmed transactions:
n * Fn = (1-p) * s * Fs
n, number of non-spam transactions
Fn, average fee included with non-spam transactions
p, fraction of hashrate available to the spammer
s, # of confirmed spam transactions confirmed
Fs, average fee of confirmed spam
If the left side of this expression is bigger, participating miners profit and the Bitcoin network should see spam. If the right side is bigger, participating miners lose money and spam should stop. Next, we’ll look at this situation from user and spammer perspectives.
Users care about spam because they want to pay lower fees, have their transactions confirmed quickly, and insofar as they value the ability to run a fully validating node, they wish for there not to be waste in the blockchain.
What can users do to save money? Either send fewer transactions or get better at setting fees. With better tools, it should be possible to ignore attempted fee manipulation and set fees based on actual confirmation times, or only what’s required to be confirmed by miners who are not participating.
How can users make spam more costly for the spammer? Develop tools to help others identify spam on the network, social media, or otherwise. Ignore spam when doing fee setting calculations and highlight miners who are themselves ignoring spam (i.e. not mining in a profit-maximizing fashion).
In order to maximize revenue, spammers can:
- Encourage block size increase since bigger blocks allow miners to confirm more non-spam.
- Pursuade non-participating miners that bigger blocks are coming that it pays to participate.
- Increase visibility of high fees through social media, news outlets, reddit, etc. Encourage users to spend more to get confirmed right away. Prop up the importance of speed when transacting.
- Support services that help users pay high fees.
To minimize costs, miners can:
- Recruit more participating miners. If a miner agrees not to mine each other’s spam or to return the revenue collected, that means less is paid to the other miners.
- Send as few spam transactions as possible. Every transaction that is in the mempool, represents money at risk. If they’re cleared out quickly, their effect is minimized and it costs to replace them.
Having looked a bit at the theory, what have we seen?
- Miners expressing desire for a bigger block, but not Segwit.
- 80% of miners have signed onto Segwit2x which seems like an extraordinarily high participation rate when segwit itself is only at ~30%.
- Social media spam when fee rates go up and transaction times are high.
- Outputs being split up and recombined.
- Fee walls.
What do you think? Would it make sense to spam for profit today? Is this behavior affecting protocol development, agreements and the Bitcoin economy?
Thank you for reading. Please share, comment, and follow if you’d like others to see this and more like it in the future.