Theoretically speaking. DEX shouldn't be hackable as per the general of it but in previous years DEX really got hack just like what happened to Ether delta that the hacker retrieve the data of customers by accessing the site DNS records and some trick on the domain.
The "hacker" was not able to get any data from any records, and it wasn't even a hack per se. It was DNS jacking, basically meaning they were able to replace the original site with a fake one, so the original itself was never really compromised. It was essentially a phishing attack; if you didn't try to log in while the fake was up, you wouldn't have been affected.
That being said, EtherDelta had centralized components, and was taken advantage of. DEX should still be more resistant to attacks than standard exchanges though, mostly thanks to the fact that they don't keep your coins for you.
While we are talking about DEXs, I have a question here:
What IF:
- A DEX literally gets hacked somehow with all our privkeys too getting leaked to hackers and they move all the funds (that's what the least they can do)
Wouldn't you be running the same kind of risk by using a CEX? We've seen CEX hackings happen far more often than DEX hackings, even.