← Back to home

Axiom LP Mgmt

Solidity

Axiom-powered Uniswap pool/hook that can enable market-conditioned LP updates

Screenshots

Axiom LP Mgmt screenshot 1
Axiom LP Mgmt screenshot 2
Axiom LP Mgmt screenshot 3
Axiom LP Mgmt screenshot 4

Problem Statement

We implemented a Uniswap v4 hook and position manager to enable trustless LP modification. With AxiomV2's ability to process historical state data, there are guarantees that LP rebalancing only occurs according to user-defined market conditions.Using Axiom v2's REPL, we ergonomically accessed spot price (uniswap tick) inside a complex mapping. The spot price (market condition) is provided to the position manager, which executes the necessary checks before modifying an LP.The example Axiom-powered LP management was tested on Goerli, using a modified Uniswap v4

Solution

Created a Uniswap v4 hook and router contract. We developed a set of foundry scripts to seed the pool with liquidity and simulate trades.We then created a circuit using Axiom v2 to pull historic price from the pool. We send the price data to the solidity contracts which then rebalance the user from narrow to wide LP position

Hackathon

ETHGlobal New York

2024

Prizes

  • 🏆

    🪝 Uniswap Foundation — Best use of Hooks

Contributors