Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

New answers tagged

0 votes

How to make my own wrapped token for native token like WETH, WMATIC?

A wrapper is a simple thing; It's a contract that receives a currency and emits an amount of wrapping tokens according the ratio. Since you want to use the native token it seems pretty simple; You ...
Torof's user avatar
  • 746
2 votes

Where to get various ERC20 token for Goerli and sepolia testnets

To the best of my knowledge, obtaining popular ERC20s on public testnet (in a similar way to ETH faucets) is fairly hard. As you already mentioned, one way would be to first obtain test ether and ...
Marco Besier's user avatar
1 vote
Accepted

Liquidity property of an uniswap V3 pool is higher than the actual reserves - why?

This is because Uniswap v3 introduces concentrated liquidity. It allows the capital to be more efficient. For details, see this question. In your example, we can compute the concentration factor by ...
kfx's user avatar
  • 1,631
0 votes

Can someone please help me understand address(this) in Uniswap liquidity

Every smart contract that has ever been and will be deployed, will itself have an address on the blockchain, just like your wallet address does. For smart contracts, this address will be a ...
Ashraile's user avatar
  • 125
0 votes

Computing the Uniswap V3 pair price from Q64.96 number

From https://blog.uniswap.org/uniswap-v3-math-primer // Get the two token prices of the pool // PoolInfo is a dictionary object containing the 4 variables needed // {"SqrtX96" : slot0....
blockson's user avatar
1 vote

What happens when we directly send tokens to Uniswap pair?

Transferring tokens directly won't effect the price until you call either the sync or mint functions. That will update the reserves which will update the price. That's ultimately how the token swaps ...
CathalMF's user avatar
  • 283
-1 votes

Uniswap V3 transaction throwing STF even after approval

I faced same issue before, In my self exactInputSingle method expects ether, I didn't passed ether to the exactInputSingle method. After sending ether - 0 (pass 0 - if you are not swapping eth for ...
Kannan Palani's user avatar
0 votes

supplying liquidity + sniping own coin in same bundle

It is not a bundle. They have created a smart contract that added liquidity, and swap tokens in the same tx
Hoang Minh Dung's user avatar
0 votes

How do gas fees work in UniSwap / other decentralized exchanges?

I received from Uniswap customer service the following, as I was not able to swap or perform any action due to gas fees, despite the fact that I POSSESSED ETH in my wallet, hope it helps: Thanks for ...
Riccardo Cucca's user avatar
0 votes

reserve0/reserve1 price is different compared to boughtTokensAmount/requiredWeiAmount

I got an answer from the official Uniswap discord channel from one of the members. The price impact given by the formula shows by how much your price will differ from the price of the pool before the ...
dvcr's user avatar
  • 3
0 votes

reserve0/reserve1 price is different compared to boughtTokensAmount/requiredWeiAmount

Slippage causes the price difference. Pre-trade price: toSwapTokensAmount / outputWeiAmount reflects the ideal price before the trade happens. Actual price: newShibReserves / newWeiReserves reflects ...
Awais Ahmad's user avatar
0 votes

transaction reverted when calling swapExactETHForToken on uniswapRouter02

i looked at the transaction failed in baseScan , and notice it was failing cus it was running out of gas https://basescan.org/tx/0xa3d18b809fb3221de12de77d74027597e2de7822965b681ad50bb6d2be8ab6e6 so ...
yahdielo's user avatar
2 votes
Accepted

Difference between Liquidity in Uniswap V2 und V3 when deploying a contract

Yes, you have to add liquidity to a specific range. See the documentation here. The range can be very wide, effectively simulating price changes from almost zero to almost infinity. In this way, V2 ...
kfx's user avatar
  • 1,631
0 votes
Accepted

UniversalRouter execution reverteed BASE chain

The tx you shared above failed because of the deadline. Try passing the value more than block.timestamp. You can get the block.timestamp in ethers using: const block = await ethers.provider.getBlock('...
Zartaj Afser's user avatar
  • 4,076
0 votes

Need Guidance on Handling a Paused Token pair in Uniswap : extract ETH from pair

I keep running into the scam tokens myself some I make money off of and some I don't but yeah sucks u get into one that u can trade then it skyrockets and you can't sell it lol is there a way to enter ...
Sedahseven's user avatar
0 votes

Using Uniswap V3 to swap 2 ERC20 tokens on Amoy Testnet

As of now, there's no official support, but you can deploy uniswap contracts by urself, or you can also use the ones deployed by other devs. for example this one - https://amoy.polygonscan.com/address/...
Zartaj Afser's user avatar
  • 4,076
0 votes
Accepted

Transaction execution reverted on swapExactTokensForETH

It says ERC20InsufficientBalance. Are you meaning to pass that amountIn? 4878975283589739380.500000000000000000 Seems you don't actually have that number of token to move. "value":"...
Maka's user avatar
  • 1,085
1 vote

How to buy with ethers js using Uniswap Universal router on Base? calling execute function

the problem seems to be the path you are encoding each element of the array separately, when you encode data you get a new hexadecimal string that is 64 bytes long. try path = [AbiCoder.encode(['...
yahdielo's user avatar
0 votes

Is there a better way to identify token swaps than through receipt.logs?

You could filter for the Swap events on the the specific pool contracts that you want to monitor, similar to what you are doing now but more targeted: POOL_ADDRESS = '...
Maka's user avatar
  • 1,085
1 vote
Accepted

Insufficient Liquidity after adding liquidity on Sepolia Uniswap V2

I didn't think the front end was connected to the smart contracts on the test net. You can still use the router to test, just swap via the explorer: https://sepolia.etherscan.io/address/...
Maka's user avatar
  • 1,085

Top 50 recent answers are included