v4 Hook Security Foundations Security-first guide for building Uniswap v4 hooks. Hook vulnerabilities can drain user funds—understand these concepts before writing any hook code. Threat Model Before writing code, understand the v4 security context: | Threat Area | Description | Mitigation | | ----------------------- | ---------------------------------------------------------- | ---------------------------------------------- | | Caller Verification | Only should invoke hook functions | Verify | | Sender Identity | always equals PoolManager, never the end user | Use parameter for user identity…