It boils down to intent. If you intend to make a legitimate platform for commerce that also happens to be used for illegal stuff, (Craigslist, for example) you're in the clear as long as you aren't actively aiding them.
In contrast, if you set up your platform with the explicit intention of selling illegal goods, then you're in trouble.