Cardano network vulnerable to ~$20/minute spam attack?

I think you are focusing on a wrong part of transaction process. This isn’t Solana or Nano. Block validation logic and mempool queue is a separate layer. Tx don’t just all rush into mempool first come first serve basis.

When you send a transaction from a wallet you go trough a node. Just a regular node, not a block producing node. This node is responsible for rate of Tx and amount of data arriving and amount of outstanding data.

Each node has protocol parameters that restricts amount of network resources that node can consume. If this node is changed to allow Tx beyond protocol parameters, then the network will drop that node and spam attack will stop.

Backpressure is just a term used for this type of data diffusion. When nodes send all the Tx info, if mempool is full, then Tx diffuse at entrance layer. This backpressure is not on mempool, but on separate network layer managed by nodes with direct peer connections.

So, it is not correct to think that mempool size is somehow total available Tx storage size for a whole Cardano network. Size of storage for Tx is the size of all memory available to ALL nodes and relays that network has connected (that’s of course theoretical maximum, since it’s not possible to max out all memory on all nodes and relays at once due to internet speed/capacity limitations).

This is why calculating cost of a spam attack just using Tx size vs mempool size is same as you trying to remove all cash from all ATM machines in a large city using just your bank card. However, feel free to try. :wink:

So, to be able to pull off spam attack that OP is describing you would have to:

  1. Fill 1000s of nodes with pending transactions (since doing it trough a single node would just shut down that node).
  2. The amount of transactions in each node has to max nodes memory capacity (not mempools), that is usually many times the size of mempool.
  3. You have to use multiple wallets on each node, otherwise the nodes protocol may drop all your transactions.
  4. You have to have already created/minted assets of that size with enough ADA to send them all at once.
  5. And… you have to do it faster then block production speed, which on top block producing nodes is as low as 1ms.
  6. Then repeat steps 1 trough 5 for next block.

However, similar type of attack such as OP suggested did happen on Nano network and another on Solana just recently. So, maybe they were just confusing blockchain protocols (or grouping anything that is not Bitcoin into same category :rofl:)

@Markus-VITAL You are correct about network easily handling the load even if mempool was perpetually full. In their pressure test they went up to 44x max network capacity and aside from having to resubmit some transaction and some general network slowness Cardano network worked right trough it. :smiley:

@ADA_user Hope OP question is getting answers. (Feel like we are moving away from the topic of $20 spam attack :grin:)

1 Like