Upgradeable contracts made safer with Crytic
Summary: Trail of Bits added a suite of 17 upgradeability checks to Crytic, its GitHub app for finding smart contract flaws, which already detects 90+ vulnerabilities. In a demo token, Crytic flagged that removing the init() function and its was_init state variable shifted the storage offset of balances between MyToken and MyTokenV2, breaking the contract's storage layout.
What you should know: A single removed state variable silently shifted the storage layout in the demo, a mistake the post calls particularly difficult to find by hand in complex codebases with many contracts and inheritances - and one that can lock contracts or lose data once deployed.
Read the original at Trail of Bits Blog ↗