cryptoeax / arbbot

Arbitrator, a bitcoin/altcoin arbitrage trading bot
https://gitter.im/cryptoeax-arbbot/Lobby
GNU General Public License v3.0
199 stars 78 forks source link

Transfer fee considered during P&L calculation is incorrect #76

Closed cryptoeax closed 6 years ago

cryptoeax commented 6 years ago

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.