How to build a custom Uniswap hook with AI
7 November 2026
The 15 ready-made rules cover most launches. When you need something different, such as a fee that changes with the time of day, rewards for long-term holders, or a rule only your community uses, you can describe it and let AI write the code into your own hook.
How it works
- Open Advanced and choose Public or Private.
- Tick any of the tested rules you want as a base.
- Describe the extra behaviour in plain words, for example "double the sell tax on Fridays" or "send 1% of every buy to holders who have held for 30 days".
- AI writes the custom code on top of the tested rules. You see the full contract before anything happens.
- Deploy it from your own wallet. Your hook gets its own address and its own page on UniHooks, and its source code is published on the block explorer automatically.
- Launch pools with it from its page, and submit it to Uniswap from there so it can be traded in Uniswap's app.
Why build on tested rules
The base rules are tested against a real copy of Uniswap. Starting from them means the AI only writes the part that's new to you, which keeps the custom part small and easy to read.
Before you deploy
- Read the generated code, or have someone you trust read it. Custom code is new code, and new code can have bugs.
- Test with a small amount first.
- Remember that hooks can't be changed after a pool uses them, so get it right before launch.
Not sure you need custom code? Compare Create and Advanced.
Try it on your own token. Pick the rules, sign one transaction, no code.Create a hook