5 votes
Accepted

Are Uniswap tokens LP tokens?

LP Token is just one name for the tokens you get, when you provide liquidity to a pool/pair, they may have other names, depending on where you read about them. Uniswap tokens are something different, ...
  • 360
4 votes
Accepted

Incorrect Uniswap Liquidity Calculations. What could be wrong?

There is no bug. This address holds exactly 0 liquidity token for the wOxen-USDT pair. Accordingly, Uniswap info shows 0$ as liquidity provided. How come, you may ask, since $30K+ were provided as ...
  • 3,295
3 votes
Accepted

In DEFI does each token-pair produce its own LP token?

Uniswap is an automated liquidity protocol powered by a constant product formula and implemented in a system of non-upgradeable smart contracts on the Ethereum blockchain. [...] Each Uniswap smart ...
3 votes
Accepted

An unlocked wallet is holding 100% of <PAIR> LP

It means the owner can rug pull(remove liquidity, steal everyone's investment, and make the token valueless) any time. That is why that prompt exists. Locks are commonly done on DxSale and Poocoin ...
  • 641
2 votes

Fees distributed to token holders at point of sale

An idea is to have an external balance and an internal one, at the beginning the relation will be 1:1. Burned fees will change the relationship increasing holders balance slightly. Lets's suppose the ...
  • 30.2k
2 votes
Accepted

How much UNI can I earn if I become a liquidity provider?

You can only addequal USD value pair to a pool, let's see 1000 USDC/2.6 ETh (Eth price 384), the daily return is about 1.8% at the moment, based on the pool size of 25m for this pool, with daily ...
2 votes
Accepted

How Do Liquidity Pool Economics Work?

As explained in the r/1inch post here, in my example from Step 5 above, as the staked liquidity approaches $1.5B, the APY would decrease due to the increased supply, assuming the trade volume remains ...
2 votes
Accepted

Uniswap V3: Create LP (ETH-ERC20 pair) using solidity

I'm assuming you refer to the official Uniswap V3 example here : https://docs.uniswap.org/sdk/guides/liquidity/adding and that your pool is initialized Short answer: Uniswap handles the (un)wrapping. ...
2 votes
Accepted

How to determine if some LP tokens related to my token or not?

When you provide liquidity to a pool you will receive LP tokens for that specific pool (with a contract address unique to that pair). You can check the contract address for your tokens LP token and ...
  • 751
2 votes

Solidity - Is this the correct way to add liquidity to uniswap with exact amount at current price?

Well i'm not super familiar with UniswapV2 contracts, so this is just my 2 cents but it seems that router02 calculates that price and checks if it matches what you entered (uint amountBOptimal = ...
  • 1,676
2 votes
Accepted

uniswap constant formula seems confusing

Yes, it's an issue of liquidity. You can say that 5 ETH is a good starting point, but it's relative: in your example you're swapping 2 ETH - which is almost half the pool. So there is significant ...
  • 1,081
2 votes

"Price Impact Too High" swapping tokens back to ETH on basic contract with liquidity (Uniswap)

I contacted Uniswap support on Discord, and they said it's a known issue on testnets due to them using "fake dollar prices", and it can be worked around by enabling Expert Mode, which I did, ...
  • 158
2 votes

Failing to add liquidity to pancakeswap on bsc testnet

Yes, I believe this problem is due to the deadline parameter of the addLiquidity method. In your tx you have submitted a deadline of 7741799 which corresponds (https://www.epochconverter.com/) to ...
  • 145
2 votes

Why MINIMUM_LIQUIDITY is used in DEX like Uniswap?

The answer is given in the Uniswap v2 whitepaper: Uniswap v2 initially mints shares equal to the geometric mean of the amounts deposited [..] it is possible for the value of a liquidity pool share to ...
  • 484
1 vote

Liquidity locking and ETH loose

Locking up your liquidity tokens doesn't do anything except preventing you from exchanging your LP tokens back to the tokens from the pool. Whiteboard crypto on Youtube has a nice video about how ...
  • 21
1 vote
Accepted

How to match DeFi transaction to vaults

For protocols that do not return a share token and keep the deposit logic inside their smart contract, you need to provide a custom implementation. This means integrating projects one by one. You may ...
  • 692
1 vote
Accepted

How are Uniswap fees distributed equally factoring in both proportion and duration pooled?

So after a bit of research I found the answer. Based on Section 3.4 of the Uniswap V2 Whitepaper the initial liquidity pool tokens minted for the initial liquidity provider(LP) is: s_minted=sqrt(...
  • 350
1 vote

Get all Swap Transactions from Pool Contract

ok, so I have found a viable way of doing this. there might be a better solution and yes, my code could more efficient. but it works for me. any feedback is very much appreciated of course. This ...
  • 31
1 vote

What are the theories and methods of calculating the risk free value of lp tokens

I think I got it: In he case of constant product AMMs like Uniswap v2, we've got: P(X)= k/x^2. In the case of stablecoins, P(X) = P(Y) = 1 permanently (under the assumption that arbitrages are ...
  • 11
1 vote

Pancakeswap - Price Impact too high

There isnt enough BNB in the liquidity pool (the LP has 0.01 BNB in it, so obviously if someone tries to buy 1BNB worth of the token, the price impact is going to be huge). The tx can still pass ...
  • 1,676
1 vote

Way to tackle arbitrage bots

Ok, here's what's happening: I'm almost sure there exists another exchange with a lower price for the pair, otherwise the arbitrage opportunity wouldn't exist. The pair creation tx was enough to ...
1 vote

Can a contract add liquidity to an Uniswap pair as owner?

Yes a contract can call Uniswap to add liquidity into any pair. The contract simply needs to provide the required assets for the liquidity. Furthemore, the contract will then own the LP tokens, and ...
1 vote

PancakeSwap charges a fee to mint LP according to their code?

I was able to get an answer on Telegram from PancakeSwap.
  • 129
1 vote

Why is the ratio of liquidity pools adjusting itself? Is it possible to create a pool with a stable ratio?

It's simply mathematically impossible. Let me show you why. Someone creates an empty pool LP1 adds 100 tokenA and 200 tokenB LP2 adds 400 tokenA and 800 tokenB Some trades occur and the pool now ...
1 vote
Accepted

Liquidators in defi application

All the liquidation mechanisms that I have seen require someone to send a transaction to initiate the liquidation. I don't think it can be done "automatically", meaning without anyone ...
  • 3,295
1 vote

Trying to make sense of Uniswap v3 fees (feeGrowthInside0LastX128, feeGrowthGlobal0X128)

For those looking for a worked out example. Run this query on thegraph.com: { positions(where: {id:"YOURPOOLIDHERE"}) { liquidity token0 {symbol decimals} pool {...
1 vote

Trying to make sense of Uniswap v3 fees (feeGrowthInside0LastX128, feeGrowthGlobal0X128)

There is a bunch of functions on the smart contract that explains how to use the liquidity field: In Uniswap V3 core repository, in Position.sol line 60: // calculate accumulated fees uint128 ...
  • 111
1 vote
Accepted

calculating the daily rewards for liquidity provider in Uniswap

Is this regarding V3 or V2? In either, LP rewards do not accrue directly to a LP token holder. In V2 they are reinvested into the pool, and in V3 they are collected separately and must be redeemed by ...
1 vote

How do I see from the Etherscan or Bscscan my current holdings of the pair in the liquidity pool?

I think you can view them by adding your LP (liquidity provider) address in metamask.
  • 842
1 vote

Are Uniswap tokens LP tokens?

To clarify a little bit -- Uniswap (the app) has an associated governance token, UNI. This token is used to vote on proposals, among other things. LP (liquidity provider) tokens are different than UNI....

Only top scored, non community-wiki answers of a minimum length are eligible