High-level model for the returns to providing liquidity in Uniswap v2 liquidity pools. There are two assets X and Y in the pool with reserves x and y of each, with pool constant k = x * y and price p = x / y.
-
-
You can use thegraph for this (it’s GraphQL API for fetching historical on chain data) Other than that you can use a web3 library (brownie/web3py or ethers.js for example) to fetch events from a Uniswap pool contract
-
@bantg has examples of the latter on his GitHub: https://github.com/banteg/woofy-snapshot/blob/master/scripts/snapshot.py …
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.