A proof-of-concept Uniswap v4 hook that lets LPs or traders place limit-style take-profit orders on any supported pool. The hook tracks target ticks, executes swaps when prices cross them, and issues ERC-1155 claim tokens that can later be redeemed for the output asset.
⚠️ This is not production-ready. It’s a learning + experimentation hook based on the Atrium Limit Orders workshop.
In this hook, a user can:
Place a take-profit order: e.g., sell token0 for token1 when price reaches a given tick.
Cancel an order: reclaim their unfilled input tokens.
Automatically execute orders: when the pool tick crosses their target.
Redeem: claim the output tokens from executed orders using ERC-1155 “claim tokens.”
Because hooks in Uniswap v4 can run custom logic on swaps, we detect when price crosses a target tick in afterSwap and perform the order execution immediately.