Questions tagged [liquidity-pool]
The liquidity-pool tag has no summary.
7 questions
0 votes
0 answers
10 views
How to call function "swap" from liquidity pool of a Smart-Contract?
I fail trying to call the function => "swap" from the smart contract of a liquidity pair .. I try was this parametter : But every time i got this error : Fail with error 'J' Need help ...
0 votes
1 answer
44 views
Issue computing liquidity on Uniswap V3 pools
I am trying to compute liquidity for Uniswap v3 pools. I have this pool LAMA/WETH on Base which results to have 2.5 trillion liquidity, which seems incorrect but the same value is reported on ...
0 votes
0 answers
46 views
What is the liquidity value in swap events on uniswapV3?
I am currently in the process of backtesting liquidity provision in a uniswapV3 pool, and I was able to get all events in said pool for the past year from an archive node. I am trying to calculate ...
1 vote
1 answer
808 views
How to get poolId in Uniswap v4
How can I get the poolId in Uniswap v4 since there are no external/public functions available in the StateView/PositionManager contract?
1 vote
1 answer
486 views
How to fetch current Uniswap V4 pool price (`sqrtPriceX96`) from Rust without Solidity?
I'm developing a Rust application that interacts with Uniswap V4 pools. In Uniswap V3, getting the current pool price (sqrtPriceX96) was straightforward via the slot0() function exposed by the pool ...
0 votes
1 answer
61 views
Set up initial sqrtPriceX96 when creating a pool in solidity
Like the title of the post says it, how do I set up the initial sqrtPriceX96 when creating an Uniswap v3 pool, in solidity? Let's call token0 ABC. ABC has 18 decimals. token1 is USDC (so 6 decimals). ...
0 votes
1 answer
2k views
How can I fetch pool data in Uniswap v4?
In Uniswap v3 you could get the pool data by calling the read-only functions (public variables) on a pool (fee, tickSpacing, token0, token1). Since Uniswap v4 implements a singleton design where all ...