I mistakenly considered the transfer fee to be the maximum of the transfer fee across the source and target exchanges. But in reality the transfer fee is paid at the source exchange and it makes no difference how high it is in the target exchange.
Fixing the bug itself is pretty simple, but it also requires fixing up the existing P&L calculations. We should be able to fix up all of the miscalculated values.
See https://github.com/cryptoeax/arbbot/blob/33989cead96849e69a8d0bc410748bd28ed83952/bot/TradeMatcher.php#L104
I mistakenly considered the transfer fee to be the maximum of the transfer fee across the source and target exchanges. But in reality the transfer fee is paid at the source exchange and it makes no difference how high it is in the target exchange.
Fixing the bug itself is pretty simple, but it also requires fixing up the existing P&L calculations. We should be able to fix up all of the miscalculated values.