Project Title: Morpho CoW Hooks
Organization name: bleu builders
Organization website and/or social media links:
About us + prior experience: bleu is focused on making complex blockchain interactions more accessible. We partner with companies and DAOs to build better user experiences, with most of our work centered around blue-chip protocols like CoW Protocol, Balancer, and Optimism.
- CoW Hooks dApps: our latest collaboration with CoW led to developing their hook store feature (currently in beta), which extends CoW Swap’s functionality through custom hooks.
- CoW Stop Loss: Stop loss orders management dApp powered by Chainlink oracles, providing automated protection against price drops.
- CoW AMM Deployer: first-ever interface to create and configure your own CoW AMM.
Leading Contributors:
- Pedro (GitHub) - software engineer, 2y building web3 apps, including +5 CoW projects
- Fábio (GitHub) - co-founder, 4y experience in web3 analytics and development
Requested budget: 25k MORPHO
Scope of Work: Develop a series of Morpho hooks for the CoW Hook Store to streamline Morpho position management during swaps. The Hook Store enables users to add pre- and post-swap actions to their trades, and we’ll leverage this functionality to create seamless Morpho integrations. Key deliverables include:
- Full integration of Morpho operations into CoW Swap
- Implementation using
cow-shed
andweiroll
tools for complex operations
We’re already working with the CoW Swap frontend team to ensure smooth implementation and maintain high UX standards. This builds on our previous hook store development experience and extends CoW Swap’s utility for Morpho users.
Benefit for the Morpho Ecosystem: CoW hooks will simplify complex Morpho operations while expanding the protocol’s features. By creating Morpho hooks on CoW Swap, we aim to enable seamless, single-transaction operations that currently require multiple steps. Some use-cases that this integration can enable:
- Enter/Leave in any market without needing to have the collateral token: the current Morpho UX already has a bundler flow to enter/leave the markets with just 1 transaction. CoW hooks allow to abstract away the in/out tokens by bundling a swap together.
- Example: The user wants to borrow
USDC
usingWETH
as collateral but it just haveWBTC
on their wallet. They can usesupply
andborrow
post hooks to be executed after aWBTC
toWETH
CoW order.
- Example: The user wants to borrow
- Move your liquidity from any two markets: Similar to the last one, adding pre-hooks to leave one market, swap, and enter another one.
- Example: The user had supplied
USDC
to borrowWETH
and it wants to move to a market where it suppliesDAI
and borrowWBTC
. It is possible to use therepay
andwithdraw
pre hooks combined with asupply
andborrow
bundled with a swap ofUSDC
toDAI
.
- Example: The user had supplied
All hooks are fully simulated through Tenderly before execution, with real-time health index monitoring across multiple hooks to prevent liquidations. This creates a safer, more intuitive experience for users.
Metrics:
- All hooks reviewed by CoW team and integrated with the official CoW Swap Hook store
- Achieve $1M of volume including all Morpho hooks executions.
Timeline: About 3 months for designing & implementing the hooks, following this roadmap:
- UI/UX Designs (1 week):
- Transform existing wireframes into comprehensive Figma designs with:
- Intuitive user flows with status indicators
- Complete hook metadata integration (description, logo, info copy)
- Streamlined position management flow with hook proxy approval
- Transform existing wireframes into comprehensive Figma designs with:
- Hook Library Upgrade (1 week):
- Enhance the
hook-dapp-lib
package that handles CoW Swap and hook dApp communication - Fix the current limitation where the package doesn’t provide
state_diff
changes from previous transactions and hooks - Implement Tenderly hook simulation data to track state changes accurately
- Enable precise LTV calculations for current and post-hook states
- Enhance the
- Hook dApps Development (8 weeks):
- Build and deploy 4 specialized hook dApps (~2 weeks per hook)
- Integrate Morpho API for market data fetching and relevance sorting
- Implement smart LTV calculations that account for bundled hook actions
- Create flexible input options (“use all swap output” / “use all wallet balance”) for repay and deposit hooks using
weiroll
- Add hook proxy (
cow-shed
) approval checks for position management