LearnWeb3DAO / uniswap-v4-take-profits-hook

Hook for Uniswap v4 that allows users to place automatically executing on-chain "take-profit" orders

Home Page:https://learnweb3.io/lessons/uniswap-v4-hooks-create-a-fully-on-chain-take-profit-orders-hook-on-uniswap-v4/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uniswap v4 Take Profits Hook

This code is part of a lesson at LearnWeb3 teaching how to build hooks for Uniswap v4. In this example, we build a hook that allows users to place 'take-profit' positions. For example, in an ETH/DAI pool if currently 1 ETH = 1500 DAI, you could place a take-profit order as "sell all my ETH when 1 ETH = 2000 DAI" which will be executed automatically.

This code is inspired from https://github.com/saucepoint/v4-stoploss stop-loss orders, with slight differences.

About

Hook for Uniswap v4 that allows users to place automatically executing on-chain "take-profit" orders

https://learnweb3.io/lessons/uniswap-v4-hooks-create-a-fully-on-chain-take-profit-orders-hook-on-uniswap-v4/


Languages

Language:Solidity 100.0%