cryptoeax / arbbot

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

fee has been charged twice. #180

Open bubble501 opened 6 years ago

bubble501 commented 6 years ago

In the trade method of Arbitrator, it seems like the fee has been charged twice $buyPrice = $source->addFeeToPrice( $tradeAmount * $bestBuyRate, $tradeable, $currency ); $boughtAmount = $source->deductFeeFromAmountBuy( $tradeAmount, $tradeable, $currency ); for example, I buy ETH/BTC with rate 0.01, amount 100 and fee rate 0.001, I will pay 1.001BTC to get 99.9 ETH according the code.

but in practice , i wil only pay 1 BTC for 99.9ETH.