Skip to main content
Share Your Experience: Take the 2024 Developer Survey
12 votes
Accepted

Why is it so expensive to trade on Uniswap with MetaMask? ($50 fee)

The answer is that uniswap is a set of Smart Contract running on the Ethereum platform and thus requires gas in order to execute any functions. Meaning that when you swap token A for token B or token ...
People Call Me Adam's user avatar
10 votes
Accepted

Is burning tokens effective without buy-back?

I believe you're searching for logic in a place where it does not exist. Burning tokens before token "launch" is actually a shitcoin trend which makes zero sense and in general something ...
Miroslav Nedelchev's user avatar
7 votes
Accepted

How does uniswap creator take profit?

How does uniswap creator take profit? Uniswap itself made $11 million in their Series A funding round. (See here.) I believe they currently use this as their source of funds for operating and ...
Richard Horrocks's user avatar
7 votes

Is burning tokens effective without buy-back?

It's an effective form of marketing. From a mathematical point of view burning tokens on deployment is the same as never creating those tokens at all, but from a marketing perspective: It creates the ...
blues's user avatar
  • 170
7 votes

Why MINIMUM_LIQUIDITY is used in DEX like Uniswap?

Generally, a V2 pool stores tokens and issues shares to the liquidity provider - it's in a sense a vault. Vaults are vulnerable to the share inflation attack, described in detail here. Requiring that ...
kfx's user avatar
  • 1,630
6 votes

Get Uniswap Exchange Rate of any Token with Web3

There is a more simple solution to pull the price straight from Blockchain the steps are as follow: Using the router contract call getAmountsOut(1.0, [token, WETH]) Using the router contract call ...
Enrique Ramos's user avatar
6 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, ...
jjj's user avatar
  • 390
6 votes
Accepted

What is Project Wyvern Protocol?

Their documentation is at their website https://wyvernprotocol.com/. In order to understand the fundamentals of Wyvern Protocol you'll need a deep understanding of blockchain and smart contracts. If ...
Stevers's user avatar
  • 362
5 votes
Accepted

What parts of the IDEX decentralized exchange is centralized and decentralized?

IDEX is not decentralized at all, it's fully centralized. There's no way to use the system without IDEX team allow you to do so. If they don't want to process your transactions, your transactions ...
Giuseppe Bertone's user avatar
5 votes

How much liquidity to provide to Uniswap?

Whoever provides the liquidity has the option to take his share of the liquidity out of the pool, at any time they want. Liquidity is never "sold off" as such, since Uniswap price is based ...
Lauri Peltonen's user avatar
5 votes

what is math for uniswap calculates the amountout and amountin why 997 and 1000

As Uniswap's fees are 0.3%, the constants 997 and 1000 are corresponding nominators and denominators to help calculate this. 3 / 1000 = 0.003 = 0.3%
Natalia Serene's user avatar
4 votes
Accepted

Get Uniswap Exchange Rate of any Token with Web3

You'll first need the address of the contract for the pair whose price(s) you want to access. Two ways to do this: Find the addresses of the two tokens separately, and feed them into the ...
Richard Horrocks's user avatar
3 votes
Accepted

Why isn't Polka Dot listed for trading on Uniswap?

Uniswap only lists tokens created on Ethereum such as ERC-20 tokens. Polkadot is not an ERC20 token. It runs on its own blockchain. :)
AvocadoChocolate's user avatar
3 votes
Accepted

What programming languages was Uniswap's open-source code written in?

Uniswap protocol is developed in Solidity, and you can find two main building blocks: uniswap-v2-core: Core smart contracts, essentially with the Factory, Pair and ERC20, together with a number of ...
Sergi Juanati's user avatar
3 votes

Is there any way of creating ERC-1155 or ERC-721 tokens always earn transaction fees?

It is easy to create an NFT that transfers a fixed fee to you at every transfer of this NFT. Just add transfer (of ETH, or an ERC-20/1155) to it. It is nearly impossible to get a transaction ...
porton's user avatar
  • 1,804
