How hard would it be to enforce the commission? Illegal marketplaces can do whatever they want afaik, but is there any better way to implement the fees other than doing it as side transaction and just refunding them on every "failed" purchase?
You seem new to bitcoin. Refunding on every failed purchase is not a thing that happens.
Transactions can have multiple outputs. The marketplace simply provides a raw transaction with most money going to the seller but some going as fees to the marketplace.
So I found this example of a likely multisig payment in a recent block.
https://blockchain.info/tx/9637a88575f472f4290daebb3db6e41f179038acc2b020b36b6bc7d2fd198cdf92% of the money goes to one address and 8% goes to another, so it's probably a 2-of-3 arbitration with a fee. Doesn't have to be anything illegal,
http://bitrated.com/ is pretty popular too.