~/talk

Security considerations when building Hooks in Uniswap V4

Talkat DeFi Security Summit 2024 · 2024-11-07..11-09· [security, smart-contracts]
slides:none on file

Uniswap v4 uses a single pool manager and transient storage so hooks can run across many pools in one transaction (enabling flash-loans across all pools). Hooks are set at pool init and expose external functions, so anyone can initialize or call them; common failures include cross-pool storage overrides (fix with a mapping per pool), missing access control (add an onlyPoolManager modifier), simple logic bugs (mint uses = instead of +=), unexpected reverts that lock liquidity, arbitrary external calls that drain funds, upgradeability and DoS risks. Slides use ChatGPT-generated code examples.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Uniswap v4 architecture
  3. 3:42Understanding hooks
  4. 6:24Managing pools in hooks
  5. 8:59Access control in hooks
  6. 10:32Logic and code issues
  7. 11:39Preventing unexpected reverts
  8. 13:22General security best practices
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.