Questions tagged [pancakeswap]

PancakeSwap is a Binance Smart Chain-based DEX launched by anonymous devs with a penchant for breakfast foods and rabbits. It looks a bit like Ethereum's SushiSwap (community governance, the ability to farm liquidity provider tokens), but also incorporates many other features that let you earn rewards.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

How to fetch tokens amountOut on different DEXes on BSC?

guys! I am new in DEX trading robots development and I ask you for help in understanding/explaining pretty basic and simple things to me. First of all, I want to do the most basic thing we can imagine:...
Kind_Man's user avatar
0 votes
1 answer
40 views

pancakeswap v2 flash loan arbitrage real output amount is not as expected

when i monitor a profitable trade. The difference in profit calculated by my own method and the result of getAmoutsOut is not significant. Before sending the transaction, I would use the getAmoutsOut ...
DOGGODCoder's user avatar
1 vote
0 answers
62 views

How can I make a multicall transaction using web3.py and pancakeswap router?

I need to do a multihop swap. For example : BNB->USDT->TOKEN. I am trying to do this swap using pancakeswap roter v2 swapExactETHForTokens method. But I get execution reverted swap_path = [...
NIKITA's user avatar
  • 25
1 vote
0 answers
25 views

0x protocol swap api not fetching liquidity from pancakeswap

I created a liquidity pool on pancakeswap for an asset pair for goerli network. I get this error when i try and fetch the price. here is the api request https://goerli.api.0x.org/swap/v1/price?...
ShisukeUrahara's user avatar
1 vote
1 answer
47 views

Deploying with hardhat : ProviderError: INTERNAL_ERROR: could not replace existing tx

I am trying to deploy pancakeSwapv3 contracts on goerli network. I have been able to do it successfully on hardhat network and also on BSCtestnet, using the pre existing deploy script provided in the ...
Yann's user avatar
  • 11
0 votes
0 answers
77 views

how to buy tokens with python web3 in pancakeswap v3

can someone give me an example of how to buy tokens in python web3 with the v3 version of pancakeswap? I don't understand what parameters I have to pass to the multicall() function.
juan carlos's user avatar
1 vote
0 answers
36 views

Pancake swap hack

I have been recently victim of a pancake swap by buying some custom token. My Ledger and my Metamask were connected to pancake swap while i tried for the 1st time a Crypto Pump found on Telegram (a ...
soleshoe's user avatar
  • 111
0 votes
0 answers
12 views

Token fee in my contract error in pancakeswap

I have created a logic in my contract by modifying the transfer function, so that it debits from the total amount arriving the taxes I need, then those taxes are sent to the same contract and ...
LouiLou's user avatar
0 votes
2 answers
31 views

I bought a token the amount appear in bscscan but not in pancakeswap

0 I bought a token; the token amount appears on bscscan.com but not in the pancakeswap. The token has a 100/100 rate on the token sniffer website. this link is the token contract: https://bscscan.com/...
mrcoet's user avatar
  • 15
0 votes
1 answer
37 views

Lost tokens on pancakeswap

I did a small swap on pancakeswap (metamask wallet) in order to understand how the whole stuff work, so i swapped 2 usdt into ONPAY coin, i did import it in my wallet, then i checked and it was in the ...
S AG's user avatar
  • 11
0 votes
0 answers
30 views

removeLiqudityWithPermit: Invalid Signature

So, I am trying to remove liquidity from a pancake v2 pair and I do not understand why this is not working. I am looking at the code, and I've triple checked every value, I don' think I am doing ...
Chev_603's user avatar
  • 157
1 vote
0 answers
51 views

How can I make a flashloan bot

How Can I make a flash loan bot which can operate on Aave, uniswap, sushiswap etc? I know a furucombo, but this is too complicated for me. My Idea is the bot will keep an eye on certain tokens & ...
Saikat Karmakar's user avatar
0 votes
0 answers
20 views

Why a Uniswap/PancakeSwap emits same event multiple times

does someone know why Uniswap/PancakeSwap pairs occasionally emit the same Swap event multiple times? There is it an example on dexscreener on WBNB/USDT: I happen to also catch it in my script that I ...
Melardev's user avatar
  • 101
1 vote
0 answers
44 views

web3.py is not routing properly as pancakeswap finance GUI

I have a script in python in order to execute a multicall using pancakeswap V3 router contract. Muticall sells some tokens using "swapExactTokensForTokens" from the contract. The path ...
jglrmm's user avatar
  • 11
0 votes
0 answers
51 views

Error INSUFFICIENT_INPUT_AMOUNT when trading pancake

A newly created token contract is normally traded on the testnet, Published to the main network, this error occurs when selling coins INSUFFICIENT_INPUT_AMOUNT; https://pancakeswap.finance/swap?...
AdinZ's user avatar
  • 1
0 votes
1 answer
17 views

Pancakeswap swap fails with INSUFFICIENT_OUTPUT_AMOUNT error

I'm trying to make a swap on the Binance testnet using Pancakeswap. I keep getting an INSUFFICIENT_OUTPUT_AMOUNT error and I have no idea why. Here is my code: const ethers = require('ethers'); const ...
Sayaki's user avatar
  • 139
0 votes
0 answers
24 views

Can't SWAP on Pancake Rooter with web3.py

I try to make a function that calls swapExactTokensForTokens on pacakeswap v2 rooter. The approval is mined, so is the swap. But when i check on bscscan, the contract execution fails for the swap (not ...
Newly Sama's user avatar
0 votes
0 answers
100 views

swapExactTokensForETH / swapExactETHForTokens on pancake swap doesnt swap

I need to convert some eth to another token in my unit test. I work on alchemy fork and ethers.js. I am trying to do it using pancake swap: it("should use pancake swap to get some tokens&...
Chris's user avatar
  • 101
0 votes
0 answers
45 views

Cannot get info about position in liquid pool

I tried to get my position info in PancakeSwap liquid pool. I want to know how much token0 and token1 I added and how much uncollected fees exist. I found this field in PancakeV3Pool contract: mapping(...
Vladimir Kashitsyn's user avatar
0 votes
0 answers
39 views

Why can't I swap the token using swapExactTokensForETHSupportingFeeOnTransferTokens?

i use the function swapExactTokensForETHSupportingFeeOnTransferTokens web3 py for swap MATIC to WBNB, but always get errors what is wrong with my code? input_token_address = web3.toChecksumAddress('...
NIKITA's user avatar
  • 25
0 votes
0 answers
33 views

Why can't read the transaction using web3.py?

I'm trying to decode transaction input using the web3py but I'm getting an error. ABI i got here: https://bscscan.com/address/0x10ED43C718714eb63d5aA57B78B54704E256024E#code pancakeaddr = '...
NIKITA's user avatar
  • 25
0 votes
0 answers
13 views

Unable to do swap via swapExactTokensForETHSupportingFeeOnTransferTokens

What seems to be the issue in this code I am unable to swap tried everything: function transferFrom(address sender, address recipient, uint256 amount) public { require(sender != address(0), ...
Hammas Ali's user avatar
0 votes
0 answers
153 views

Adding Liquidity Pair in PanCakeSwap V2 Testnet BSC for Burn/Tax Token against tBNB. Not Enabling Right Price Panel

I want to add Liquidity Pair for my Own Token against BNB. but the Price or Right Panel is not Enabling. My Token has Tax and Burn Features. I am using PCS V2 Testnet. I also Tested in V3(it didn't ...
ClastronGamer's user avatar
0 votes
1 answer
42 views

Python 3.11.3 - Web3 6.4.0 - Python reports that contract.functions.swapExactETHForTokens does not have attribute buildTransaction

I have now Python 3.11.3 and Web3 6.4.0 and I cannot use anymore my old code for buying/selling tokens in Pancakeswap because Python reports that contract.functions.swapExactETHForTokens does not have ...
CHIHUAHAAAA's user avatar
0 votes
1 answer
168 views

Understanding the getAmountsOut functrion, help please

I'm trying to understand the "getAmountsOut" function from Uniswap / Pancakeswap, line by line: // performs chained getAmountOut calculations on any number of pairs function getAmountsOut(...
你的老师's user avatar
1 vote
1 answer
313 views

How would I be able to set slippage for exactInputSingle on Uniswap v3 and Pancakeswap v3?

I'm able to do swap transactions using multicall and exactInputSingle functions on both Uniswap v3 and Pancakeswap v3. However, I have no idea how would I be able to set the slippage. The v2 routers ...
Austin's user avatar
  • 123
0 votes
0 answers
62 views

Multi token Arbitrage Bot for Dexes

I was thinking of making a program to find & execute arbitrage. Say we have a 100 token A which we can swap back & forth with 4 other tokens to end up making a profit by combining it with ...
Saikat Karmakar's user avatar
0 votes
1 answer
310 views

Sending transaction to Uniswap/Pancakeswap Router using Nethereum failing

I'm trying to send a transaction to the Uniswap or Pancakeswap V3 router using Nethereum for a token swap via "exactInputSingle", but first I'm performing a gas estimate for the transaction. ...
Calculon's user avatar
0 votes
0 answers
28 views

Code which copy tradeers in pankakeswap doesnt work

So Im trying to use tihs code to copy traders in pancakeswap. But when the code achive the line (how i think) let decodedData = iface.parseTransaction({ data: txInfo.data }) code doesnt do bet like a ...
ra1n89's user avatar
  • 129
0 votes
0 answers
30 views

How to provide liquidity to PancakeSwapV3 farming?

I try to provide liquidity to PancakeSwapV3 farming. To do it I call safeTransferFrom method of NonfungiblePositionManager (https://bscscan.com/address/0x46a15b0b27311cedf172ab29e4f4766fbe7f4364). ...
Dmitriy's user avatar
  • 101
0 votes
0 answers
35 views

BSC Wallet hacked. Sweeper in my wallet [duplicate]

new here! Recently my seeds were compromised/stolen (maybe a suspicious download). I have some blocked tokens linked to my wallet. Whenever I transfer some Token, the sweeper transfers it to the ...
mdsl developer's user avatar
1 vote
1 answer
172 views

PancakeSwap Router Contract call: <UnrecognizedContract> Error: call revert exception

I am using ethers.js, hardhat, and pancakeswaps router to run getAmountsOut(), but I am getting an error. The error I get in the terminal is... Error: call revert exception [ See: https://links....
Suvan Cheemalamarri's user avatar
0 votes
0 answers
37 views

Interact with PancakeRouter contract using Remix return: PancakeRouter: EXPIRED

I am interacting with the PancakeRouter.sol contract on Remix by setting the deadline to the latest block timestamp on Mumbai Polygonscan plus 30 * 60 seconds. But no matter how high the deadline I am ...
yong ho's user avatar
  • 121
0 votes
0 answers
11 views

How to know how much token when I call swapExactETHForTokens, without checking in offchain

Hi everyone. I currently testing with swap in pancakeswap ETH-tusd, I realize even I fixed amountOutMin but with sent different ETH, I receive different amount of token tusd, How do I capture that ...
rived's user avatar
  • 160
2 votes
1 answer
106 views

What is difference between masterchef and smartchef contracts

I was going through masterchef contract. But later I saw Pancake uses smartchef contract for pools. I am confused which one to use, as both have almost same functionality.
Manav Notnani's user avatar
1 vote
0 answers
22 views

How to setup routing in pancakeswap

Pancake V2 has this smart order routing(SOR) feature. I was wondering how to build this efficiently, so that I can do permutation and combinations on existing pairs and get their reserves, and thereby ...
Manav Notnani's user avatar
0 votes
0 answers
47 views

error during making a request to subgraph ql

lientError: GraphQL Error (Code: 500): {"response":{"error":"invalid gRPC request content-type\n","status":500,"headers":{}},"request":{&...
Anwar's user avatar
  • 51
0 votes
1 answer
87 views

Token pair liquidity lock expiration

Is there any way to get token pair liquidity lock expiration in Pancakeswap using Solidity? I know how to do this using bscscan.com, but I need to add some condition in my Solidity code to avoid ...
Alex's user avatar
  • 3
0 votes
0 answers
46 views

Swapping token for Eth

since I cannot find a legit site to lookup liquidity for a smart contract this is my only option. Like there isn’t a single site that you go on, paste a smart contract option and it gives you all the ...
kaliqubes's user avatar
1 vote
1 answer
552 views

python web3, given only token address, fetch liquidity pool details from pancake swap

Using python 3.10, web3 v5.31.1 Given only the contract address for a single token (tokenA), is there a method from PancakeSwap to return liquidity pool (LP) details? Mainly given only the address of ...
AdamMuzz's user avatar
0 votes
1 answer
147 views

Python web3, how to create route bnb -> intermediary -> token dynamically

Using Python 3.10 web3 V 5.31.1 I currently have functional code in python that can buy/sell tokens via PancakeSwapV2 only if they have liquidity pools BNB/token def buy_token(tkn_addr: str, amount: ...
AdamMuzz's user avatar
0 votes
1 answer
52 views

RPC readtime out problem

What I want to do: look through all pairs in pancake V2(currently 1261k pairs), and get token0 and token1 address, thus read their source code through bscscan api, to identify whether its source code ...
tpt king's user avatar
1 vote
0 answers
71 views

Faild to add Liquidity in pancake router

I've forked this pancake router contract in BSC testnet https://testnet.bscscan.com/address/0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3#code and this is mine: https://testnet.bscscan.com/address/...
BlackRain's user avatar
0 votes
1 answer
33 views

Query pancake swap staking contract

I've been trying to find information on how to query pancakeswap's staking contract for some time now, and I've unfortunately been unsuccessful this far. I was wondering if anyone would be so kind as ...
Lariz's user avatar
  • 1
1 vote
1 answer
161 views

Call Requests Limit

I made a bot swap on bsc network using 1inch 0x and para swap.. everything is great except one thing which is Call requests I can’t make call every 1 sec for more than 1 token when make 2 tokens my ip ...
Nashwan Salah's user avatar
0 votes
1 answer
69 views

PancakeSwap Error with Brownie, revert: TransferHelper::transferFrom: transferFrom failed

I am in bsc-testnet and have 0.3 WBNB in my wallet and I try to swap 0.1 WBNB for USDT with the function swapExactTokensForTokens() Token1 = '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd' Token2 = '...
Emericdt's user avatar
0 votes
1 answer
69 views

Need help with solidity?

Hello everyone so Im building flashswap arbitrage program and I got stuck and cant figure out why maybe anyone has a solution : this is the code I have for solidity // SPDX-License-Identifier: ...
Zura Gabichvadze's user avatar
0 votes
0 answers
81 views

Swap router addresses list

I'm looking to create a list of available swap routers addresses ( on ethereum and polygone mainet) from differente DEXes . Can you help ?. Many thanks.
adam mr's user avatar
  • 61
0 votes
0 answers
67 views

Pair Pool contract

Is it possible to use getReserves() to calculate the pair tokens individual liquidity in the pool? if so, how would you calculate it? Example Contract: https://bscscan.com/address/...
Mr. Smith's user avatar
0 votes
1 answer
61 views

Ethers.js BigNumber calculation incorrect

I'm trying to replicate the PancakeswapV2 getAmountOut function in Javascript using ethers.BigNumbers as follows (the code in the comment is ad-verbatum from PancakeswapLibrary) function getTokensOut(...
Peter K.'s user avatar
  • 113

1
2 3 4 5
7