I know parts of my specific solutions to these problems:
- Higher level software engineering guidelines to prevent this sort of bug in the future, minimizing occurances as much as possible.
- On-chain recovery vehicles like insurance, where losses are covered partially and uncontroversially, at least until a larger decision is made.
- A community-centric process for identifying and creating consensus for responses to issues like these, that ensure the broadest possible response where users can signal their support and adoption is managed in the fairest possible way. This process mighy take months to years to resolve, and I think that should be on purpose.