Search code examples
blockchainsoliditybinance-smart-chain

How to restrict pancakeswap users from adding initial liquidity for my issued token?


I plan to launch a token, but I can not add liquidity right away, because first audit will be processed and presale. Thus I am thinking how to prevent other pancakeswap users from adding initial liquidity for my token? Which function I should use for that? I am thinking maybe transfer function should have some kind of whitelisting, so transfer would be possible only by token owner and presale contract. Please share your experience with such case.


Solution

  • Thus I am thinking how to prevent other pancakeswap users from adding initial liquidity for my token?

    Correct. You cannot prevent trading of your token if your token is transferable.

    Here is an example how you can modify transfer() function with restrict conditions.