sQu1rr / binance-dust-sweeper

Sweep your dusty coins on binance
MIT License
35 stars 3 forks source link

Profit/Cost calculated incorrectly? #5

Open tcdewit opened 6 years ago

tcdewit commented 6 years ago

If i understand correctly, the principle behind the dust-sweeper script seems to be to buy an additional amount of altcoin versus one of the base coins, such that the new amount is a non-fractional multiple of the stepsize. This is done by buying such an amount that the fee is equal to the amount to be dusted. Doesn't this just evaporate all dust instead of converting it in something of value that can be used for trading?
The profit/cost displayed are the difference between the bought and sold amounts, but perhaps the (evaporated) dust should be subtracted as well?

Side question: I take it the Buy/Sell prices are market prices? Are these orders guaranteed to be filled? Depending on volume, these market prices can fluctuate quite a bit, so between the analysis and final order placement something could change, causing one or two of the Buy/Sell orders not to take place?

sQu1rr commented 6 years ago

i'll think about the cost/profit calculation a bit more, it is safe to say it usually costs you to "sweep the dust" (thanks, banance!). the cost/profit shown takes into account that you sell all the coins you have instead of just eliminating the fractional part (only for amount < 0.001 BTC) (see QSP/BNB screenshot)

buy/sell order margin will change inbetween the analysis and orders, but since you buy/sell in the amounts of the sh1tcoin currency, the orders will always be filled in full.