0

Recently I bought a token from PancakeSwap. Looks, like it's scammed - it's new, there are only buy operations, and no sell operations. And I also cannot swap it back.

I'm providing its contract source code and would be happy if someone explains why it cannot be sold:

#
#  Panoramix v4 Oct 2019 
#  Decompiled source of bsc:0xEF45178482b5868668D4ae8f2556D4F23c4Ffe51
# 
#  Let's make the world open source 
# 

def storage:
  owner is addr at storage 0
  newOwner is addr at storage 1
  symbol is array of uint256 at storage 2
  name is array of uint256 at storage 3
  decimals is uint8 at storage 4
  stor5 is uint256 at storage 5
  unknown1ee59f20Address is addr at storage 6
  balanceOf is mapping of uint256 at storage 7
  allowance is mapping of uint256 at storage 8

def name(): # not payable
  return name[0 len name.length]

def unknown1ee59f20(): # not payable
  return unknown1ee59f20Address

def decimals(): # not payable
  return decimals

def balanceOf(address _owner): # not payable
  require calldata.size - 4 >= 32
  return balanceOf[addr(_owner)]

def owner(): # not payable
  return owner

def symbol(): # not payable
  return symbol[0 len symbol.length]

def newOwner(): # not payable
  return newOwner

def allowance(address _owner, address _spender): # not payable
  require calldata.size - 4 >= 64
  return allowance[addr(_owner)][addr(_spender)]

#
#  Regular functions
#

def _fallback() payable: # default function
  revert

def totalSupply(): # not payable
  require balanceOf[0] <= stor5
  return (stor5 - balanceOf[0])

def transferOwnership(address _newOwner): # not payable
  require calldata.size - 4 >= 32
  require caller == owner
  newOwner = _newOwner

def unknown81f4f399(addr _param1): # not payable
  require calldata.size - 4 >= 32
  require caller == owner
  unknown1ee59f20Address = _param1

def acceptOwnership(): # not payable
  require caller == newOwner
  log OwnershipTransferred(
        address previousOwner=owner,
        address newOwner=newOwner)
  owner = newOwner
  newOwner = 0

def approve(address _spender, uint256 _value): # not payable
  require calldata.size - 4 >= 64
  allowance[caller][addr(_spender)] = _value
  log Approval(
        address owner=_value,
        address spender=caller,
        uint256 value=_spender)
  return 1

def transfer(address _to, uint256 _value): # not payable
  require calldata.size - 4 >= 64
  if unknown1ee59f20Address == _to:
      revert with 0, 'Please wait'
  require _value <= balanceOf[caller]
  balanceOf[caller] -= _value
  require _value + balanceOf[_to] >= balanceOf[_to]
  balanceOf[addr(_to)] = _value + balanceOf[_to]
  log Transfer(
        address from=_value,
        address to=caller,
        uint256 value=_to)
  return 1

def approveAndCall(address _spender, uint256 _amount, bytes _extraData): # not payable
  require calldata.size - 4 >= 96
  require _extraData <= 4294967296
  require _extraData + 36 <= calldata.size
  require _extraData.length <= 4294967296 and _extraData + _extraData.length + 36 <= calldata.size
  allowance[caller][addr(_spender)] = _amount
  mem[ceil32(_extraData.length) + 128] = _amount
  log Approval(address owner, address spender, uint256 value):
               Mask(8 * -ceil32(_extraData.length) + _extraData.length + 32, 0, 0),
               mem[_extraData.length + 160 len -_extraData.length + ceil32(_extraData.length)],
               caller,
               _spender,
  require ext_code.size(_spender)
  call _spender with:
       gas gas_remaining wei
      args caller, _amount, this.address, Array(len=_extraData.length, data=_extraData[all])
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]
  return 0, 1

def transferFrom(address _from, address _to, uint256 _value): # not payable
  require calldata.size - 4 >= 96
  if not _from:
      if unknown1ee59f20Address == _to:
          revert with 0, 'Please wait'
  else:
      if unknown1ee59f20Address:
          if unknown1ee59f20Address == _to:
              revert with 0, 'Please wait'
      else:
          unknown1ee59f20Address = _to
  require _value <= balanceOf[addr(_from)]
  balanceOf[addr(_from)] -= _value
  require _value <= allowance[addr(_from)][caller]
  allowance[addr(_from)][caller] -= _value
  require _value + balanceOf[addr(_to)] >= balanceOf[addr(_to)]
  balanceOf[addr(_to)] += _value
  log Transfer(
        address from=_value,
        address to=_from,
        uint256 value=_to)
  return 1

I would greatly appreciate for any help to swap it back and return back my investment!

1 Answer 1

1

this line in the transfer is prohibiting the transfer:

def transfer(address _to, uint256 _value): # not payable
  ...
  if unknown1ee59f20Address == _to:
      revert with 0, 'Please wait'

if you read out unknown1ee59f20Address (storage slot 6), it shows an address: 682b9056b61a5087e2373a6ee6a7d3000752b46c: PancakeSwap V2: BUSD-STXC (https://bscscan.com/address/682b9056b61a5087e2373a6ee6a7d3000752b46c#code)

so the contract is actively prohibiting transfers to the pancake LP.

This address is setable by the owner:

def unknown81f4f399(addr _param1): # not payable
  require calldata.size - 4 >= 32
  require caller == owner
  unknown1ee59f20Address = _param1

Judging from the 'Please wait' message, this token will most likely enable the transfer after some time (or it's simply a rug). Anyway, I'd stay away from tokens prohibiting transfers in any form.

7
  • Thank you very much for the answer. The problem is, I've already invested 500$ and bought 35 tokens (the owner of the token convinced me in a private messenger and then blocked). Would you suggest a way to return it back? BTW, lots of people bought after me, now my 500$ is more than 3k. Looks like, no one can sell..
    – Leeloo
    Feb 25, 2022 at 16:10
  • 1
    That sounds like a scam then. The owner only blocked the pancakeswap LP. It's entirely up to them to remove it. You could trade this coin on any other platform. Though judging from the current state.. no one would want to open up a LP position or buy this token from you.
    – phaze
    Feb 25, 2022 at 16:57
  • 1
    If it really is a scam, then there should be no incentive for them to remove the block. If they do, they will most likely remove their liquidity first, because otherwise they would loose all of their "profits" again. You could open up other pools, but then people will dump on you. So I really don't see any way out (again, this is assuming this is a scam)
    – phaze
    Feb 25, 2022 at 17:32
  • 1
    Well they have originally supplied the tokens to the pool, example: 1. Open LP of 1M worthless coins / 1BNB 2. Lock the transfer in the contract (owner can set this) to disallow any new transfers to the pool 3. Wait for everyone else to deposit BNB into pool, while they trade out the worthless tokens 4. They are allowed to withdraw their LP position anytime, because they are swapping AWAY from the pool, not to the pool
    – phaze
    Feb 25, 2022 at 18:53
  • 1
    I don't see any good way out for you sadly, because that essentially means finding someone else to swap your, now worthless tokens with something that has value, because they have turned out to be a scam.
    – phaze
    Feb 25, 2022 at 18:57

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.