Questions tagged [uniswap]

Uniswap is a decentralized finance protocol that is used to exchange cryptocurrencies.

Filter by
Sorted by
Tagged with
0
votes
1answer
53 views

QuickSwap transaction reverts on Polygon

I'm attempting to swap USDC for DAI using Web3JS and QuickSwap on Polygon, but the transaction always reverts and I have no idea why. I have tried different value amounts in the transaction without ...
0
votes
1answer
32 views

Trying to understand Etherscan output for token swap via Uniswap

I am trying to understand a token swap transaction via Uniswap on Etherscan. Looking at the Uniswap V2: Router 2 contract for a transaction, I see the following; My question is regarding the second ...
0
votes
1answer
91 views

Uniswap web3 python

Hi everyone I am getting the error below when I try to write to a Uniswap function using web3 in python. I can call any function, but I cannot get python to write to uniswap except to add liquidity. ...
0
votes
1answer
49 views

Fail with error 'TransferHelper: TRANSFER_FROM_FAILED', all gas used up

I'm trying to buy some CHY with USDT on Uniswap main net, fails with error 'TransferHelper: TRANSFER_FROM_FAILED', This is my failed tx link. This is a successful tx link from someone else. I notice ...
0
votes
1answer
56 views

deadline expired long ago, but the transaction is still pending

I made a transaction on uniswap, with code like: const provider = ethers.getDefaultProvider('mainnet', { infura: INFURA_ID }) const signer = new ethers.Wallet(MY_WALLET_PRIVATE_KEY) const account ...
0
votes
1answer
24 views

Provide liquidity to Uniswap without initial funds on one side?

Is there a way to provide liquidity to Uniswap-like contracts without initial funds on one side of the trade? For example, if I create my own token called Token, I believe this token should be worth ...
0
votes
1answer
94 views

Uniswap Dai getAmountsOut returns 0

I'm trying to get the amount of WETH I can receive for 100 dai: uniswapController.sol contract UniswapController { address internal constant UNISWAP_ROUTER_ADDRESS = ...
0
votes
1answer
59 views

calculating the daily rewards for liquidity provider in Uniswap

I am integrating the uni swap contracts and want to understand how could I calculate the daily rewards for the liquidity provide. I understand that I could get the pairAddress.balanceOf(msg.sender) ...
0
votes
1answer
201 views

How to convert WETH back to ETH (solidity)

