Using the Hook Store
To access the Hook Store:- Open CoW Swap and connect your wallet
- Navigate to the hook controls (pre-hook or post-hook section)
- Click “Add Pre/Post-Hook Action” to open the Hook Store
Available hook dApps
The Hook Store ships with several built-in dApps:| Hook dApp | Description | Networks |
|---|---|---|
| Build your own hooks | Manually enter target, callData, and gasLimit for any contract call | All |
| Claim GNO from validators | Claim unclaimed GNO rewards from Gnosis Chain validators as a pre-hook | Gnosis Chain |
Custom hook dApps
You can also load any hook dApp by URL:- Click “Add Pre/Post-Hook Action”
- Go to the “My Custom Hooks” tab
- Paste the URL of the hook dApp
How hook dApps work
Each hook dApp is a lightweight web application that:- Receives context from CoW Swap — connected wallet, chain ID, order parameters
- Presents a UI for the user to configure the hook (e.g., select a vault, choose an amount)
- Generates hook data (target, callData, gasLimit) and sends it back to CoW Swap via the
addHookcallback
- Includes the hook gas cost in the fee estimation shown to the user
- Attaches the hook to the order’s appData
- Ensures solvers execute the hook as part of the settlement
Publishing a hook dApp
To make your hook dApp available in the Hook Store:1. Build the dApp
Create a web application using the@cowprotocol/hook-dapp-lib library. See the Hook dApp development guide for the full API reference and a working example.
2. Add a manifest
Your dApp must serve amanifest.json file that describes its capabilities:
id field is a 64-bit hex identifier generated by keccak256(YOUR_APP_NAME). It links hooks in orders back to the dApp that created them. See the manifest specification for all fields.
3. Submit a pull request
Add your dApp to the CoW Swap repository by opening a pull request. The CoW Swap team will review and merge it to make it available in the Hook Store.In the future, the Hook Store will use a decentralized registry, allowing anyone to publish hook dApps by URL without a pull request.
Hook dApp ideas
Hooks can integrate with any DeFi protocol. Some examples of what hook dApps could do:- Swap and bridge — automatically bridge received tokens to an L2 after a swap
- Swap and stake — stake received tokens in a liquid staking protocol
- Swap and deposit — deposit into a yield vault or lending protocol
- Claim and swap — claim rewards or airdrops, then immediately swap them
- Approve and swap — batch a token approval with the trade itself