Use Case & Applications
Prevents unauthorized ownership transfers, which could allow attackers to take complete control of the protocol. Critical for DeFi protocols with owner-controlled administrative functions, lending protocols, yield aggregators, cross-chain bridges, and governance systems. For example, in the Radiant Capital hack, the attacker gained control over 3 signers of the multisig, which allowed them to change ownership of the lending pools and ultimately drain the protocol. This assertion would have prevented such an attack.Explanation
Monitors changes to the owner address storage slot in contracts using:ph.forkPreTx()/ph.forkPostTx(): Compare owner address before and after transactiongetStateChangesAddress(): Track all changes to the owner address slot during transaction executionregisterStorageChangeTrigger(): Trigger when owner address changes
Code Example
Full examples with tests available in the Phylax Assertion Examples Repository.

