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
0answers
7 views

Pancakeswap Error when removing liquidity

(I'm willing to pay the one that is able to resolve the issue.) When I try to remove the liquidty for my custom token (KING), I get the following error message in the console: failed ...
0
votes
1answer
302 views

Understand price impact and liquidity in pancakeswap

I am trying to understand how the price impact and liquidity was calculated in uniswap or pancakeswap through the router contract? UNI Router: https://etherscan.io/address/...
1
vote
0answers
25 views

PancakeSwap Flash Swap Locked Issue

I created a smart contract for doing flash swaps on PancakeSwap and it is working fine. However, when I try to do swapExactTokensForTokens inside the pancakeCall I get the following error: "...
0
votes
1answer
212 views

PancakeSwap's "getAmountsOut" suggests infinite liquidity; UniSwap equivalent works as expected

TDLR: the same code that works with UniSwap is capable of returning an infinite "amountOut" when querying PancakeSwap router function "getAmountsOut". I'm using web3.py to call the ...
0
votes
1answer
39 views

How can I use pancakeswap router to charge tax on sell and buy

I am quite new to solidity, and I just created my first bep20 token. However, I am trying to implement a sell and buy tax using pancakeswap v2 router but I haven't been able to figure out how to ...
0
votes
1answer
385 views

Uniswap/PancakeSwap function swapExactTokensForETH produce error

I have code to call pancakeswap/uniswap router function to swap token. In my code, I have no problem calling swapExactETHforTokens when swapping WBNB to BUSD in BSC. my problem came when I tried ...
1
vote
1answer
417 views

how to get the reserves of all coin pairs at once on pancakeSwap

I am trying to query the pancakeSwap token pair contract for the reserves, and since I am trying to get it for 10000 tokens at a single time. My current solution is to basically loop over the 10000 ...
3
votes
1answer
4k views

An unlocked wallet is holding 100% of <PAIR> LP

I'm in https://poocoin.app/ to follow some charts of a meme token and found this message in red "An unlocked wallet is holding 100% of LP". By following the link I ended in a PancakeSwap LP ...
0
votes
0answers
21 views

get exact input/output amount pancake swap inside my contract

Pancake frontend using below method to get exact input and output amount for swap. public getOutputAmount(inputAmount: TokenAmount): [TokenAmount, Pair] { invariant(this.involvesToken(inputAmount....
0
votes
1answer
40 views

swapExactTokensForTokensSupportingFeeOnTransferTokens swap to BNB even if I set in path WBNB

I have a deployed contract with two basic swap functions. For the "buy" the contract swap WBNB-> Token For the "sell" it use the same function(...
0
votes
1answer
28 views

Wrong balance after swap

It is probably more related to BSC than ETH but it was swapped from ETH though. I made two transactions, one swap ETH for 15k Forever FOMO tokens (didn't check the wallet balance after). Then second ...
0
votes
0answers
77 views

I am going through pancakeswap factory contract and unable to understand the feeto ditribution fee

// if fee is on, mint liquidity equivalent to 8/25 of the growth in sqrt(k) function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) { address feeTo = IPancakeFactory(...
0
votes
0answers
357 views

bot sniping tokens on pancakeswap by watching the mempool

i seen a video on youtube of a sniper bot buying tokens as soon as the token launches on pancakeswap and gets in on the same block. i have tried to use another bot that buys the tokens when the pair ...
1
vote
1answer
960 views

How to send correct SwapExactEthForTokens params types on ethers/web3.js?

I need to know how to send correct paramaters / paramater types as in what does the parameter type has to be is it a hex number , a string ? help would be massively appreciated. Notes: 1)i cant set ...
0
votes
0answers
178 views

How to calculate OHCL for a pair traded on a DEX exchange?

I understand the inputs of OHLC, which are: [..] open, high, low, and close price for a given period. I also understand how to get a pair price using getReserves of a pair contract. It will give us ...
0
votes
2answers
162 views

Swap exact ETH for min tokens not accurate?

Just swapped some tokens on an AMM. AMM said minimum I will receive was around 282 tokens, I really recevied around 254 tokens. I had slippage at 12% as the token I was trading takes 10% reflections. ...
0
votes
0answers
102 views

How to sync liquidity pool on Pancakeswap with the BSC Testnet?

I'm using this PCS clone on the testnet: https://pancake.kiemtienonline360.com/#/swap And I'm trying to understand how an elastic token works. I'm looking at Gravitoken (https://bscscan.com/address/...
0
votes
0answers
15 views

Locking liquidity on pancake, trading fees

I want to lock the liquidity tokens (LP), so people trust more my token. My concern: So, when you hold the LP tokens in your wallet, you will get trading fees when people trade in your liquidity pool, ...
0
votes
0answers
9 views

Unable to display APR value while forking Pankcakeswap on testnet

I have Forked PancakeSwap on Bsc Testnet successfully. I have even added the Farm feature which works as well but the only problem is that the APR value doesn't get displayed on the FarmCard. I have ...
0
votes
1answer
976 views

Web3 Python token sell pancakeswap

I am trying to sell my tokens via python web3. But sometimes I get an error "execution reverted: Pancake: K". I researched this error and it has to do with the slippage but pancake swap docs ...
0
votes
0answers
22 views

Trying to get buy and sell fee for any BEP20/ERC20

I'm trying to understand how https://honeypot.is/?address=0x317a214777a04576b0287fc8abc98738b27815c8 works. I'll link all info from the BSC checker but is almost the same for ETH They are using a ...
0
votes
0answers
31 views

Uniswap doesn't work with my fee function - looking for some assistance

I'm really stumped on this one, and hoping someone might be able to point out my mistakes. I'm far from experienced with Solidity, but was unable to find any kind of solution online for this specific ...
0
votes
1answer
232 views

What happens when disconnect my wallet from Pancakeswap

Suppose I have a Binance Chain Wallet and I use that to connect to Pancakeswap or similar site to do staking and yield farming. I successfully set up everything and start yield farming. So far so good....
0
votes
0answers
93 views

Uniswap - Pancakeswap Sdk, Retrive Tokens Route

How can i retrive the Route for two tokens that have not a pair ? The following code uses two tokens that doesn't have a pair on uniswap, and during the execution encouter an error that is reported ...
0
votes
1answer
42 views

Understanding Deployment and contract design for BSC and pancakeswap

I understand that for the Ethereum Mainnet you need to create an ERC20 Token and for BSC you need a BEP20 Token. Let's say I want to create a simple smart contract and deploy it on Pancakeswap. In ...
0
votes
0answers
16 views

How to check if swap was successful?

This is a part of my payable function that is causing a problem. What happens is we receive Eth and swap it to a specific token. It works great in testnet. But on mainnet the "require" check ...
0
votes
1answer
2k views

Token Price from pancakeswap

Actually i was wondering how to retrive the price of a low cap token from pancakeswap without having to use sites like poocoin/dextools directly. I understood this, U can use the pancakeswap api here,...
0
votes
0answers
13 views

How to test in local, a contract if call an AMM contract?

I'm trying to test a smart contract but i have inside of my contract a call to PancakeSwap and i would like to test it, but i dont find what is the good way to do it: i have to mock router´s contract?...
0
votes
0answers
13 views

Failed tx/swap, 5 UNI in limbo, no Transfer Event Emitted. How to get UNI unstuck?

I attempted to swap 5 UNI for 40something SHI3lD. Tx failed, execution reverted but UNI wasnt sent back. 2nd Tx: 5 UNI for 41SHI3LD was successful. But I thought the 2nd would use the missing 5 UNI ...
0
votes
3answers
2k views

Call swapExactETHForTokens from contract and pay with contract balance

I am starting to learn solidity so this is probably a very basic question, but I couldn't find enough clarification only. My goal is to purchase a token on PancakeSwap/UniSwap using the ETH balance of ...
0
votes
0answers
40 views

The method 'debug_traceTransaction' does not exist / is not available. Remix in BSC test net

I deployed with Remix a contract on BSC testnet successfully. I have tried to use the remix debugger with a failed transaction (swap in pancakeswap) but I get the following error message in Remix: ...
0
votes
1answer
105 views

swapExactETHForTokens function execution

Please, help me. I try to do swapExactETHForTokens function from PancakeSwap Router contract. It's my code: def swap_exact_eth(router_contract_sample, token_contract, ...
0
votes
0answers
35 views

Why is my transaction Failed - BSC Web3 Python

I tried to execute this code below, It went through but it failed after 20 seconds. https://bscscan.com/tx/0x8da9fbde14a5252a6c8f037ad39fa0db69e77b93990fe7f65d2c305dd208cd99 Can someone Please help me ...
0
votes
0answers
17 views

How can I get this mapping function in an interface? [duplicate]

I have this mapping in a smart contract: mapping (uint256 => mapping (address => UserInfo)) public userInfo; I want to call this in a interface like function view returns: Can someone tell me ...
1
vote
1answer
153 views

Pancake Swap Factory smart contract error

I am using web3js to call PancakeFactory v2 contract (bscscan): contract address: 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73 Anytime I want to call any function present in the contract I end up with ...
0
votes
1answer
171 views

How to deal with liquidity for a BEP-20 token?

I've released a few BEP-20 tokens so far and some of them have been quite successful at launch but then suffer from lack of perpetual marketing, my team and I are dealing with this challenge. However, ...
0
votes
1answer
1k views

How to conduct a flash loan on PancakeSwap?

Apparently it's possible to take a flash loan on PancakeSwap, being that it's a fork of Uniswap. However, I haven't found any examples anywhere of a flash loan on PancakeSwap, nor do the docs mention ...
0
votes
0answers
26 views

Pancakeswap Liquidity error on Testnet

I am trying to add liquidity on pcs testnet. Here is the code snippet: function _addLiquidity() payable public { uint256 _amountToken = balanceOf(address(this))...
0
votes
1answer
55 views

Setting the value of AmountOutIn

I have been running this small script to buy through the PCS router contract and as it works, the slippage is set to 0. I need to know how to find the value and what it expects so that i can set ...
0
votes
1answer
33 views

I accidently send unrequited Token to Pancakeswap Pool. My Tokens liquidity stolen

I am an owner of bep20 token and locked the liquidity with mudra locker. I accidentally send token from outside to pancakeswap pair address and 2k dolar WBNB transferred to an unknown wallet. My ...
0
votes
2answers
56 views

Send lp tokens to burn address

is there any repo or links where i can learn how to burn lp tokens. If someone added liquidity i want the contract itself to burn the lp tokens instead of sending it to user.
0
votes
0answers
17 views

Addliquidity function

If I want only owner can add liquidity no one else. Is this possible using only owner modifier in addliquidty function or is there any other way?
0
votes
0answers
44 views

How to send bnb programmatically in different scenarios

I am trying to add a price pool in bnb for my token and I did the following code: function swap(uint256 amount, address destination) private { uint256 bnbBalance = address(this).balance; ...
0
votes
1answer
79 views

Way to tackle arbitrage bots

I deployed a token ABC and created a liquidity pool in pancakeswap with pair ABC/BNB. But arbitraged bots attacked and stole a large sum of money. How to stop this and why is this occurring? I think ...
0
votes
0answers
47 views

SwapExactTokensForETH is called instead of TransferFrom

I developed a smart contract which calls PCS router V2 to get some data, however I don't know what I did to change the way it works and now when I interact with it via PancakeSwap the method called is ...
0
votes
1answer
46 views

What does to way multi approval transaction?

I am going to running swap transactions. At first, we are going to running an approval transaction. And then we are going to running a swap transaction. These repeat. I made the transaction data. ...
0
votes
1answer
33 views

Delegate Call Reverting for Unknown Reason

I'm trying to make a delegatecall to the PancakeSwap Routerv2 from my contract, to perform a swap, but for some reason it's not working. Here's my code: // pancakeswap router address address public ...
0
votes
1answer
280 views

Retrieving APY from PancakeSwap CAKE auto-compounding pool

Looking at the contract from the CAKE auto-compounding pool (https://bscscan.com/address/0xa80240Eb5d7E05d3F250cF000eEc0891d00b51CC#code), it appears there is no direct call for calculating the ...
1
vote
1answer
156 views

How to differentiate AddLiquidity from SwapExactTokensForETH on contract function execution on UniSwap fork

we are trying to process a fee when tokens are "Sold" on PancakeSwap. For now "Sold" is when the user swaps their tokens for BNB. Initially our current logic would also charge a ...