As this project appears to be fairly unknown in the fediverse still, I’d like to use this opportunity to advertise Flohmarkt. This Fediverse equivalent of Facebook Marketplace already has some instances up and running - see here: https://codeberg.org/flohmarkt/flohmarkt/wiki/flohmarkt-instances
You can use gpg signatures
That wouldn’t really solve it though. The problem is not a man in the middle attack. It’s someone scamming you. They can do it, then generate another signature, repeat, etc.
Web of trust - did you hear? https://www.gnupg.org/gph/en/manual/x547.html
So you only trade with people in your web of trust? That’s not feasible. People flock to these websites to trade with strangers. You don’t need a middleman to trade with people you already trust.