Security Audit Finding
Auditor: BinShao1988 (https://github.com/BinShao1988)
Date: 2026-03-14
Severity: Medium
Description
The Hook system allows external contracts to be called during pool operations. While this enables powerful customization, it introduces security considerations that integrators should be aware of.
Current State
Hooks are called without verification of their code:
if (key.hooks.shouldCallBeforeSwap()) {
delta = key.hooks.beforeSwap(msg.sender, key, params, hookData);
}
Security Considerations
- Malicious hooks can return incorrect delta values
- Hooks can execute arbitrary operations during callbacks
- Hook failures can cause transaction reverts
Suggestions
- Add a security checklist for Hook developers
- Provide example audited Hook implementations
- Document the trust assumptions clearly
Recommended Security Checklist for Hooks
References
This finding was part of a security audit conducted on popular Ethereum projects.
Security Audit Finding
Auditor: BinShao1988 (https://github.com/BinShao1988)
Date: 2026-03-14
Severity: Medium
Description
The Hook system allows external contracts to be called during pool operations. While this enables powerful customization, it introduces security considerations that integrators should be aware of.
Current State
Hooks are called without verification of their code:
Security Considerations
Suggestions
Recommended Security Checklist for Hooks
References
This finding was part of a security audit conducted on popular Ethereum projects.