Custom Curves

CustomHooks is a customizable hook-based solution for Uniswap v4, enabling trading on custom invariant curves while leveraging Uniswap's efficient pool and routing infrastructure

ETHGlobal BangkokShipped November 15, 2024Prize winner#defi#uniswap
Repo
Custom Curves banner

About

This project introduces custom invariant curve hooks to enhance Uniswap v4's liquidity pool functionality. By redefining the fundamental curve that governs the pool's behavior, the aim is to provide an advanced, flexible mechanism for token swaps.

Instead of relying solely on Uniswap’s traditional constant-product curve (x⋅y=k), this project offers two custom invariant curves:

Weighted Product Curve Hook (StableHook):

A Balancer-inspired curve that allows for flexible token weights, providing better control over token importance in the pool. Lambert Curve Hook (Lammbert):

A novel curve leveraging the Lambert W function is ideal for scenarios requiring dynamic liquidity concentration or stable pricing mechanisms. These custom curves enable custom trading dynamics while retaining Uniswap's core infrastructure, such as its routing logic and pool management.

How it's made

This project is built over Uniswap V4, leveraging its hooks architecture to implement custom invariant curves. The project uses solidity and leverages the Hooks template from Uniswap V4. For the Mathematical equations, the project has used Vectorized's Solady library (i.e. FixedPointMathLib). The entire project is built with Foundry and utilizes its various dev tools for various development and testing.

Prizes

  • Uniswap Foundation · Hooks, Hooks, and Hooks · 3rd place

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Unipump

Unipump; Pump Fun for EVM chains on Uniswap v4 : custom bonding curve before pool initialisation, dynamic swap fees to discourage selling, & cross-chain token liquidity across EVM chains using Unichain.

StarFish 🌟

The ETF Hook for Uniswap V4 enables automated ETF trading and rebalancing using decentralized oracles , with randomization for unbiased pricing. It simplifies liquidity management and brings efficient ETF trading to DeFi.