A senior a16z Crypto researcher advocates shifting DeFi security from 'code as law' to 'specification as law,' emphasizing standardized specifications and invariant checks to prevent hacks. In 2023, hackers exploited code vulnerabilities to steal over $649 million, with major losses occurring in established protocols such as Balancer. While invariant checks may bolster security, concerns exist about increased gas costs and the complexity of designing rules without false positives.