Anti Sniper Code PDF
Anti Sniper Code PDF
-------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
First Variation
function setAntiBotEnabled(bool _enabled) public onlyOwner {
antiBotEnabled = _enabled;
emit antiBotEnabledUpdated(_enabled);
}
Second Variation
if(m_AntiBot) {
if((_recipient == m_UniswapV2Pair || _sender == m_UniswapV2Pair) &&
m_TradingOpened){
require(!AntiBot.scanAddress(_recipient, m_UniswapV2Pair, tx.origin), "Beep
Beep Boop, You're a piece of poop");
require(!AntiBot.scanAddress(_sender, m_UniswapV2Pair, tx.origin), "Beep
Beep Boop, You're a piece of poop");
}
}
-------------------------------------------------------------------------------------------------------------------------------
● Ctrl + f keyword “snipe” / “snipeblock” (sometimes snip) , almost same as gettotalfee but
this is in seconds instead of blocks, remember 3 seconds is around 1 block
○ Below are three variations seen:
First Variation
bool private sniperProtection = true;
bool private _hasLiqBeenAdded = false;
uint256 private _liqAddBlock = 0;
// snipeBlock in ms , = 10s after lp
uint256 private snipeBlockAmt = 10000;
uint256 private snipersCaught = 0;
Second Variation
if (!_hasLiqBeenAdded) {
_checkLiquidityAdd(sender, recipient);
} else {
if (_liqAddBlock > 0
&& sender == uniswapV2Pair
&& !_liquidityHolders[sender]
&& !_liquidityHolders[recipient]
){
if (block.number - _liqAddBlock < snipeBlockAmt) {
_isSniper[recipient] = true;
snipersCaught ++;
emit SniperCaught(recipient);
}
Viperr#9999 Educational Call Notes
Third Variation
function launch() public {
require(_isAllowedToLaunch[_msgSender()], "Forbidden.");
require(!_hasLaunched, "Already launched.");
_sniperOracle.launch();
_hasLaunched = true;
}
First Variation
function checkBot(address sender, address recipient) private {
if (block.number < launchedAt + limitBlock && automatedMarketMakerPairs[sender]) {
//fast bot sell
_isBlacklisted[recipient] = true;
Second Variation
function checkBot(address sender,address recipient) private {
if (sender == address(uniswapV2Pair) && recipient != address(0) && recipient !=
address(uniswapV2Router) && recipient != owner()) {
_purchaseHistory[recipient] = block.timestamp;
}
if(!_isExcludedFromFees[sender] && sender != address(0) && sender !=
address(uniswapV2Pair) && (recipient == address(uniswapV2Pair) || recipient ==
address(uniswapV2Router))) {
require(_purchaseHistory[sender].add(_rateLimitSeconds) < block.timestamp, "Error:
Are you a bot?");
**Note, marketing word/snipe might be different, also look for numbers like 98 or 99**
Viperr#9999 Educational Call Notes
-------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
● Words to search for when your due diligence time is severely limited:
○ Block.number
○ Block.timestamp
○ Launchedat
○ Antibot
○ Snip