beeb / pancaketrade

Limit orders for PancakeSwap
GNU General Public License v3.0
200 stars 92 forks source link

[request] Determine if there is a maximum transaction limit #47

Closed Spiffical closed 2 years ago

Spiffical commented 2 years ago

Hello! Your project is fantastic, thank you for putting so much work into this. I have a request, not sure if it's feasible:

I've been in a couple tokens now where I set up a limit sell and it doesn't execute because the dev put a max transaction limit into the contract. Do you know if it's possible to check for something like this, and then only sell the maximum number of tokens allowed?

beeb commented 2 years ago

Hey there. I'm going to be direct with you. No, it's not possible to generalize this. All tokens are coded differently and some don't even publish source code. There would be a way with a custom smart contract and trying to sell increasingly small amounts until it works, but this is not in the scope of this bot. Sorry!

beeb commented 2 years ago

One thing that could technically be done but would be impractical and potentially expensive in gas, would be to retry to sell smaller amount on tx failure, but there is no way to know the reason for failure. It could fail due to token bug or scam, slippage, deadline reached and more. And this strategy would only work if the reason for failure is the max transaction limit.