Skip to main content

Questions tagged [decentralized-exchange]

Filter by
Sorted by
Tagged with
1 vote
2 answers
12 views

UniswapV3 deployments without the governance on new L3 chains

i am planning to deploy the exact clone of uniswapv3 on a l3 chain which is based on l2(Base mainnet) but as i was doing little research i read a little about the governance contract in uniswap. can ...
Anwar's user avatar
  • 11
0 votes
1 answer
30 views

Clone entire uniswap v3

Hope everyone is doing great. I need to clone a uniswap v3 entirely but can't find a good resource to achieve what I want. Has anyone prior deployed the uniswap v3 clone if yes. Any small bit of ...
Anwar's user avatar
  • 51
1 vote
0 answers
28 views

How to submit transaction faster to the Arbitrum sequencer?

I have been trying for a few weeks, DEX arbitrage on Arbitrum One. I wanted to know where the sequencer could be located (according to dig/nslookup) it seems to be in US west, but I am not 100% sure. ...
Siamang's user avatar
  • 11
0 votes
0 answers
18 views

How to correctly compose the KEY argument (bytes32) for positions() method in Sushi V3 Pool?

I'm trying to get pool position parameters, like: liquidity feeGrowthInside0LastX128 feeGrowthInside1LastX128 tokensOwed0 tokensOwed1 by polling positions() method in pool smart contract (I'm using ...
Andrii Kaplunenko's user avatar
0 votes
0 answers
25 views

Too BIG feeGrowthInside0LastX128 and feeGrowthInside1LastX128 values in Sushi V3 pool positions, can't calculate fees correctly

I'm developing a system which continuously monitors Sushi pool positions and calculates their effectiveness (or, simply said, fees growth per unit of time). Since Sushi is a fork of Uniswap, I often ...
Andrii Kaplunenko's user avatar
0 votes
0 answers
20 views

UniswapV3 Add Liquidity code is failing

I am currently working on uniswapv3 and encountering issues with the createAndInitializePoolIfNecessary and NonfungiblePositionManager.mint function. when i call the function of ...
Madiha Amjad's user avatar
1 vote
0 answers
56 views

How to solve invalid input params issue for uniswap v2 router 'addLiquidity' method

Can you tell if I am wrong about any of the arguments used for the addLiquidity. I am using wagmi and ethers. Error Caused by: InvalidInputRpcError: Missing or invalid parameters. Double check you ...
Abu Sayeed Mondal's user avatar
0 votes
0 answers
13 views

I have issues buying Base Coins. Error: Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'

web3= Web3(Web3.HTTPProvider(alchemy)) #print(web3.is_connected()) #Instancia contrato uniswap uniswap_router_contract = web3.eth.contract(address=botuni, abi=abiBot) # Crear instancia del contrato ...
Enzo's user avatar
  • 1
0 votes
0 answers
212 views

How did owner remove token liquidity during trading on DEX even if their ownership is renounced?

Im non-tech trader. Today I experienced that the owner did remove token liquidity during trading on DEX and made it become honypot even if their ownership is renounced (checked via Token Sniffer) I ...
Truong The Vu's user avatar
1 vote
0 answers
20 views

Despite having checked the addresses containing verified contracts, no contract code at given address

I have token swapping code. Despite having checked the addresses containing verified contracts I get an no contract code at given address error. The debug data is: router0 ...
pigfox's user avatar
  • 167
0 votes
0 answers
80 views

How to Ensure Custom Tax is Applied on Token Swaps in Solidity Smart Contract?

I'm developing a smart contract for a token (FMYNT) using Solidity on the Binance Smart Chain testnet, integrated with PancakeSwap testnet. I've implemented a custom 5% tax feature for buy and sell ...
Awais Ahmad's user avatar
0 votes
0 answers
80 views

Simple code example to implement tax on sell/buy transactions for a token on Uniswap DEX causing "Your swap is expected to fail.." error

I am trying to implement a sell/buy tax on transactions for my token when users trade on Uniswap DEX. My token's smart contract includes a tax deduction mechanism that functions correctly on EtherScan ...
Awais Ahmad's user avatar
0 votes
1 answer
75 views

How does the contract handle tax deductions for simple buy and sell transactions when the token is listed on any decentralized exchange (DEX)?

Could anyone provide an example solidity smart contract code for how to implement tax deduction using a router in a smart contract when list on DEX ? I've noticed that when adding custom tax deduction ...
Awais Ahmad's user avatar
0 votes
1 answer
27 views

Projects you made [closed]

Which projects you made that get you to expert level in solidity? I'm trying to be a smart contract dev. with solidity and wanna see which ones you made so I could benefit from it.
seojunchian's user avatar
1 vote
1 answer
98 views

Foundry error on CLI command

forge create --rpc-url $QUICKNODE_RPC_URL --private-key $PRIVATE_KEY --etherscan-api-key $ETHERSCAN_API_KEY --verify src/Token.sol:Token [⠒] Compiling... No files changed, compilation skipped The ...
Flegi's user avatar
  • 13
0 votes
0 answers
43 views

Contract Execution always fails while calling the flash loan with 1Inch API

