tsarbuig / WalletHunter

The first Copytrading crypto bot in the World - for Uniswap & Pancakeswap
21 stars 8 forks source link

[Bug] buy_and_sell_and_autosell - issues with nonce #25

Closed AdamB2023 closed 1 year ago

AdamB2023 commented 1 year ago

Nonce 17 - buy, Nonce 18 - token approval. Then something happened with nonce, and bot didn't made 2 TXs in a row. Only the bot is interacting with my address, no Metamask or manual TX at this time.


02-06 05:33:14.3314  7dff - BUY Tx - COIN_NAME1 - TX_ID - Case 3 - Swap sent in: 0.01677s

7dff -- CONTROLS AFTER Tx -------------------------------------------
02-06 05:33:24.3324  7dff - BUY PRICE  ----------- You used 0.052980034338 Wrapped Ether to buy 342000.000000000000 COIN_NAME1 --> Buy price = 0.000000154912 Wrapped Ether/COIN_NAME1
02-06 05:33:24.3324  7dff - SAME BLOCK ? --------- Swap block: 16567382 / Your Tx block: 16567382 --> CONGRATS!! Your Tx was in the same block :)
02-06 05:33:24.3324  7dff - POSITION IN BLOCK ---- FRONTRUN : you managed to frontrun the original Tx :) (48 position before)
02-06 05:33:24.3324  7dff - BALANCE CHECK -------- Your ETH balance is: 0.311795071198346661
02-06 05:33:24.3324  7dff - TOKEN APPROVAL ------- Token COIN_NAME1 needs approval --> let's approve
02-06 05:33:35.3335  7dff - COIN_NAME1 approval Tx: TX_ID

7dff -- ANTI RUG ----------------------------------------------------
02-06 05:33:35.3335  7dff - SHOULD WE CONTINUE? -- BUY Tx made in a row = 2 | AMOUNT_OF_BUY_TX_BEFORE_THE_BOT_STOP parameter = 5 --> let's continue
- ANTI RUG ------------- COIN_NAME2 balance = 84123558262.25
02-06 05:33:35.3335  7dff ANTIRUG MANUAL LAUNCH- Anti rug-pull method starts for token COIN_NAME1
02-06 05:33:35.3335  - ANTI RUG FINAL LIST -- Anti rug-pull method starts for token
02-06 05:33:35.3335  - LIQUIDITY REMOVAL ---- We will sell if more than 30% of liquidity is removed
02-06 05:33:35.3335  - OTHER RUG METHODS ---- We will also check for Sell Allowance / Blacklisting / Trading Status / Cooldown changes
02-06 05:33:36.3336  7dff GET CONTRACT --------- COIN_NAME1 contract is not open source --> we won't be able to protect you as much as we can

