Skip to content

Security Review: Uniswap V4 Hook Bonding Curve β€” Graduate-in-Place Safety AnalysisΒ #1

Description

@hebridean-tech

πŸ” Proactive Security Review

Hi Untoll team β€” I perform independent smart contract security audits for DeFi protocols. I noticed your Uniswap V4 bonding curve hook ("the bonding curve is the pool, graduate-in-place on the same poolid, no migration") and wanted to flag security considerations for this architecture.

🚨 Finding 1: beforeSwap State Transition Atomicity (MEDIUM-HIGH)

The "graduate-in-place" design means the hook must transition from bonding curve pricing to AMM pricing within the same pool ID. This transition during beforeSwap() must be atomic:

  • If the hook detects that the bonding curve is exhausted mid-swap, the remaining delta must be settled correctly
  • The pool's sqrtPriceX96 must be updated atomically at the transition point
  • If the transition happens between beforeSwap and afterSwap, the hook could be in an inconsistent state

This is one of the most novel hook designs I've seen β€” but the atomicity requirement at the graduation boundary is critical.

🚨 Finding 2: Flash Loan Protection via V4 Hooks (MEDIUM)

Uniswap V4 hooks can access pool state during swaps. A bonding curve hook must ensure that flash loan attacks (borrow from external source β†’ buy through bonding curve β†’ sell at inflated price β†’ repay) are unprofitable. Per-swap purchase limits or TWAP mechanisms should be implemented.

πŸ’Ό Offer

I am an independent security researcher with experience auditing Uniswap V4 hooks and bonding curve mechanisms. I would be happy to perform a full audit for $500-$1,000.

Contact: Respond here or reach out directly.

This is a proactive review, not a bug bounty submission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions