Whatever happens to any DeFi project the code is to be blame, this is why DeFi projects are highly risky than any other projects in crypto space, if failure comes it's the code, if hacks happens it's the code to be blamed, this is just the way it is, so tell me why won't devs rug pulled themselves? There will be no one to be blame anyways
Just to be fair, no code is 100% fool-proof, that's why it needs to be tested and stress it out to see if it will break. The problem with Defi developers is that it's hard to create real life test cases, to really put their code into it, until it's too late. They could hire third party to do it for them, but if the guys doesn't have experienced to write a good test cases then they are just wasting their time and money.