CryptoGnome / Limit-Sniper

A mempool sniping bot for Ethereum, Binance Smart Chain, Matic, & Fantom
491 stars 215 forks source link

Skip first n blocks to overcome bot protection #30

Open kiruthemes opened 3 years ago

kiruthemes commented 3 years ago

Can we add the ability to set n blocks that the bot will wait before placing the order provided the price is still below the buy price set? Below is the code from the contract that is blacklisting first 2 blocks after liquidity.

uint256 private _liqAddBlock = 0; uint256 private _snipeBlockAmount = 3; uint256 private _manualSnipeBlock = 100; uint256 public snipersCaught = 0;

if(_liquidityHolders[from] && to == pancakeswapV2Pair) { _hasLiqBeenAdded = true; _tradingEnabled = true; _liqAddBlock = block.number;

if(block.number - _liqAddBlock < _snipeBlockAmount) { _isSniper[recipient] = true; snipersCaught++; emit SniperCaught(recipient);

function addBotToList(address account) public onlyRole(DEFAULT_ADMIN_ROLE) { require(block.number - _liqAddBlock < _manualSnipeBlock); _isSniper[account] = true; }

tsarbuig commented 2 years ago

included in next release