7dff -- AUTO SELL ---------------------------------------------------
02-06 05:33:37.3337  7dff - AUTO SELL VALUES ----- COIN_NAME1 | Buy price (including fees) 0.000000154912381 | Stoploss (50%) 0.000000077456191 | You are holding 342000000000000 tokens
02-06 05:33:37.3337  7dff - AUTO SELL VALUES ----- COIN_NAME1 | 1st target price 0.000000309824762 --> will sell 50% of your initial bag (171000000000000 tokens)
02-06 05:33:37.3337  7dff - AUTO SELL VALUES ----- COIN_NAME1 | 2nd target price 0.000015489688987 --> will sell 50% of your initial bag (171000000000000 tokens)
[...]
COIN_NAME1   Price (7dff): 0.000000262897 | Sell Tax 20% | Price after Tax 0.000000210317396730 | 1st target price 0.000000309825 | Stoploss 0.000000077 | Current profit: 35.8%
COIN_NAME1   Price (7dff): 0.000000388108 | Sell Tax 20% | Price after Tax 0.000000310486193746 | 1st target price 0.000000309825 | Stoploss 0.000000077 | Current profit: 100.4%
02-06 05:52:27.5227  7dff - COIN_NAME1 1st SELL TARGET REACHED : current price = 0.000000310486194 --> let's sell 50% of your initial bag! (171000000000000 tokens)
02-06 05:52:27.5227  7dff - HONEYPOT / TAX CHECK - COIN_NAME1 - Trading is open: true | BuyTax: 10% | SellTax: 20% - Check made in: 0.00319s
02-06 05:52:27.5227  7dff - TX EARNINGS ---------- Selling 171000000000000 COIN_NAME1 will pay you 107.75$ > SELL_TX_MINIMUM_EARNINGS_IN_DOLLARS --> let's continue
02-06 05:52:27.5227  7dff - SELL Tx sent : TX_ID - Waiting Transaction Receipt...
COIN_NAME2     Price (13ef): 0.000037216998 | Sell Tax 5% | Price after Tax 0.000035356148237547 | 1st target price 0.000039639540 | Stoploss 0.000009910 | Current profit: 78.4%
COIN_NAME2     Price (13ef): 0.000041751410 | Sell Tax 5% | Price after Tax 0.000039663839932355 | 1st target price 0.000039639540 | Stoploss 0.000009910 | Current profit: 100.1%
02-06 05:55:39.5539  13ef - COIN_NAME2 1st SELL TARGET REACHED : current price = 0.000039663839932 --> let's sell 50% of your initial bag! (336494233049 tokens)
02-06 05:55:39.5539  13ef - HONEYPOT / TAX CHECK - COIN_NAME2 - Trading is open: true | BuyTax: 5% | SellTax: 5% - Check made in: 0.00273s
02-06 05:55:39.5539  13ef - TX EARNINGS ---------- Selling 336494233049 COIN_NAME2 will pay you 228.24$ > SELL_TX_MINIMUM_EARNINGS_IN_DOLLARS --> let's continue
02-06 05:55:39.5539  ---------- PENDING TX ------------
02-06 05:55:39.5539  Pending nonce = 21
02-06 05:55:39.5539  Current nonce = 19
02-06 05:55:39.5539  ----------------------------------
02-06 05:55:39.5539  13ef - WARNING - You have a pending Tx in your wallet: please wait for it to be mined or cancel it with Metamask.
COIN_NAME2     Price (13ef): 0.000041751410 | Sell Tax 5% | Price after Tax 0.000039663839932355 | 2nd target price 0.000039639540 | Stoploss 0.000009910 | Current profit: 100.1%
COIN_NAME2     Price (13ef): 0.000041751410 | Sell Tax 5% | Price after Tax 0.000039663839932355 | 2nd target price 0.000039639540 | Stoploss 0.000009910 | Current profit: 100.1%
COIN_NAME2     Price (13ef): 0.000042476954 | Sell Tax 5% | Price after Tax 0.000040353106572955 | 2nd target price 0.000039639540 | Stoploss 0.000009910 | Current profit: 103.6%

-- SWAP DETECTED -----------------------------------------------
02-06 05:56:26.5626  Tx TX_ID from #16: ADDRESS_ID - id: 7fd3
02-06 05:56:26.5626  NEW - This is a Uniswap Universal Tx with Command: 0a080c --> let's try to clone it
-------------- DEBUG ----------------
amountIn    = 360000000000000
amountOutMin= 161877396742076900
path lenght = 2
path        = ADDRESS_ID,ADDRESS_ID
-------------- /DEBUG ----------------

