Help me understand a BSC scam token

About a month ago, I was involved in a scam token called:
OpenDao - https://bscscan.com/token/0x1d12b80341e40f763503117a2a57eababd4040c2

From BscScan, you can see the functions that were called. He clearly minted many tokens, and drained the liquidity pool

Im a Solidity noob and Im just learning to deploy smart contracts through remix and understand how they work, in order to avoid new scam tokens that I may come across.

What I can't wrap my head around, is how he was able to sell that large amount of tokens? Clearly he didn't do it directly through pancakeswap and had to call up a function on remix? Am I missing something?

Any help is much appreciated :grin:

Welcome @CcLoooS. For general questions about smart contracts please use the #smart-contracts category. I've moved the post for you.


If you look in the source code you can easily see that there is a mintToken function that is onlyOwner. This is a dead giveaway.

In other cases it may not be so obvious though. I definitely think you should audit the code and try to find things, and with practice you will get better at it. However, if you're a Solidity beginner, I don't think you should only rely on your own analysis of whether a token is safe or not.