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.
312
questions
0
votes
0
answers
9
views
Swapping tokens from pancakeswap
I am having trouble executing the swap on PancakeSwap. I always encounter this error. Can someone please check my buy function and tell me if anything is missing?
ERROR - Unexpected error during token ...
1
vote
1
answer
78
views
How to swap a token on UniswapV3 in python
Question:
I've been able to successfully write scripts for swapping tokens on Uniswap V2, but I'm facing challenges when trying to swap tokens on Uniswap/PancakeSwap V3. Specifically, I am trying to ...
0
votes
0
answers
20
views
Problem with calling swapExactTokensForETH
Hopefully someone can point me in the right direction. I'm trying to implement a function that calls swapExactTokensForETH on Pancake Swap.
I have successfully implemented something that calls ...
0
votes
1
answer
18
views
Newb mistake and question
So I withdrew some Tether USDT and sent it to my Pancake Swap account but I can’t see it there. I looked on Etherscan and saw the tokens in my wallet but I have no idea how to retrieve them. I’m ...
0
votes
0
answers
17
views
I am trying to make the fork of Pancakeswap and I am currently being stuck on generating my own token pairs address for my factory and init_hash_code
As the title said, I have my own implementations of cake token, factory and router. As far as I got it, the factory and init_code_hash are correct. The issue is that even after changing them in ...
0
votes
0
answers
26
views
Why are taxes not being deducted or received in the FEE_RECIEVER variable in my Solidity smart contract?
I'm working on a Solidity v0.8.20 smart contract with buy/sell tax features. Despite testing on BSC Testnet (PancakeSwap) and Sepolia Testnet (SourceHat), the taxes aren't being deducted or sent to ...
0
votes
0
answers
53
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 ...
0
votes
1
answer
52
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 ...
0
votes
0
answers
10
views
Copi tokens missing from my metamask wallet [duplicate]
I had 10000 Copi tokens in my Metamask wallet and they are all transferred to 'PancakeSwap V2: COPI 5' and can see a transaction history. But I didn't initiate this. Could someone help me understand ...
0
votes
1
answer
26
views
I would like to know if with this code after deploy on REMIX IDE,it is possible swap my token in bnb,usdt,btc,eth and sol on Uniswap and Pancakeswap
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable....
0
votes
1
answer
50
views
I want to clone pancakeSwap V3-core-contracts. i need deployment step to run pancakeSwap clone succcessfully. github deployments not working properly
Add Key in .env file. It's a private key of the account that will deploy the contracts and should be gitignored.
bscTestnet KEY_TESTNET or bsc KEY_MAINNET
add ETHERSCAN_API_KEY in .env file. It's an ...
0
votes
0
answers
33
views
Lost my coins after bought on pancakeswap
I have buy IPTOKEN token. The transition is succesful. But after receive on my wallet coins disapier from my wallet.
Anyone can help me.
This is trasnsaction
https://bscscan.com/tx/...
0
votes
0
answers
81
views
Can't add liquidity to my token
I created a token and now I need to add liquidity to it. Here is a code of my contract:
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() ...
0
votes
1
answer
38
views
Swapped from Cake to Catamoto on Pancakeswap and lost my tokens
Here is the transaction.. I lost Anyone know how I can get them back/
From:
0x2440B5b7cF4619FD98cd43CeCa9039E3d9E6b0c5
Interacted With (To):
0x13f4EA83D0bd40E75C8222255bc855a974568Dd4 (PancakeSwap: ...
0
votes
0
answers
45
views
addLiquidityETH reverts even after token approval
I am trying to deploy liquidity on a testnet using this code. However, it reverts with no explanation given other than that error. According to the UniswapV2 docs, I am using the correct router (...
0
votes
1
answer
74
views
Having trouble adding liquidity to Pancakeswap
I've added tokens to pancakeswap before, and it was easy, but now it doesnt work anymore... perhaps I am doing something really dumb, but I can't seem to figure it out and could use a little help.
I ...
0
votes
0
answers
21
views
Does removing liquidity from a staked pancakeswap lp unstake it?
If I remove all the liquidity from a PancakeSwap V3 LP, I know it also collect the fees earned.
But if that LP is staked in a farm, will removing the liquidity automatically unstake it and harvest the ...
1
vote
1
answer
55
views
Not getting every transaction and unable to parse data
The following JS code uses a basic BNB Smart Chain endpoint from QuickNode and ethers.js v6.3.0 to parse all transactions' data that is sent to PancakeSwap address.
const address = '...
0
votes
0
answers
200
views
Swap on Pancake swap V3 using web3.py
How can I programatically swap this transaction (https://bscscan.com/tx/0xeb82366f808d194bcae4ede724bb0dbaeebc431fe492ff70b1c3c7a5d5762d47) using web3.py?
When swapped from their official webgui they ...
0
votes
1
answer
28
views
Transaction fees too high for swapExactETHForTokens
I've written a script to buy tokens in javascript. The issue is I keep getting an error showing abnormally high transaction fees. This is my script
const buyFunction = this.pancakeContract.methods....
0
votes
0
answers
61
views
Swapping tokens with code
how do I swap tokens using java script in pancake swap v3 I'm looking for source code but not finding it anywhere
1
vote
1
answer
2k
views
Fail with errors 'Pancake: TRANSFER_FAILED'
https://bscscan.com/tx/0x41fcd1893c7500ae2ace0ab195bb0c9bbfcfefd05ad794707a65749d358da3df. I don't undestand why my transaction is failed. I fixed my fee limit at 1.500.000 and only 10% was used. If ...
0
votes
0
answers
79
views
Get historical price data from dex on new chain
I need to get historical price data from a uniswap clone on a brand new blockchain. I cant use bitquery or similar api as it doesnt support this chain.
How could I go about it getting it directly from ...
1
vote
1
answer
49
views
I'm having trouble sending token1 to a pair address and receiving token0
I am trying to make a swap directly via the pair address without a router.
I'm trying to get token0 by sending token1.
The amount of token0 I will receive does not matter, but when I run the node.js ...
0
votes
1
answer
664
views
Getting pancake swap's v3 price via eth_call
I need to get price of PCS v3 pairs. I see that Pancakeswap makes call to https://nodes.pancakeswap.info/
[
{
"data": "...",
"to": "..."
},
"....
0
votes
1
answer
108
views
Getting EVM error when trying to call a basic contract using Javascript
I am a complete beginner when it comes to writing javascript so bear with me.
I want to write a basic .js file that I can run that will be able to sell something for BNB (in this case a very small ...
0
votes
1
answer
195
views
Swap BNB for CAKE using web3.js on pancakeswap
I'm trying to implement token swap in nodejs using web3 library on the pancakeswap router. I'm able to perform this swap using the pancakeswap webpage but unable to do this programmatically. I'm using ...
0
votes
0
answers
133
views
Pancake swap v3 exactInputSingle fails without reason
Im trying to make swap on PancakeSwapRouterV3(0x13f4EA83D0bd40E75C8222255bc855a974568Dd4) with web3js using method exactInputSingle.
With v2 version i could do this with swapExactTokensForETH method ...
0
votes
0
answers
93
views
Pancakeswap V3 flash loan, receiving F0 error even though the flash loan has been repaid
I'm trying to finish up the callback function for a pancake swap flash loan. Everything is now working however for some reason the flash function fails due to an F0 error (ie. not paid the loan back). ...
0
votes
1
answer
61
views
I have a few questions about my token
Recently I have created a meme token based on the Gotta Lock In meme.
When I deployed it to PancakeSwap, I deposited 19.000.000 $LOCKIN alongside with ~15$ of BNB into the liquidity pool.
However once ...
0
votes
0
answers
85
views
PancakeSwapV2 router "getAmountsOut" function returns wrong value
I'm struggling with "getAmountsOut" function, which works kinda fine for BNB/CAKE or CAKE/BNB. But it in some cases it just returns straight wrong values.
Code:
public async Task<decimal&...
0
votes
1
answer
71
views
Place a Bear Bet via Pancakeswap Predictions
I'm pretty new to using Python to interact with smart contracts. I've been trying to make a short and simple python script that will interact with Pancakeswap's prediction market contract and place a ...
1
vote
2
answers
403
views
Nethereum: any pancakeswap contract function call results in "execution_reverted", all transactions fail with same error
I'm completely new to web3, and I do realise that there is small portion of information on the web3 for developers, especially when it comes to debugging and issue solving.
My main goal is just to ...
0
votes
1
answer
102
views
Transaction on BSC gets reverted due to Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'
I'm not able to make a swap using the contract for some reason (I'm sure that I'm missing something fundamental). Here is the code.
https://bscscan.com/address/...
0
votes
0
answers
186
views
How to swap tonkens in pancakeSwap using nodeJS
I need to write a script to swap tokens in PancakeSwap using NodeJS. I'm new to web3 development, so maybe I'm misunderstanding some of what I'm seeing in the various docs.
I know PancakeSwap doesn't ...
0
votes
0
answers
45
views
Mainnet-fork has different result than mainnet
I'm currently forking Binance Smart Chain using Brownie and Python.
The idea is to use the forked network to test if new BEP20 tokens can be traded (buy and sell) using pancakeswap, and check if the ...
0
votes
0
answers
30
views
getting reverted with reason string 'SWAP_CALL_FAILED' while trying back sell unitymeta Token
const unityMeta = '0xca861e289f04cB9C67fd6b87ca7EAFa59192f164';
const WBNB = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c';
const params = {
sellToken: unityMeta,
buyToken: WBNB,
...
0
votes
1
answer
285
views
getAmountIn equivalent of uniswapV3 or how to calculate it?
I was exploring uniswap V3 router, quoter and factory contracts, but it doesn't have getAmountIn function to calculate the minimum amount I must input to get the desired amount. On some thread, I ...
2
votes
0
answers
35
views
Uniswap/PancakeSwap automatically manage tokens with different amount of decimals (swap)?
I'm getting number results that do not make sense for me, when executing swap functions with USDT (in Uniswap V2 and PancakeSwap V2), and I noticed that USDT Token has only 6 decimals, instead of 18 (...
0
votes
0
answers
59
views
Tips for creating a liquidity pool in Pancake Swap
dear friends
I need the advice of my dear professional friends on this site in several areas, please advise and guide me in all areas.
The first part is, what is the best strategy for financing a ...
0
votes
0
answers
55
views
Can you tell me, why addLiquidityETH is not working?
Can you tell me, why addLiquidityETH is not working? I'm trying to call her through etherscan.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/...
1
vote
0
answers
559
views
How to programmatically auto-add liquidity on transaction (ERC20, BEP20), (Uniswap Pancakeswap), (V2, V3)
I've perused the liquidity docs on the relevant DEXes Uniswap and Pancakeswap, as well as on Github. I've found no good tutorials outlining how to add liquidity by code. It's like trying to complete a ...
0
votes
2
answers
173
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:...
0
votes
1
answer
528
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 ...
1
vote
0
answers
338
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 = [...
1
vote
0
answers
136
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?...
1
vote
1
answer
538
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 ...
1
vote
0
answers
316
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 ...
0
votes
2
answers
204
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/...
0
votes
1
answer
557
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 ...