Questions tagged [liquidity]
The liquidity tag has no usage guidance.
46 questions
1
vote
1
answer
19
views
Am I fetching/calculating net liquidity wrong? (Uniswap V3)
I am querying data from the PEPE/ETH pool (pool id: 0x11950d141EcB863F01007AdD7D1A342041227b58). I posted all my code below to query and find the cumulative/active liquidity at each tick in the input ...
0
votes
0
answers
18
views
How to correctly compose the KEY argument (bytes32) for positions() method in Sushi V3 Pool?
I'm trying to get pool position parameters, like:
liquidity
feeGrowthInside0LastX128
feeGrowthInside1LastX128
tokensOwed0
tokensOwed1
by polling positions() method in pool smart contract (I'm using ...
0
votes
0
answers
25
views
Too BIG feeGrowthInside0LastX128 and feeGrowthInside1LastX128 values in Sushi V3 pool positions, can't calculate fees correctly
I'm developing a system which continuously monitors Sushi pool positions and calculates their effectiveness (or, simply said, fees growth per unit of time).
Since Sushi is a fork of Uniswap, I often ...
0
votes
0
answers
25
views
GUARDA ETH value - zero [duplicate]
I would like to clarify what happened in my GUARDA wallet. Is this some sort of scam? Or how can I get the right value for my 4.59 ETH?
Thank you for your advice.
1
vote
1
answer
75
views
Discrepancy between Uniswap V3 liquidity ratio and USD value ratio on uniswap v3
I'm calculating liquidity for a Uniswap V3 pool and have encountered a discrepancy. I'm hoping someone can help me understand what's going on or if I'm making a mistake.
The situation:
I calculated ...
0
votes
1
answer
31
views
What determines the value of an asset in a Uniswap v3 pool if ticks in an active tick interval have zero liquidity?
I'm trying to understand by what mechanism the price is in a tick interval, the border ticks of which, as etherscan shows, have zero liquidity?
Data Gathering
The question arose after analyzing the ...
0
votes
0
answers
43
views
Uniswap V2 Quoting using reserves - getamountout methods
I have been having abit of issue with quoting on uniswap v2 based exchanges. I am extracting the reserves and using the formula. - univ2_formula = lambda amount_in, in_lq, out_lq: (out_lqamount_in0....
1
vote
0
answers
43
views
calculating liquidityLockedToken amount for uniswap V3 pool
I tried to analysis pool information and I want to make a result like below.
pools-uniswap
I wrote the code below by referring to the uniswap sdk documentation.
import JSBI from "jsbi";
...
0
votes
0
answers
10
views
Create liquidity calculation issue
In a mint position function
The calculated input is more higher while it popup in metamask.
For example , Same like uniswap calcluation I give the pair token0 = 100 , token1 = 112.068 same like ...
0
votes
0
answers
96
views
Unable to Withdraw ETH from Smart Contract Bot Due to Insufficient Balance - Any Solutions? [duplicate]
I recently deployed a smart contract bot designed to perform arbitrage on Uniswap. The bot was supposed to start operating once it received a minimum of 1 ETH. Unfortunately, I mistakenly funded the ...
0
votes
1
answer
63
views
How can I unlock a locked amount in a liquidity mining pool ? It is now showing in my wallet after I revoked the token
I’ve joined a mining pool in DApp browser inside Trustwallet app then I tried to withdraw the money to my other wallet but I couldn’t because of the follwowing error
(Fail with error 'BEP20: transfer ...
2
votes
1
answer
434
views
Uniswap V3 - calculate optimal amounts to provide liquidity
I have a Uniswap V3 pool of "token A" and "token B".
Holding 1,000 of token A, and 1,000 of token B on a wallet.
Current tick in the pool is 50,000, marking the price of ~148 ...
0
votes
0
answers
137
views
Can't remove liquidity from Uniswap V2 LP. Worked before i renounce ownership
after having a test about doing a token for our stream with a friends and despite the fact the liquidity was locked and i renounced the smartcontract there was no appeal for the project. I would like ...
0
votes
0
answers
30
views
Cannot remove liquidity from Uniswap on Base Chain
I would like to seek assistance for this please. I think the LP for my token broke after renouncing the contract. No one was able to trade after the renounce. will give 0.05 eth to anyone who can help ...
0
votes
0
answers
14
views
What can be the name of tokens which traps investors in a high APY staking program? (by offering them a high APY)
I called it myself a STAKING TRAP, because i didn't find any term for this type of scam. now maybe you ask yourself what i mean exactly by a STAKING TRAP? it is RUG PULL method by offering victims a ...
0
votes
0
answers
71
views
Uniswap v3 Mainnet vs Sepolia EvmError: Revert
I'm struggling to solve EvmError: Revert, while calling createAndInitializePoolIfNecessary function on Uniswap v3 NonfungiblePositionManager contract. I have wrote function that contains this code:
...
0
votes
0
answers
11
views
Need Assistance Resolving ds-math-underflow Error in Liquidity Pool Transaction
I'm currently facing an issue while trying to lock my share of the liquidity pool on the blockchain. Despite successful tests in a Hardhat environment, the transaction is reverted when executed on the ...
0
votes
0
answers
25
views
Issues Adding Liquidity on Mainnet with a Custom ERC20 Token (It Works Using Hardhat!)
I've developed an ERC20 token using Solidity and have successfully tested its liquidity functions on Hardhat. The process completes successfully in the Hardhat environment, but when I attempt the same ...
0
votes
0
answers
49
views
How to buy newly launch tokens from bsccan, that have insufficient liquidity?
When the contract address and supply of a token is created and got listed on bsccan before any other exchange the creator of the token tends to provide no liquidity for the token, which makes in ...
0
votes
0
answers
20
views
Downscaling liquidity tax according to ETH reserves for fair distribution without presale
So I wanted to try and solve the problems that arise when releasing a token with very low liquidity. Presaling should absolutely be avoided since holders always dump at the start.
Assume 50 to 100% of ...
1
vote
0
answers
110
views
Can't add liquidity to my token
I created a token and now I need to add liquidity to it. Here is a code of my contract:
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() ...
0
votes
1
answer
158
views
Difference between Liquidity in Uniswap V2 und V3 when deploying a contract
When I deploy a contract and add liquidity to my V2 pool on Uniswap, I usually add amount of TokenA and an amount of ETH which then determines the price (amount of tokens / amount of ETH). When people ...
0
votes
1
answer
173
views
How to compare liquidity between different DEX pools?
I'm interested in comparing how liquid DEX pools are, for example in order to find the pool that would have the least price impact when swapping from ETH to stablecoins.
Looking at the token balances ...
0
votes
0
answers
68
views
addLiquidityETH reverts even after token approval
I am trying to deploy liquidity on a testnet using this code. However, it reverts with no explanation given other than that error. According to the UniswapV2 docs, I am using the correct router (...
1
vote
1
answer
34
views
LP contract doesn't approve
I created this contract to simulate a liquidity pool and I'm testing it with the Remix IDE. I can say it works fine, except for the function to swap tokens for ether, which is bothering me. The user ...
0
votes
1
answer
100
views
Having trouble adding liquidity to Pancakeswap
I've added tokens to pancakeswap before, and it was easy, but now it doesnt work anymore... perhaps I am doing something really dumb, but I can't seem to figure it out and could use a little help.
I ...
0
votes
0
answers
17
views
How to handle liquidity pool transfers and fees?
Suppose I have a token on the Ethereum network. From what I understand, with each buy and sell a part of the transaction is maintained by the contract that adds it to the LP (liquidity pool). However, ...
1
vote
1
answer
1k
views
What would happen if you allocated 100% of a token's supply to a DEX liquidity pool?
So we all know what happens when there is no liquidity at all; it's impossible to buy or sell a token with no liquidity. But what would happen in the reverse scenario; if 100% of a token's supply was ...
0
votes
0
answers
414
views
How to calculate how a certain transaction impacts a token price?
How to Calculate Token Price Impact of Large Trades in Decentralized Finance (DeFi) Environments
I am developing a tool to analyze the impact of large trades on token prices within a Decentralized ...
1
vote
0
answers
167
views
Trying to create a liquidity pool on local network using uniswap's contract's
I am trying to create a liquidity pool on my local network. Here is what I have done so far:
I deploy a WETH token
I deploy the uniswap factory
I deploy the uniswap router using the factory address ...
0
votes
0
answers
55
views
Unable to Add Liquidity using uni swap V2 front end clone
I’m having error from the Uniswapv2 clone that I cloned following the below website instructions:
https://www.covalenthq.com/docs/unified-api/guides/how-to-clone-uniswapv2-frontend/
The problem I’m ...
0
votes
1
answer
65
views
I have a few questions about my token
Recently I have created a meme token based on the Gotta Lock In meme.
When I deployed it to PancakeSwap, I deposited 19.000.000 $LOCKIN alongside with ~15$ of BNB into the liquidity pool.
However once ...
0
votes
0
answers
99
views
Put liquidity on liquidity pool using uniswap-python
I have a trouble at interacting with the uniswap liquidity pool using uniswap-python.this is my code:
from web3 import Web3
from uniswap import Uniswap
from web3.middleware import geth_poa_middleware
...
0
votes
1
answer
114
views
Liquidity transfer from A user to B user
How can I make option for user transfering his liquidity pool value (withdraw it) to user B? Maybe it’s uniswap router, transfering LP tokens from wallet or what?
0
votes
2
answers
679
views
What is the difference between Uniswap V3 and Uniswap V2
can you help me to understand the main difference between Uniswap V3 and Uniswap V2 in terms of technology and liquidity.
Also, is it legal to copy the Uniswap contract. I see lots of project just ...
0
votes
1
answer
769
views
How to find amount of pooled tokens in Uniswap v3 pool
Given a Uniswap v3 pool: how can I find (using the Uniswap v3 pool contract) the amount of WETH and other coins that are in the pool?
I know in Uniswap v2, you can just call the getReserves function.
...
1
vote
2
answers
409
views
What happens when we directly send tokens to Uniswap pair?
This is about Uni V2 pools.
So usually we call the function addLiquidity to add liquidity, but the function decides how many tokens should be added depending on the reserves.
What if we directly send ...
1
vote
1
answer
96
views
removeLiquidity function in a smart contract, getting execution reverted due to ds-math-sub-underflow
i'm trying to create a smart contract which removes user's lp share from the pool doing these steps:
calculates the current user's balance of LP tokens for a particular pair
removes their liquidity ...
0
votes
1
answer
294
views
I deployed a contract USING Remix IDE and Metamask and i cant ADD liquidity
i deployed a contract on BSCHAIN (its EVM machine i hope you dont mind)and i cant ADD LP practically does nothing,verification passed compilation as well i think might be an error in the code i wrote ...
0
votes
1
answer
125
views
UniswapV2 addLiquidityETH revert ds-math-sub-underflow
I tried this code for many contracts, and sending ETH and approving were done well, but on the addliquidityETH section, I get an error: reverted with 'ds-math-sub-underflow'. I can't understand why.
...
0
votes
2
answers
1k
views
supplying liquidity + sniping own coin in same bundle
https://etherscan.io/tx/0x0d21d70e031089ab3e5b8083a84f122d5e995033c666dd7ce7cff982b5ba7c77
it looks like this transaction has Supply liquidity and swap Eth for its token all in one bundle.
can anyone ...
0
votes
1
answer
403
views
What is the usual gas fee by deploying innicial liquidity to my eth token?
Wanted to know what gas fees I need to expect when adding initial liquidity to my eth token.
I removed liquidity for about 11 dollar gas. Now I want to add a new tokenpair and set with it a new price ...
0
votes
1
answer
1k
views
Unable to Add Liquidity in Uniswap
I tried adding liquidity in Uniswap, however when after I approve the spending and press supply, the add supply button just load one time and then stop. Nothing happens after this. It seems that I ...
1
vote
2
answers
46
views
Do banks store the money when we buy stablecoins? Then how is it decentralized?
I need someone to verify if my understanding is correct.
When we buy ETH, we swap it in a pool with Stablecoin.
To trade, it requires a pair of ETH/USD.
What gives a Stablecoin its value?
In the ...
1
vote
1
answer
877
views
How to get correct liquidity amount on UniswapV3 for each token(pair) via web3.js?
I'm trying to create a bot that will send me new LPS notifications on Uniswap V3 and in the future more dexes. I want to contain in the message specific data like amount of token and ETH in the pool, ...
2
votes
0
answers
560
views
Uniswap V3 Pool initialization
As I was doing research on Uniswap V3 pool esp. about adding liquidity to such a pool, I found the initialization takes some non-trivial sqrtPriceX96 that is coming from nowhere. When a pool is ...