CoW Hooks is a feature of CoW Protocol that allows you to do any arbitrary on-chain execution before (pre-hooks) and after (post-hooks) a trade happens.
CoW Hooks allows to integrate with any DeFI protocol, in other words, it extends the intent framework to enable not only to swap but also to execute, prepare, or post process the swap.
All networks where CoW Protocol is available, at the time of writing this, are:
Mainnet, Gnosis Chain, Arbitrum, and Sepolia.
Check the full list here: https://docs.cow.fi/cow-protocol/reference/sdks/cow-sdk/enums/SupportedChainId
The solvers. When they post the settlement solution for a batch of trades, they will also execute all the pre/post hooks.
This will allow users to do all these deFI interactions in a gas-less fashion.
A hook is defined by 3 fields that model an Ethereum call:
More details in: https://docs.cow.fi/cow-protocol/reference/core/intents/hooks
Let’s take this Gnosis Chain as an example: