Smashing Symbol fees for fun and profit

By Marco Michelino

Let me start with a short reminder of how fees are calculated on the Symbol network. Rental fees (mosaics, namespaces) are based on the median feeMultiplier of the last 60 blocks (about 30 minutes). Transaction fees are not fixed. Any wallet can specify the maximum fee (maxFee) it is willing to spend for a transaction, while any node can specify the minFeeMultiplier for transactions it is willing to handle and will ignore any that do not meet this threshold.
When a node creates a new block it sets the highest feeMultiplier compatible with the maxFees specified by all included transactions. There was a recent campaign on Twitter for Symbol node operators to lower minFeeMultiplier to 10. Many larger node owners made this change but unfortunately this was not enough. There are two reasons for this:

  1. Empty blocks default to a feeMultiplier of 100
  2. Wallets are not “intelligent” enough to exploit the low minFeeMultiplier, they instead follow the medianFeeMultiplier

Both problems can be solved by sending low maxFees transactions, one per block. We need to include a low fee transaction in 31 out of 60 blocks to successfully lower the effectiveMosaicRentalFee and its friends the namespace rental fees.
Using data from the Symbol Tools website I saw there were several nodes with minFeeMultiplier set to 10 but many more with the minFeeMultiplier set at 25.
So, I wrote a quick and dirty Bash script to try to exploit them. Please, note the fee is expressed in microXYM (0.000001 XYM).

#!/bin/bash

if [ $# -eq 1 ]
then
  FEE=$(( 176 * $1 ))
else
  echo Usage: $0 minFeeMultiplier
  exit 1
fi
while true
do
  XYM=`symbol-cli account info -a NA6HAUL3ACYOFRYCTVZFBRKCYGYMMPJXUINGWQY | grep 6BED913FA20223F8 | awk '{print $6}'`
  if [ "$XYM" -gt $FEE ]
  then
    symbol-cli transaction transfer -p MySuperSecretPassword -f $FEE --sync --announce -M normal -r NA6HAUL3ACYOFRYCTVZFBRKCYGYMMPJXUINGWQY -c @symbol.xym::0 -m ""
  else
    sleep 30
  fi
done

The script expects the minFeeMultiplier of the nodes you want to target as input on the command line. All nodes with a higher minFeeMultiplier will ignore these transactions.

The option –sync tells symbol-cli to wait for a transaction to be included in a block before quitting; this way I will broadcast no more than one transaction per block.

I started this script on my node on Friday 18 June 2021 at 13:08:19 CEST specifying a minFeeMultiplier of 25 on the command line. I sat and watched it with a large cup of coffee at hand.

Graph showing the percentage of blocks (out of the last 60) with a feeMultiplier of less than 100.

The plot above shows the percentage of blocks (out of the last 60) with a feeMultiplier of less than 100. The percentage was around 10-20% before I launched the script, it managed to touch 50% at 14:12 and passed it only around one hour later (I needed more cups of coffee…!). I stopped the script at about 15:58.

What happened to the rental fees? See for yourself:

Plot shows rental fees (XYM) over time

I successfully managed to lower it to the values corresponding to feeMultiplier 25, but it took a lot of time and was too unstable (you needed to be very quick to create a mosaic at the right time).

We absolutely need more low minFeeMultiplier nodes to make this strategy useful. We also need more stingy wallets that do not waste XYMs by paying unnecessarily high fees.

Even while my script was running there were transactions sent with high fees…

Fee multiplier over time

Why the hell are people paying a 600 multiplier if there are empty blocks and not a single node has minFeeMultiplier larger than 100?!

Anyway, it’s interesting to see how the experiment influenced averageFeeMultiplier (this is computed on a 3000 blocks base, corresponding to around 2 and a half hours). Benefits were visible only two hours after the start of the experiment but lasted longer (please, note the time scale of the final graph is different from the previous ones).

How much did it cost me to run this experiment on the mainnet?

Well, about 1 XYM.

Actually, I spent much more than that on coffee!

Avatar photo
NineLives
admin@symbolblog.com

I'm a Symbol and NEM enthusiast and run this blog to try to grow awareness of the platform in the English-speaking world. If you have any Symbol news you would like me to report on or you have an article that you would like to publish then please let me know!

1 Comment
  • Rene
    Posted at 10:08h, 01 July

    Great job, Marco. That is the community spirit of engagement and support which we need at NEM & Symbol.