I am trying to convert back WETH into ETH (actually BNB on BSC). I am doing the following: function allToBNB() public{ WETH.transfer(address(this), WETH.balanceOf(address(this))); }` ...
0
votes
1answer
149 views

Uniswap Router V2 Deployment AddLiquidity()

I'm getting an error on the addLiquidity() method of Uniswap's Router (UniswapV2Router02.sol) using my own deployed version of the contract on a testnet. I'm using Remix, and am receiving the message: ...
0
votes
1answer
49 views

Is there a way to find out how much I earned in fees from just the UniswapPair V2 contract?

Let's say I add liquidity to the ETH-USDT pool, then I remove liquidity some time later. In between that time, trades have happened and people have added and removed liquidity too. I only have what's ...
0
votes
1answer
23 views

How to calculate this function for both Ethereum networks mainnet and ropsten getBlockTimestamp().add(delay)?

I have a question: How to calculate this function for both Ethereum networks mainnet and ropsten getBlockTimestamp().add(delay)? I installed web3.eth and tried web3.eth.getBlockTimestamp().add(delay) ...
0
votes
1answer
35 views

I tried to buy token with DAI. Its approved but I didnt receive any coin. Help please

It says that: Transaction Action: ApprovedDAIFor Trade OnUniswap V2: Router 2 Here is the transaction on etherscan: 0x181630a7d1ffaa58588eb6c5500d7f8529ca477621559eaf4a7587729e7ad45a Why It didnt swap ...
0
votes
1answer
61 views

Several pending transactions to the same address - what happens?

I am trying to sell all my Shiba tokens from my Coinbase wallet (to Ethereum). I tried converting it through Uniswap, but nothing seemed to happen. So I did it again. And then through Sushiswap. I ...
0
votes
1answer
469 views

Fail with error 'UniswapV2Router: EXPIRED'

I forked UniswapV2's factory and router and deployed them in Kovan using remix I also made sure that I am sending an ETH I also made sure that I approved the tokens But I am getting this error when ...
0
votes
1answer
341 views

Weird Transaction input data, what is this?

So this is a BSC transaction, but it works exactly like ethereum (on the surface), and it's a swap on pancakeswap but it has the same ABI as uniswap. I was looking at a bot that always buy when a new ...
0
votes
1answer
617 views

Transaction Failed when I try to swap BNB for CAKE using swapExactETHForTokensSupportingFeeOnTransferTokens

I'm trying to swap on Pancakeswap for BNB for CAKE, but I've been running into an error. The error reason says, "transaction failed" code: "CALL_EXCEPTION". Been at it for a ...
0
votes
1answer
39 views

How to change blockreward to 100 cake tokens in pancakeswap

Does anyone know how we can set the block reward to 100 cake tokens in pancakeswap. I don't understand which variable will be changed. These are the variables in the migrations file const INITIAL_MINT ...
0
votes
1answer
37 views

Uniswap core requires solidity 5 while periphery requires 6

Working through the examples of uniswap v2 (https://uniswap.org/docs/v2/smart-contract-integration/quick-start/) I got stuck with the following problem: As we can see, v2-core requires solidity 5 ...
0
votes
1answer
163 views

Price of PYRO on Uniswap doesn't match price on Coinbase. If I make a small trade on Uniswap, can I expect Uniswap price to update?

I'm a noob to crypto trading. The price of PYRO on Uniswap is reflecting much, much lower than the price shown on Coinbase. If I make a small trade on Uniswap, should I expect the Uniswap price to ...
0
votes
1answer
712 views

Lost coins after approve on Uniswap

I hope someone can help me. I wanted to swap my USDT for ShopX on Uniswap. I had my USDT in my metamask wallet and was connected on Uniswap. I had to approve so that I could swap. Appently I made a ...
0
votes
1answer
78 views

Processing speed for swapExactETHForTokens vs swap

Is there a difference in transcation processing speed in UniswapV2 when using a swap function versus using the swapExactETHForTokens?
0
votes
1answer
97 views

why my Contract address 0 value on etherscan [closed]

Transaction Hash: 0xcacbecb6c8be10317e27784c7afd33fa52f43df6e31fcc4e0a253b274201bc56 Address 0x1B2cB9A600F80D8cDb529F8D448b9010B0C978c6
0
votes
1answer
40 views

Do parts of decentralised apps take advantage of centralisation?

So, obviously MetaMask interacts with public, distributed ledgers in order to show my balances, however, from a technical perspective, do certain parts of the application use centralised databases? ...
0
votes
1answer
209 views

Best way to conver ETH to a layer 2 ETH or Wrapped ETH to convert to USDC or USDT?

I have a small amount of ETH ($100) and I want to use uniswap to convert it to USDC or USDT, but the fees of $20-$50 is a bit ridiculous. Is there a layer 2 solution that is WORKING that can convert ...
0
votes
1answer
423 views

Why is my for loop not fetching multiple token data?

I'm a little bit noob, so bear with me, but I love the blockchain very much and that's why I'm here, so please hear/help me out. I am building a price scanner for Uniswap, so I have this program to ...
0
votes
1answer
454 views

Why does Uniswap computes amountOut of a token this way?

It seems[1] they do: (0.997 * amountIn * reserveOut) / (reserveIn + 0.997 * amountIn) From my understanding it should be amountIn * price, which with fee becomes ((1 - fee) * amountIn) * price. Now, ...
0
votes
1answer
327 views

Transaction out of gas despite much higher gas price than almost identical transaction at same time that is fully mined

Two Uniswap txns calling swapExactETHForTokens that are almost identical (even same timestamp) except for the value and gas price, but the one with higher value and gas price runs out of gas and uses ...
0
votes
1answer
593 views

How do I know if I am connecting to uniswap factory mainnet or testnet if the contract addresses are common for both?

I had thought each contract deployment and contract address was unique on Ethereum, including across mainnet and testnets. But in the Uniswap documentation it says: UniswapV2Factory is deployed at ...
0
votes
1answer
22 views

Two similar transactions - yet one throws underflow error

I have two seemingly identical transactions in terms of input data, yet one continues to fail with ‘ds-math-sub-underflow‘. The transaction that works was done through the Uniswap v2 add liquidity UI ...
0
votes
0answers
23 views

Unable to remove liquidity using method removeLiquidityETHSupportingFeeOnTransferTokens

I'm trying to deploy a token with transaction fee on Remix, I deployed my own factory and router, and I copied the code of safemoon with some changes with _name, _symbol, _tTotal, _maxTxAmount and ...
0
votes
0answers
21 views

Unable to addLiquidity to a uniswap pool on a hardhat network fork

I'm trying to understand exactly how all these fee on swap tokens work and how they are deployed so I am trying to go through the process of deploying a test one myself and scripting the whole process ...
0
votes
0answers
15 views

I was wondering how to test the contracts that draw functions from interfaces in uniswap v3 periphery

It seems like there is one large contract inheriting interfaces but the code is written like there is a contract instance out there? I don't really understand. Theoretically it should work however a ...
0
votes
1answer
7 views

Bad Result in outputAmount of Trade TOKEN for TOKEN in UNISWAP SDK V2

When I exchange in TOKEN for WETH or WHET for a TOKEN, the result obtained with trade.outputAmount always gives me the same result as in the uniswap UI. But when I go to obtain the output price in a ...
0
votes
1answer
29 views

Accepting multiple ERC20 tokens

I've been doing a little project of mine where users could donate ether to a certain campaign to reach a certain goal, but I wanted to extend this project a little further and wanted to allow the ...
0
votes
1answer
60 views

How to get your smart contract to accept UNI Token?

I'm working on creating a simple contract which will receive UNI tokens from an external account and swap it for ether from UniSwap. I'm having a very hard time understanding the documents. Can anyone ...
0
votes
0answers
12 views

Creating new uniswap v3 pool - ideal Min/Max price

When creating a new Uniswap v3 pool, I'm confused about what the "Set Price Range (Min/Max)" is about. Let's say I run an increasing-price ICO, starting with the rate of 1000 tokens per ETH, ...
0
votes
0answers
12 views

Uniswap Fork: Able to add liquidity, but not able to swap

I am forking uniswap and deploying it on Rinkbey TestNet. I have successfully deployed factory, router, weth contracts. I have replaced the respective addresses in the uniswap interface code. I ...
0
votes
1answer
33 views

Quickswap router function error when liquidity is added on WMATIC pair

i've been trying the functions from the router using the web3.py library. However am getting into troubles when calling the function with a WMATIC/Token liquidity pair and using USDC as currency to ...
0
votes
0answers
13 views

How to determine current(=pending) Uniswap V2 Pair's price?

Are there any ways to get the current/latest price of an Uniswap Pair (V2)? I've understood that getReserve and getAmountsOut calculates the the return values based on the latest mined block? But for ...
0
votes
1answer
9 views

Uniswap/PancakeSwap Fork Fees

I am currently working on a Uniswap V2 fork. However I am somewhat confused as to how to set the fees to my liking. I need help finding the contract and function in the contract to set the fees to my ...
0
votes
1answer
20 views

don't understand specific line of code in UniswapV2Pair.sol, swap function: “amount0In”

For those familiarized with the code in UniswapV2Pair.sol, I don't understand the following line: uint amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0 ...
0
votes
0answers
26 views

Uniswap v2 running out of gas when deploying the Factory on ganache

I am trying to deploy the Uniswap v2 Factory contract on my ganache test network. I have compiled these contracts with my own compiler. But everything I attempt to deploy the Factory, I receive this ...
0
votes
0answers
91 views

bot sniping tokens on pancakeswap by watching the mempool

i seen a video on youtube of a sniper bot buying tokens as soon as the token launches on pancakeswap and gets in on the same block. i have tried to use another bot that buys the tokens when the pair ...
0
votes
0answers
20 views

How to force uniswap to use swapExactTokensForEthSupportingFeeOnTransferTokens

Im coding an erc20 token for a client of mine and it uses dynamic taxes on buys and sells These values are calculated in memory with _tmpFee and then assigned to the value _fee in storage Then ...
0
votes
0answers
24 views

Fee on transfer causing error “Uniswap invariant not satisfied”

I am working on building an ERC20 token with the help of the OpenZeppelin project. I wanted to add a burn fee on transfer, so I overrode my transfer function as follows: function transfer(address _to, ...
0
votes
0answers
12 views

Getting fail reason for tokenswap transaction with ethers.js [duplicate]

i am trying to execute uniswap v2 tokenswap function from node.js using ethers.js How can i get the reason for transaction fail ? Listening to transaction being mined i get only the status (1 for ...
0
votes
1answer
21 views

What were the first DEX on Ethereum and what happen to it compared to how Uniswap is now?

I'm doing some history on the rise of DEXes and wanted to get an idea of what was the first DEX on Ethereum or some other blockchain. I know that Etherdelta was one of the first DEX back in the day, ...
0
votes
0answers
15 views

Uniswapv3 IQuoter revert

I'm trying to use uniswapv3 IQuoter to get a quote: IQuoter iQuoter = IQuoter(0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6); // quoter address address sellingAddress = ...
0
votes
0answers
17 views

Query first 30 swaps for given Uniswap pair using API

According to the Uniswap v2 Docs, the following query fetches the latest 30 swaps for all pairs in the array allPairs: query($allPairs: [String!]) { swaps(first: 30, where: { pair_in: $allPairs }, ...

1
3 4
5
6 7
9