What is a hook on CenturionDEX?

Last modified:

On CenturionDEX today, hooks are a planned feature rather than an active one. Live deployments currently support v2 and v3 only.

Conceptually, a hook is an external smart contract that a pool can call at specific execution points. Hooks let developers customize pool behavior without modifying core settlement contracts.

Why hooks exist

Hooks make pool-level logic programmable. Instead of one fixed rule set for every pool, developers can opt into custom behavior for specific pools while keeping shared settlement and accounting in the protocol.

Common examples include:

  • Dynamic fee policies
  • Incentive and rebate logic
  • Custom access controls or allowlists
  • On-chain analytics and accounting extensions

Where hooks would run

A hook can run before and/or after key pool actions such as:

  • Pool initialization
  • Liquidity add/remove updates
  • Swaps
  • Donations

The exact callback surface depends on the hook implementation and pool configuration.

Risk model

Hooks increase flexibility, but they also increase integration risk because custom logic can change execution behavior in ways that are not obvious from the interface alone.

When hooks are eventually enabled, integrators should:

  • Review the hook contract code and audits
  • Verify deployment addresses per network
  • Start with small test transactions
  • Pay attention to in-app hook warnings