RFP 15 - Integrating Uniswap V4 Hooks into MANTIS

Researcher: Unassigned

Summary

Uniswap’s fourth version (v4) introduces a number of new innovations, including the introduction of hooks. These hooks allow almost infinitely customizable construction atop of Uniswap’s pools. Composable intends to incorporate these hooks into its MANTIS intent settlement framework, in order to tap into the liquidity, security, and functionality of Uniswap pools.

Specifically, the present initiative will contribute the following:

  • An understanding of how to best leverage Uniswap v4 hooks from the MANTIS framework
  • Integration of Uniswap v4 hooks into MANTIS based on this understanding

Background & Problem Statement

Background

Core background concepts/definitions are as follows:

Uniswap V4 & Hooks:

Uniswap is a leading decentralized exchange (DEX). Its most recent version, v4, introduces a number of updates and improvements to its DEX and automated market making features. These changes are as follows:

  • Customizability with hooks (explained in more detail below)
  • A Singleton contract for more efficient token pools
  • A flash accounting system to chain multiple actions into one transaction
  • Unlimited fee tiers on liquidity pools
  • Native ETH support
  • Community-driven development and innovation

The upgrade that is relevant to the current RFP is customizability with hooks. As summarized on the Uniswap v4 documentation:

Uniswap V4 introduces a new feature called “hooks”, which are essentially smart contracts that can be attached to liquidity pools. These hooks enable a high degree of customization, allowing developers to implement specific functionalities at different points in a pool’s lifecycle, such as before or after swaps and liquidity modifications.

For example, hooks can enable order types (i.e. limit order), specially-tailored oracles, or custom AMM curves. The flexibility of hooks allows for a broad range of innovations while maintaining the core efficiency of the platform.

Effectively, hooks are plugins that offer unlimited choices for connecting to and innovation on top of Uniswap, allowing the creation of customized AMM pools.

Composable’s MANTIS:

Composable’s Multichain Agnostic Normalized Trust-minimized Intent Settlement (MANTIS) is an ecosystem-agnostic intent settlement framework. MANTIS facilitates settlement of cross-chain user intents, optimizing the supply chain to deliver upon our vision of a user-centric, ecosystem-agnostic future for DeFi.

In the Composable ecosystem specifically, cross-domain MEV is potentiated from cross-chain intent settlement. Composable’s MANTIS receives user transaction intents, which are then picked up by solvers who compete to find the best solution to execute these intents. Once the optimal solution is chosen via a scoring mechanism, the winning solver must then execute upon their proposed solution.

Problem Statement

The problem here is that Uniswap v4 hooks are relatively novel, and can be used in almost infinite ways. As a result, there are near limitless possibilities for how Uniswap v4 hooks can be incorporated into MANTIS.

Thus, the question that this research aims to address is as follows:

  • How can Uniswap v4 hooks be integrated into MANTIS in a manner that optimizes MANTIS functionality (e.g. intent settlement that prioritizes user welfare and MEV extraction)?

Plan & Deliverables

Expected outputs/deliverables are as follows:

  • An understanding of how to best leverage Uniswap v4 hooks from the MANTIS framework
  • Integration of Uniswap v4 hooks into MANTIS based on this understanding

The plan for achieving this output is outlined below:

Experiment: Develop a model for using Uniswap v4 hooks to leverage Uniswap pools from within MANTIS

This is largely a coding based initiative. This experiment will involve obtaining a thorough understanding of Uniswap v4 hooks, followed by an exploration of how these hooks could be best customized to facilitate intent settlement along the MANTIS framework.

References

How to Participate

If you’re a researcher who believes that you would be a good fit to contribute to any of the Composable RFPs, please reach out to Composable’s Lead Research Associate, Sydney Sweck, at sydney@composable.finance. In the email, be sure to include:

  • The RFP number(s) you’d like to contribute to
  • Your relevant background experience
  • How you think you could contribute to the research