Oh, yeah, right that's why most open source wallets are the most targeted apps of any hacks, scams and phishing, e.g. Electrum. I remember millions was lost and got phished not once[1] but twice[2]. Well, there are lot of hack cases happened in an open source apps too including the smart contracts[3].
It is not impossible to see any vulnerability in open source software. The difference is that such vulnerabilities are extremely rare and are almost never in security critical parts. For example the example you used about Electrum was not a vulnerability in Electrum that led to any funds being lost by Electrum itself, it was a mistake by users who installed another malicious software from elsewhere and lost their coins to that scam.
Your smart contract example is also a bad one because from day one we knew that Ethereum protocol is flawed and can be exploited. So there was no surprise there. And we knew that because it is open source! We also know that they never really fixed it either.
Also, i bet there is no way you can verify that the code published publicly as open source are the same actual codes that were deployed on their live servers. Unless it was compiled by you to build the application from being open source, or from github it self.
Good projects like Electrum and bitcoin core are using deterministic builds which means whoever compiles the source code will get the same exact binaries. So we can be sure that the binary that they publish is the same as the source code.
And talking about the coinomi, the lost amount of money
were too little compared to electrum.
You should also consider that Coinomi is far less popular with a lot less number of users.
See, either its open source or closed source, hacks and scams happen. While being open source has huge advantage, but the fact that people still need to trust the developers who make the code and conduct the code audit because not everyone can read source codes, so you still need to "trust" someone/developer for your safety and fund security while most people who conduct this scams, hacks, phishing are developers as well.
That's true but based on popularity of the project you can be more sure that enough number of people have looked at the code to not have any backdoors. Regardless of how popular a closed source software is, you can never reach the same level of certainty.
Where later on you can sue the business for what incident happen, while you can't to open source developers because they are excluded if people read open source license particularly the MIT, ISC and other no liability open source licenses.
I don't think you can sue any of them. There is always some sort of Terms of Services that protects them from being liable. For example Trust wallet that is closed source is released under GPL! See
Liability part of TrustWallet or
Limitations of Coinomi.