7fd3 -- PRE-CHECKS BEFORE Tx ----------------------------------------
02-06 05:56:26.5626  7fd3 - TX GAS CONTROL ------- Tx GAS = 19.539377881 and current GAS price = 15.692384048  --> let's continue
02-06 05:56:26.5626  7fd3 - BALANCE CHECK -------- Your wallet hold 342000000000000 tokens before sell (to be divided by 10^token decimals)
02-06 05:56:26.5626  7fd3 - SELL_AMOUNT ---------- This wallet hold 360000000000000 tokens before sell --> he sold 360000000000000 tokens = 100.00% of holdings
02-06 05:56:26.5626  7fd3 - SELL_AMOUNT ---------- Your wallet hold 342000000000000 tokens before sell --> let's sell 100.00% * 342000000000000 = 342000000000000 tokens
02-06 05:56:26.5626  7fd3 - GAS CALCULATION ------ Tx GAS = 19.539377881 --> your Tx GAS = 120% * 19.539377881 = 23.447253457
02-06 05:56:26.5626  ---------- PENDING TX ------------
02-06 05:56:26.5626  Pending nonce = 21
02-06 05:56:26.5626  Current nonce = 19
02-06 05:56:26.5626  ----------------------------------
02-06 05:56:26.5626  7fd3 - TX EARNINGS ---------- Selling 342000000000000 tokens will pay you 291.12$ > SELL_TX_MINIMUM_EARNINGS_IN_DOLLARS --> let's continue
02-06 05:56:26.5626  7fd3 - WARNING - You have a pending Tx in your wallet: please wait for it to be mined or cancel it with Metamask.
COIN_NAME2     Price (13ef): 0.000044714592 | Sell Tax 5% | Price after Tax 0.000042478862669420 | 2nd target price 0.000039639540 | Stoploss 0.000009910 | Current profit: 114.3%```
AdamB2023 commented 1 year ago

Faced the nonce issue again. 02-07 06:24:26 TX was made with nonce 12. Not sure why then it was saying about pending 15. I didn't interact with the address, only WH did.

-- SWAP DETECTED -----------------------------------------------
02-07 06:24:26.2426  Tx TX_ID from #22: ADDRESS_ID - id: 082f

082f -- PRE-CHECKS BEFORE Tx ----------------------------------------
02-07 06:24:26.2426  082f - TX GAS CONTROL ------- Tx GAS = 33.469810271 and current GAS price = 20.589188933  --> let's continue
02-07 06:24:26.2426  082f - BALANCE CHECK -------- Your wallet hold 6605394461860581032933123 tokens before sell (to be divided by 10^token decimals)
02-07 06:24:26.2426  082f - SELL_AMOUNT ---------- This wallet hold 6354601163069617604301422 tokens before sell --> he sold 3177300500000000000000000 tokens = 50.00% of holdings
02-07 06:24:26.2426  082f - SELL_AMOUNT ---------- Your wallet hold 6605394461860581032933123 tokens before sell --> let's sell 50.00% * 6605394461860581032933123 = 3302697164876345897860751 tokens
02-07 06:24:26.2426  082f - GAS CALCULATION ------ Tx GAS = 33.469810271 --> your Tx GAS = 120% * 33.469810271 = 40.163772325
02-07 06:24:26.2426  082f - TX EARNINGS ---------- Selling 3302697164876345897860751 tokens will pay you 49.56$ > SELL_TX_MINIMUM_EARNINGS_IN_DOLLARS --> let's continue

082f -- COPY SWAP ---------------------------------------------------
02-07 06:24:26.2426  082f - SELL Tx - COIN_NAME1 - TX_ID - Case 6 - Swap sent in: 0.00955s

082f -- CONTROLS AFTER Tx -------------------------------------------
02-07 06:24:36.2436  082f - SELL PRICE  ---------- You sold 132107.886595053831 COIN_NAME1 for 0.029306334573 Wrapped Ether --> Sell price = 0.000000221836 COIN_NAME1/Wrapped Ether
02-07 06:24:36.2436  082f - SAME BLOCK ? --------- Swap block: 16574803 / Your Tx block: 16574803 --> CONGRATS!! Your Tx was in the same block :)
02-07 06:24:36.2436  082f - POSITION IN BLOCK ---- FRONTRUN : you managed to frontrun the original Tx :) (41 position before)
02-07 06:24:36.2436  082f - BALANCE CHECK -------- Your ETH balance is: 0.758147192614477377
02-07 06:37:55.3755  e3dd - ANTI RUG ------------- Liquidity is being removed for COIN_NAME1. Tx: TX_ID
02-07 06:37:55.3755  e3dd - LIQUIDITY REMOVAL ---- Minimum Liquidity removal not reached, still watching...
02-07 06:37:55.3755  e3dd - DROPPED AND REPLACED Tx detected: TX_ID
02-07 06:37:55.3755  e3dd - SELL Tx CANCELLED by TX_ID - nonce used : undefined
02-07 06:37:55.3755  e3dd - ANTI RUG ------------- Liquidity is being removed for COIN_NAME1. Tx: TX_ID
02-07 06:37:55.3755  e3dd - LIQUIDITY REMOVAL ---- Minimum Liquidity removal not reached, still watching...

-- SWAP DETECTED -----------------------------------------------
02-07 06:58:43.5843  Tx TX_ID from #22: ADDRESS_ID - id: 1f9a

1f9a -- PRE-CHECKS BEFORE Tx ----------------------------------------
02-07 06:58:43.5843  1f9a - TX GAS CONTROL ------- Tx GAS = 33.028239098 and current GAS price = 19.685449857  --> let's continue
02-07 06:58:43.5843  1f9a - BALANCE CHECK -------- Your wallet hold 3302697296984235135072372 tokens before sell (to be divided by 10^token decimals)
02-07 06:58:43.5843  1f9a - SELL_AMOUNT ---------- This wallet hold 3177300663069617604301422 tokens before sell --> he sold 3177300500000000000000000 tokens = 100.00% of holdings
02-07 06:58:43.5843  1f9a - SELL_AMOUNT ---------- Your wallet hold 3302697296984235135072372 tokens before sell --> let's sell 100.00% * 3302697296984235135072372 = 3302697296984235135072372 tokens
02-07 06:58:43.5843  1f9a - GAS CALCULATION ------ Tx GAS = 33.028239098 --> your Tx GAS = 120% * 33.028239098 = 39.633886918
02-07 06:58:43.5843  1f9a - TX EARNINGS ---------- Selling 3302697296984235135072372 tokens will pay you 25.99$ > SELL_TX_MINIMUM_EARNINGS_IN_DOLLARS --> let's continue

1f9a -- COPY SWAP ---------------------------------------------------
02-07 06:58:43.5843  1f9a - SELL Tx - COIN_NAME1 - TX_ID - Case 6 - Swap sent in: 0.01183s

1f9a -- CONTROLS AFTER Tx -------------------------------------------
COIN_NAME2  Price (9a89): 0.000000315163 | Sell Tax 5% | Price after Tax 0.000000299405155636 | 1st target price 0.000000297202 | Stoploss 0.000000074 | Current profit: 101.5%
02-07 07:18:27.1827  9a89 - COIN_NAME2 1st SELL TARGET REACHED : current price = 0.000000299405156 --> let's sell 50% of your initial bag! (336471776561708 tokens)
02-07 07:18:27.1827  9a89 - HONEYPOT / TAX CHECK - COIN_NAME2 - Trading is open: true | BuyTax: 3% | SellTax: 5% - Check made in: 0.00302s
02-07 07:18:27.1827  9a89 - TX EARNINGS ---------- Selling 336471776561708 COIN_NAME2 will pay you 169.98$ > SELL_TX_MINIMUM_EARNINGS_IN_DOLLARS --> let's continue
02-07 07:18:27.1827  ---------- PENDING TX ------------
02-07 07:18:27.1827  Pending nonce = 15
02-07 07:18:27.1827  Current nonce = 13
02-07 07:18:27.1827  ----------------------------------
02-07 07:18:27.1827  9a89 - WARNING - You have a pending Tx in your wallet: please wait for it to be mined or cancel it with Metamask.
tsarbuig commented 1 year ago

very interesting, can you send me the logs in PM ? all the logs, I will investigate

thanks

tsarbuig commented 1 year ago

solved