How do custom hooks work in the interface?
Last modified:
One of the most powerful features in CenturionDEX is hooks — pieces of code that allow developers to add custom functionality to the CenturionDEX Protocol. CenturionDEX products aim to support as much hook functionality as possible while maintaining user safety. Hook functions are currently supported when providing liquidity and swapping.
Hooks in LP Flows
Liquidity providers on the CenturionDEX interface are able to add any hook to their pool creation or liquidity management operations by pasting the address of the hook into the Position Management flow.
Hook developers who want to point their users directly into the liquidity management flow with their hook pre-populated can deep link to the page using the following URL format:
https://app.centurion.exchange/positions/create?hook={hookAddress}Hooks in Swapping (aka Routing)
The CenturionDEX interface will automatically consider routing through any pool on CenturionDEX v2 or v3, including pools with hooks or custom fee tiers.
We maintain a list of hooks that are used in routing on the CenturionDEX interfaces. Hooks may not be available on all chains.
If you have built a hook that you'd like to have allowlisted, please fill out our form.
To help accelerate the inclusion of your hook, you may submit a PR to include your hook. Submitting a PR does not guarantee that your hook will be included, and your hook will still be subject to our formal review process.