3 votes

How does Uniswap calculate price impact without fee on the swap page?

Late to the question, but since it's still unanswered I'll write a solution; it should help people still struggling with UniswapV2 math. So, the price impact is usually defined as the relative ...
0xSanson's user avatar
  • 3,249
3 votes
Accepted

Implementing AMM DEX similar to Uniswap/SushiSwap

A DEX essentially allows you to swap tokens and create liquidity pools, which means that you don't create (mint) new tokens in general. Only if the DEX has the possibility of staking, then you may ...
Sergi Juanati's user avatar
3 votes

Retrieve Mdex.com exchange rates for token pair [Huobi Eco Chain]

As you mentioned it seems they have a particular way of doing things, and I am not too familiar with Mdex, but I have worked with Uniswap's sub-graph implementation. This isn't necessarily a solution ...
Carlos F's user avatar
  • 231
3 votes

Retrieve price data from PancakeSwap [BSC]

Pancake Swap uses the same formula as Uniswap, but they have a 0.2% fee instead of 0.3% fee, which affects the calculation.
Undead8's user avatar
  • 3,610
3 votes
Accepted

How is uniswap/sushiswap distributing their fees?

Well, after some research I can answer my question. I was indeed right, treasury fee is 1/6 (16.6%) of the total fee. Precisely, the code for this formula is in the core repository: code unction ...
Kaneda's user avatar
  • 365
3 votes

Why MINIMUM_LIQUIDITY is used in DEX like Uniswap?

I am adding to the answer provided by @kfx with an example: In the absence of preset burning, an attacker initializes a pool with 10e-18 weth and 10e-18 dai. This would mint 1LP token which also ...
Maanas O T's user avatar
3 votes

How can i calculate depositedAmount0 and depositedAmount1 from given liquidity Uniswapv3

Here is some working code to get data from position ID , it uses etherjs and bignumber (JSBI), but has all the base math import { JSBI } from "@uniswap/sdk"; import { ethers } from 'ethers' ...
Crypto_Rachel's user avatar
3 votes
Accepted

Tiny Uniswap amounts cause enormous price impact

Rounding errors. Solidity does not have floating-point math, all fractional calculations are done with fixed-point math, meaning that when the amounts are very small, rounding errors become huge. ...
kfx's user avatar
  • 1,630
3 votes
Accepted

Get all liquidity in all dex of a token

You have to use the factory abi of all dexes to get liquidity for the mostly used tokens from front end. Eg. the factory address of pancakeswap is 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73. The abi ...
Safi's user avatar
  • 883
3 votes

What is Ticks on Uniswap?

in uniswap v3 we have concentrated liquidity. User has to decide in which price range s/he wants to have their liquidity gets traded. for this, uniswap has to find a way to decide the price ranges. ...
Yilmaz's user avatar
  • 1,610
2 votes
Accepted

Why do we have to "deposit" into a decentralized exchange?

The deposit puts the control of tokens to the smart contract so that the smart contract can fill the orders. Smart contract allows tokens to be used only for this purpose - matching and filling orders....
Mikko Ohtamaa's user avatar
2 votes

is it possible to get events from transactions that are in the `txpool`?

This is possible in theory, once transaction is included into pending block, you may try to query its logs via web3.eth.getPastLogs ({from: 'pending', to: 'pending'}), though I'm not sure this works ...
Mikhail Vladimirov's user avatar
2 votes

is it possible to get events from transactions that are in the `txpool`?

No, It is Immpossible. An event is a kind of result of a transaction, like a calculated variable value. So, you can only guess what will happen based on the input data.
Ivan Zakharov's user avatar
2 votes
Accepted

Can an Erc-20 token that I create on my Quorum be integrated with any cryptocurrency exchange (for example Coinbase)?

In theory, yes. But the chances for that to happen are next to nothing. For an exchange to accept your coin they would have to: 1) Trust your blockchain that it's fair, valid and uncompromisable 2) ...
Lauri Peltonen's user avatar

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