ERC20 tokens are cryptocurrencies built upon the Ethereum blockchain. These tokens can be used for buying, selling,smart contracts, etc. See more information here: https://cointelegraph.com/explained/erc-20-tokens-explained
Back in 2018, an unknown hacker exploited a previously-unknown programming error in an Ethereum smart contract and generated absurdly large amounts of ERC-20 tokens for himself. He tried selling them on cryptocurrency exchanges, but his actions were quickly discovered and the exchanges shut down ERC-20 token trading in response. See here: https://techcrunch.com/2018/04/25/overflow-error-shuts-down-token-trading/
Would the above action of the hacker be considered illegal? While "counterfeiting" real currency is obviously illegal, cryptocurrencies are not considered real money in most countries (at best, they are viewed as a commodity). Plus, the hacker didn't really "steal" anything; he just exploited a bug and generated a lot of tokens for himself. It's sort of like cheating without actually breaking the rules, so to speak. So that's why I'm wondering - would "counterfeiting" ERC-20 tokens (like what the hacker did) be considered illegal?