Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/LearnWeb3DAO/uniswap-v4-take-profits-hook

Hook for Uniswap v4 that allows users to place automatically executing on-chain "take-profit" orders
https://github.com/LearnWeb3DAO/uniswap-v4-take-profits-hook

ethereum evm forge foundry hooks solidity uniswap

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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.