Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/LearnWeb3DAO/uniswap-v4-take-profits-hook
- Owner: LearnWeb3DAO
- Created: 2023-07-20T18:43:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-30T20:44:35.000Z (11 months ago)
- Last Synced: 2024-08-01T18:24:29.002Z (4 months ago)
- Topics: ethereum, evm, forge, foundry, hooks, solidity, uniswap
- Language: Solidity
- Homepage: https://learnweb3.io/lessons/uniswap-v4-hooks-create-a-fully-on-chain-take-profit-orders-hook-on-uniswap-v4/
- Size: 16.6 KB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-uniswap-v4-hooks - On-Chain Take Profit Order - chain "take-profit" orders. This means that the position will be automatically closed if the price reaches a certain level. (📜 Examples / From the Community)
- awesome-uniswap-hooks - On-Chain Take Profit Order - chain "take-profit" orders. This means that the position will be automatically closed if the price reaches a certain level. (📜 Examples / From Community)
- awesome-uniswap-v4-resources - On-Chain Take Profit Order - chain "take-profit" orders. This means that the position will be automatically closed if the price reaches a certain level. (📑 Table of Contents / From Community)
- awesome-uniswap-v4-resources - On-Chain Take Profit Order - chain "take-profit" orders. This means that the position will be automatically closed if the price reaches a certain level. (📑 Table of Contents / From Community)
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.