Make sure that ether is not drained from a contract
Real-world example: In February 2025, Bybit suffered one of the largest hacks in crypto history, losing approximately $1.4 billion USD when attackers compromised Safe Wallet’s UI and changed the implementation address of their proxy contract. This allowed the attackers to drain all assets without requiring additional approvals from the original owners. ETH drain assertions, especially with whitelist functionality, could have prevented or significantly limited the impact of this attack. See the Bybit Safe UI attack for more details.
forkPreState()
/ forkPostState()
: Capture contract’s ETH balance and whitelist balances before/after transactionregisterBalanceChangeTrigger()
: Trigger when ETH balances changeNote: Full examples with tests available in the Phylax Assertion Examples Repository.