We changed our privacy policy. Read more.

Questions tagged [dex]

The tag has no usage guidance.

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

Does a bridge always necessitates creating an intermediate token?

When one creating a so-called bridge in order to exchange a coin on one blockchain to a coin on a different blockchain, how does it work? Does it always necessitate creating an intermediate token - LT ...
0
votes
0answers
4 views

Does a bridge always necessitates creating an intermediate token? [duplicate]

When one creating a so-called bridge in order to exchange a coin on one blockchain to a coin on a different blockchain, how does it work? Does it always necessitate creating an intermediate token - LT ...
0
votes
1answer
62 views

How to calculate price impact on 0x API

I want to calculate price impact of my order on 0x API. What is the best way to get this value? This is an example quote to swap 10 BNB to Farm token. Pancakeswap shows 5% price impact for this swap. ...
0
votes
0answers
6 views

Launching pegged price tokens on ETH network/

Anyone have experience launching a pegged token value to any type of AMM Dex? Being the price of the asset is always constant. Example would be a stable coin like Vai, Dai, or USDC?
0
votes
0answers
11 views

How to get token Price from pancake which has less Liquidity?

How to get token Price from pancake which has less Liquidity? Using pancake api which shows 0 in price, How to get LIVE price of the tokens?
0
votes
1answer
33 views

What actually happens if you provide incorrect ratio of liquidity in Uniswap-like exchanges?

Let's say you provide 1 ETH and 1 USDT liquidity to ETH/USDT pair on Uniswap or similar exchange. Obviously you are not supposed to do this. But what would actually happen if you do? Would there be ...
0
votes
1answer
143 views

What were the first DEX on Ethereum and why does not the SEC investigate Uniswap?

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, ...
3
votes
0answers
38 views

Uniswap path generation

The uniswap contract has a function called swapTokensForExactTokens. One of the arguments to this function is an array of addresses called "path" which is the route that the transfer will ...
0
votes
1answer
152 views

Can a mobile wallet like Trust be hacked using DEX?

I never shared my private keys or 12 words phrase with anyone. I users wallet generated by trustwallet only. I had 4000 plus BSW staked in biswap platform launchpool. When I saw that staking for bnb ...
0
votes
1answer
31 views

Why LP is better than order book?

For DEX, most popular ones are using liquidity providers instead of order books while I believe we can build DEX on both models. Then why is LP a better one?
0
votes
0answers
143 views

i need to get the uniswap v3 price for any given swap pair preferably using the v3-sdk

Can anyone provide an example of how to use uniseap-v3 sdk to fetch token swap prices or any other working method
1
vote
1answer
112 views

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

function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {//the amount of user,amount in pool,output token amount in pool require(amountIn > ...
0
votes
3answers
904 views

Understanding front running. Why did my transaction fail? (PancakeSwap V2)

I am doing some research on front running transactions. My goal is to purchase a token in PancakeSwap in the same block that liquidity is added. Lets take this token as an example: https://bscscan.com/...
1
vote
0answers
205 views

Is the Uniswap v2 0.3% trading fee calculated wrong?

I am digging into the details of how the token swapping fee is calculated and I cannot get a formula that reproduces the expected 0.3% fee. Let's say there's a USDT-ETH pool with: 1000 USDT 10 ETH k =...
1
vote
0answers
82 views

Custom BEP20 token and liquidity pool

What does adding your custom token liquidity really do? Does adding your token to liquidity pool automatically get your token able to be listed or available for other coins?
0
votes
0answers
336 views

How do decentralized exchanges make money?

I've been wondering how do DEXs make money. I know some of them like uniswap and airswap supposedly don't take any profits from trades. But are all DEXs like this? I read on Kyberswap FAQ that the ...
1
vote
1answer
320 views

Fetch price data: on-chain oracle vs smart contract function

I want to get the latest and most accurate price data from Uniswap and found out that I can either call the getAmountsOut() function which gives me the amount of tokens I will get in return of a given ...
3
votes
1answer
5k views

Retrieve price data from PancakeSwap [BSC]

Does PancakeSwap use the same constant product formula as Uniswap (x * y = k)? Because then I should be able to calculate a token pair exchange rate by just dividing the amount of token1 reserves by ...
2
votes
1answer
265 views

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

After long Telegram conversations I have found out that MdexSwap uses a secret formula to calculate their token exchange rates on their swap platform. Unlike Uniswap they also don't really have an API,...
0
votes
1answer
63 views

Smart contract with infinity loop fetching DEX prices

I am trying to create an arbitrage bot which swaps between 2 decentralised exchanges. Lots of tutorials say that I need a Javascript or Python program that continuously runs and fetches prices from ...
5
votes
2answers
6k views

Get Uniswap Exchange Rate of any Token with Web3

I need to get the exchange rate for every token on Uniswap with Web3 like Uniswap itself which they then display on their web interface on app.uniswap.org like this: So when I enter to swap the ...
3
votes
1answer
2k views

How much liquidity to provide to Uniswap?

So you deployed your brand new ERC20 token to Uniswap. I understand you need to provide liquidity for your token pair in Uniswap so people can start buying your token. Now, what I'm trying to wrap my ...
0
votes
0answers
41 views

Transactions between ERC-20 Token and DEX on Etherscan

Below is a screenshot of transactions at an address I take to be the ERC-20 token SAND (Sandbox). Is this right? that the link below the image is the singular address where this ERC-20 token issues ...
0
votes
0answers
157 views

Could there be multiple asset pools In a DAMM liquidity pool?

In a DAMM (dynamic automated market making) DEX (decentralized exchange) the ration between two assets, e.g. DAI/ETH does not have to be 50/50 anymore, like it used to be in a AMM, (automated market ...
0
votes
1answer
78 views

copy etherdelta code [closed]

For a test project, I need to write the etherdelta's contract. but "function EtherDelta (address admin_, address feeAccount_, address accountLevelsAddr_, uint feeMake_, uint feeTake_, uint feeRebate_) ...
0
votes
2answers
495 views

Can one fork a decentralized exchange smart contract since the code is out in the open?

Since ethdelta and idex are decentralized exchanges, meaning there is no "central" server. The smart contract code is in the ethereum blockchain. Can one just copy this smart contract and launch a ...