I am getting the data from the 1inch api and I am using this contract for executing the flash loan. However, almost all the transactions are failed with the message, "Transaction Reverted ...
Rudransh Sharma's user avatar
0 votes
1 answer
52 views

How to Perform Cross-Chain Swaps?

I'm trying to facilitate cross-chain swaps between Binance Smart Chain (BSC) and Polygon networks. What are the steps or tools I can use to achieve this? I'd appreciate any guidance or resources you ...
adam mr's user avatar
  • 141
0 votes
1 answer
393 views

Call Swap from Uniswap V3 pool contract instead of through router

I am trying to call swap method from UniswapV3Pool contract, Kindly guide me step by step to call this method. ETCSwap (Ethereum Classic DEX) is using this approach, they are directly interact with ...
Syed Mokarram's user avatar
0 votes
0 answers
96 views

How To Find DexTool Trade Transaction Hash On BscScan / EtherScan

I'm presently trying to hunt down a rug pull of a fake PRCL token. I realize this is Binance Smart Chain, not Ethereum, but there's no community for Binance Smart Chain and it should hopefully be ...
azoundria's user avatar
  • 121
1 vote
2 answers
159 views

Do I have to pay twice for network fee?

I'm very new in crypto world and right now I'm trying to swap this coin but as you can see in the screenshot the ETH gas fee (Uniswap) is only $15 but once I tried to confirm transaction at my wallet ...
andrel58's user avatar
0 votes
2 answers
94 views

Are cross-chain Decentralized Exchanges and cross-chain bridges are the same?

I am newbie at DeFi. I am struggling with understanding what does author of Yellow paper of LayerZero mean in this sentence: "Currently, to convert between tokens of two chains, a user must ...
hardhat-enjoyer's user avatar
1 vote
1 answer
27 views

Running a Cryptocurrency Bot 24/7 Without a Computer

I've developed a cryptocurrency trading bot, but I don't want to leave my personal computer running all the time just to keep it operational. Is there a method or service that allows me to run the bot ...
adam mr's user avatar
  • 141
1 vote
1 answer
29 views

How to query balance and lock duration of staked tokens across multiple protocols

I would like to query the stake/LP balances across multiple defi protocols for a given account address. debank.com does something similar and can show the LP balance for a DEX, the stake balance and ...
degen872's user avatar
2 votes
0 answers
639 views

How to Calculate Arbitrage Optimal amount in, in Uniswap v3 pools?

Let us assume that there is an arbitrage opportunity in uniswap v3 pools.Now I want to take a flash loan to make a swap in uniswap v3 pools.My doubt is how can I calculate the optimal amount in for ...
kumar's user avatar
  • 71
1 vote
1 answer
1k views

What would happen if you allocated 100% of a token's supply to a DEX liquidity pool?

So we all know what happens when there is no liquidity at all; it's impossible to buy or sell a token with no liquidity. But what would happen in the reverse scenario; if 100% of a token's supply was ...
Ashraile's user avatar
  • 125
0 votes
0 answers
124 views

How to get the token prices from the uniswap v3 pools?

I have to write the solidity code to fetch the prices of token pairs from the uniswap v3 pools but I have no idea how to get the prices of the token pairs from the uniswap v3 pools to my smart ...
kumar's user avatar
  • 71
0 votes
0 answers
62 views

Subgraph Link for Uniswap V2 on BSC?

I'm looking for the SubGraph Api endpoint to interact with UniswapV2 on the Binance Smart Chain (BSC). Can anyone provide the specific link or information on how to access it? I appreciate any ...
adam mr's user avatar
  • 141
0 votes
1 answer
34 views

Is it safe to use block.timestamp when swapping erc20 tokens?

I have a swapping function in my smart contract and for the deadline I am using block.timestamp. The swap function can only be called by the owner of the contract. Is this a safe way of working with ...
guiflam's user avatar
  • 11
0 votes
1 answer
26 views

Forking Swap from bsc on goerli, max input of native token 0

I'm trying to fork cheeseswap from bsc onto goerli. I've also tried to fork another swap from another network onto goerli and have the same issue. I Change all the chainid numbers, rpcs, factory, ...
Bobo From Florida's user avatar
0 votes
0 answers
2k views

0x API: Am I able to Swap absolutely NEW coins?

