Comments (6)
Related Uniswap v3 in-house project
from web3-ethereum-defi.
Search on Github and PyPI about Python and Uniswap v3 reveals that there isn't any one library that could do this at the moment. In short the code to get data out of Uniswap v3 is very fragmented for the time being.
Some notable ones are:
- uniswap-python: although the integration involves mostly around making trades and v3 support is still in early development, some part of the code could be useful in the future: uniswap-python/uniswap-python#95. The code also has
pytest
tests (run on mainnet fork), MIT license - Active strategy framework from GammaStrategies / VisorFinance has some functions to get pool data at https://github.com/GammaStrategies/active-strategy-framework/blob/main/GetPoolData.py. It's interesting to see several different solutions there: Google Bigquery blockchain-etl, thegraph and bitquery. No license specified
- Oracle from Stakewise: https://github.com/stakewise/oracle/blob/master/oracle/oracle/distributor/uniswap_v3.py. GPLv3 license
- Misc utils from ranges.fi: https://github.com/Ranges-fi/Uni_v3_utils. Gamma also referenced this from their code above. GPLv3 license
GraphQL based solution can use existing subgraphs like:
- Uniswap: https://thegraph.com/hosted-service/subgraph/uniswap/uniswap-v3
- Visor: https://thegraph.com/hosted-service/subgraph/visorfinance/visor
- Stakewise: https://api.thegraph.com/subgraphs/name/stakewise/uniswap-v3-mainnet
There are several onchain oracle solutions too, might not be very useful for above purpose:
- https://github.com/sbvegan/uniswap-v3-pool-oracle
- https://github.com/sohkai/uniswap-v3-spot-twap-oracle
from web3-ethereum-defi.
We need to decide if we take JSON-RPC event-based approach or GraphQL based approach.
- GraphQL might be more generic and we can reuse existing graphs
- GraphQL adds very complex dependency if we want (and we want) to be able to run locally
Let's tackle the Uni v3 deployment first.
- We are currently only hosting Sushiswap contracts so we need to recreate the workflow to build in Uni v3 contracts compield
- The same approach that we use for Sushiswap contracts likely works for Uniswap contracts as well - we pull them in as Git submodules, then use their native tooltchain to compile contracts and then copy over the compiled binary artifacts to our
abi
folder
from web3-ethereum-defi.
Some notebooks dealing with Uniswap v3 backtesting
from web3-ethereum-defi.
Also saw this
https://ethereum.stackexchange.com/a/123333/620
from web3-ethereum-defi.
Also saw this
I added a test for that method this morning: https://github.com/tradingstrategy-ai/eth-hentai/pull/6/files#diff-59cf62830f8e4e3131187561bfa500d2fdf0a14a48a9c33d91fbc1867a44ad80R111-R115
There are some good insights in the answer though
from web3-ethereum-defi.
Related Issues (20)
- Low-level transactions to open and close Aave positions
- Low-level transactions to open and close short - involves selling the borrowed tokens on an exchange like Uniswap v2 and v3
- Error when loading last N blocks using JSONRPCReorganisationMonitor HOT 2
- Most things do not work? HOT 1
- Ankr specific timestamp reader HOT 1
- Better tracking for Uniswap v3 price estimation
- ValueError: {'code': -32000, 'message': 'the method eth_sendTransaction does not exist/is not available'} HOT 1
- More selective number → string conversion in `fetch_aave_reserves_shapshot` HOT 1
- Something wierd with the log HOT 1
- how to use analyse_trade_by_hash()? HOT 1
- Closed
- Aave deposit function HOT 2
- Handle chain reorg in event reader HOT 4
- Support Uniswap v3 swap
- Support Uniswap V3 increaseLiquidity() and decreaseLiquidity() HOT 1
- Enzyme walkthrough test suite
- fix eth_defi uniswap_v2 tests
- Uniswap V3 swap doesn't show up in API documentation HOT 1
- Websocket support HOT 1
- Aave position management code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web3-ethereum-defi.