Open bobby4star opened 2 years ago
I think an issue with this is that some mempool and other bots can push the price up and your wallet may not have enough money to buy the amount of tokens you want. I think a possible work around could be something like this (exact # of tokens you want, amount of ETH/BNB you are willing to spend) and if the amount of ETH/BNB that we are willing to spent exceeds the cost of tokens at the time, then it will only buy with the amount of ETH/BNB needed to purchase the max buy. On the otherhand, if the price moves faster and the max # of tokens surpassed the amount of ETH/BNB you are willing to spend, then the bot will just purchase the max amount of ETH/BNB.
Ex. Max buy is 1,000,000 and costs 0.1 ETH at launch We can assign it as (Exact # of tokens: 1,000,000) and Max ETH/BNB willing to spend (1 ETH) If we are able to get max tokens (1,000,000) at 0.25 ETH, then the bot will submit 0.25 ETH in the TX, and the extra 0.75 will not be spent. On the other hand, if the 1,000,000 tokens cost 2 ETH at the time that the buy will be submitted, the bot will spend the Max ETH/BNB that we assigned (1 ETH)
Hi Devs,
It would be awesome if you could update the limitswap bot to buy the exact amount of tokens specified, provided that the price/total amount in base is within a specified limit. This will be a great feature where a launch has a max buy limit of say 30,000 tokens, and would allow the bot to buy all 30,000 providing the account has sufficient funds. At the moment, with current bot, it is a guessing game on how much in BNB to buy with, and transactions can fail if sending too much, or can result in only a fraction of tokens being bought vs the maximum permitted amount.
Here I give a suggestion on how the tokens.json file could work:-
[ {
} ]