I have a trading bot that operates on newly created tokens in BSC and ETH networks. It works only for new tokens, that were created with WBNB (BSC chain with PancakeSwap) or with WETH (ETH chain with ...
Danik Logan's user avatar
0 votes
0 answers
15 views

How to use ethereum on decentralized exchanges in the US?

See https://www.reddit.com/r/Bitcoin/comments/145yka4/comment/jnoduy1/?utm_source=share&utm_medium=web2x&context=3 Dex's don't deal with Fiat directly, you always need a cex to buy your ...
Ralph Yozzo's user avatar
0 votes
0 answers
20 views

Looking for DEX code to create an internal token swap

I'm currently working on a project with a token contract and I need to add an internal token swap feature. So to avoid writing everything from scratch i'm Looking for any GitHub repositories or open-...
The matador's user avatar
0 votes
0 answers
149 views

How to calculate expected token amount out in a UniswapV3 swap

Accounting for slippage, is there a good way of reading data from a UniswapV3 pair and estimate how many tokens will be received when performing a swap (accounting for slippage)? I couldn't think of a ...
Rudi's user avatar
  • 1
0 votes
2 answers
89 views

Fail with error 'This pool does not exist on router1'

I was attempting to make a token swap and got an error: This pool does not exist on router1. This is my transaction: Etherscan link Any idea how I can prevent this error and verify that the pool ...
pigfox's user avatar
  • 167
0 votes
1 answer
91 views

How to decode internal transaction in mempool

i'm researching on how mev works. I know that they are watching all pending transactions, then define function that is swap on dex and calculate amount to do sandwitch. However, when user do a swap, ...
dang.pm.IT's user avatar
1 vote
0 answers
31 views

How to swap ETH for another token and send this token to another wallet using only one transaction for both actions?

Please, tell me, is it possible to do it using Uniswap V2 router (via smart-contract or dapps)
misha s's user avatar
  • 11
1 vote
1 answer
135 views

execution reverted despite not writing to the blockchain

I am attempting to read the value of a token on a DEX. When I run the code I get execution reverted despite not writing to the blockchain. Code is reproducible with your own Infura api key. Any ideas ...
pigfox's user avatar
  • 167
1 vote
0 answers
95 views

How can I approve spending limit manually without having to use metamask?

When interact with smart contract on EVM chain, new token need to use "approve" function on metamask. I know this, but I have a good reason to approve the spending limit manually without ...
cht's user avatar
  • 11
0 votes
2 answers
227 views

Batch Token Swap using 0x

I'm trying to make a telegram bot that sells all the tokens available on a wallet using Ox API. In order to automate the process with only command, I'm okay with adding the private key to the script. ...
Liju Thomas's user avatar
0 votes
3 answers
868 views

How can I find router addresses of decentralized exchanges

When I want to find router addresses like pancakeswap router (V2) or uniswap router, I can search them like pancakeswap router bscscan in Google or track transactions in bscscan.com to find them. Do ...
Mahdi Karami's user avatar
1 vote
0 answers
173 views

Can we rely on 1inch Swap API price feeds

It is not clear to me how 1inch swagger API is getting the prices from different dexes. Can we rely on them? As they are not open-sourced. I tried using the aggregator but faced this issue RPC timeout ...
Saikat Karmakar's user avatar
0 votes
1 answer
128 views

RPC timeout while doing multicall on `1inch aggregator` on local forks

I may be doing this wrong but I think there is an issue when performing multicall Spot price aggregator contract.But when it comes to multicall ganache/hardhat all make Time out error. Poc: Performed ...
Saikat Karmakar's user avatar
2 votes
1 answer
93 views

`ZIPPO_CONTEXT_INVALID` error when querying 0x goerli swap api quote endpoint

When querying the following endpoint and parameters: https://goerli.api.0x.org/swap/v1/quote?buyToken=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&sellAmount=1000000000000&sellToken=...
Luckydev's user avatar
1 vote
1 answer
29 views

error Dai/insufficient-allowance even when sufficient amount has been approved

I am testing smart contract interaction with Gains.trade on hardhat mainnet fork. However i always got this error Error: VM Exception while processing transaction: reverted with reason string 'Dai/...
Haziq Raz's user avatar
1 vote
1 answer
140 views

Metamask signature request with empty message

Can someone help me to understand these empty signature requests? For example using the Plutus Dex when clicking to stake your plu you got this: What does this mean? And what harm this can cause? And ...
BigLeo's user avatar
  • 141
2 votes
2 answers
1k views

Error: invalid signer or provider (argument="signerOrProvider", value={}, code=INVALID_ARGUMENT, version=contracts/5.7.0)

import { AlphaRouter } from "@uniswap/smart-order-router"; import { ethers, BigNumber } from "ethers"; // Import BigNumber from ethers import { Token, CurrencyAmount, TradeType, ...
Nilesh Nath's user avatar
0 votes
2 answers
436 views

Contract Address for Swap Router for Goerli ARB

Does anyone know an address or sanple address for Swap Router in Goerli Arbitrum Testnet Network? Like this sample in mumbai https://mumbai.polygonscan.com/address/...
Lloyd Ramos's user avatar
1 vote
1 answer
575 views

Liquidity provisioning with yield-bearing tokens

I want to add liquidity to a pool with a yield-bearing token, such as stETH/ETH. Where does the yield of this token go to? Does it just go to the smart contract and gets owned by the smart contract, ...
João Areias's user avatar
1 vote
0 answers
29 views

Uniswap: Why is there an intermediary when swapping?

I am trying to understand why sometimes when a wallet buys a token the Uniswap pool sends the token through an intermediary address before it gets sent to the buyer. Here's an example of such ...
Martin's user avatar
  • 11
1 vote
1 answer
57 views

it’s possible that swap transaction get executed some blocks later

i want call X function, there are multiples external calls in this function.one of this external calls is a DEX trade. it’s possible this DEX trade transaction get executed in the some blocks later or ...
Saeed Alipoor's user avatar

1
2 3 4 5 6