Skip to main content

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
1 vote
1 answer
1k views

Swap for tokens with Bot Protection Enabled (BpEnabled)

!!Apology in advance for such verbosity!! Background I came across this BEP20 token (0xcc7a91413769891de2e9ebbfc96d2eb1874b5760) which had sufficient Liquidity added at TGE but bot protection was ...
Amith Kumar's user avatar
2 votes
4 answers
10k 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/...
Aadhavan G S's user avatar
8 votes
1 answer
12k views

How to create a liquidity pool by code?

I've seen some scams that : In deploy stage all tokens goes to the owner. The owner go to PancakeSwap and create a liquidity pool using some BNB he have and all supply of tokens. After some time the ...
Magno C's user avatar
  • 345
4 votes
2 answers
3k views

How to understand the Swap event payload?

I am trying to wrap my head around pancakeswap Swap event (which should be equivalent to uniswap). Here is an example transaction: 0xd809e359a4037eb5e2617769b93f8b7fa1e708c37019b02933e1845e33c99884 ...
Gajus's user avatar
  • 713
4 votes
3 answers
5k views

understanding the Swap function in pancakeSwap Pair contract

Hi i am trying to understand the reasoning behind the swap function of a pancake pair on the pancakeSwap DEX and the checks it does. this is the function : require(amount0Out > 0 || amount1Out > ...
Kaki Master Of Time's user avatar
4 votes
1 answer
2k views

Removing LP from Uniswap/Pancake using seth and removeLiquidityWithPermit(). How is the correct hash for the permission signing calculated?

I'm trying to figure out how I can remove LPs from Uniswap/Pancakeswap using the function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 ...
bleedr's user avatar
  • 41
2 votes
1 answer
751 views

What's the relationship between LP reserves and Swap rate?

This transaction transaction describes Swap event: amount0_in=14067900000000 amount1_out=393017164305296368 This means that the effective trade rate is: trade_rate=round(amount1_out/amount0_in)=27,...
Gajus's user avatar
  • 713
1 vote
1 answer
483 views

Is this smart contract code malicious?

I was looking at the code here: https://0bin.net/paste/Y0Vas-gl#qPO+In23eGFEftdhXP7hWqIkI2xfyqxEbyjL-beMsLH which is shown in a tutorial about flash loans: https://www.youtube.com/watch?v=o9o141Luzzo&...
Joan Venge's user avatar
1 vote
2 answers
3k views

Decoding transaction logs of Pancakeswap's router by web3.py

I saw this question, but there are contracts like the pcs's router which have no event defined in the contract, see this transaction for example. How can I decode the logs in such transactions?
iraj jelodari's user avatar
1 vote
1 answer
5k views

Testing Token with Uniswap liquidity provisioning using hardhat

I'm attempting to fork Safemoon (or really NotSafeMoon), and use it as a vehicle to learn smart contract development. (I've got a substantial amount of what you might call "Web 2.0" dev ...
Abraham P's user avatar
  • 103
0 votes
1 answer
868 views

reverted with reason string 'ds-math-sub-underflow'

I am trying to add Liquidity to a locally deployed pancakeswap instance. When calling addLiquidity I get: ProviderError: Error: VM Exception while processing transaction: reverted with reason string '...
Totally Not A Robot's user avatar
0 votes
1 answer
510 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
1 answer
454 views

Set tokenA as token0 for UniswapV2 liquidity pair contract

Hello guys I need some help! Could someone explain me how to set the token order (token0 / token1) of a liquidity pair? I’m using UniswapsV2 - Factory contract. Currently when i create a pool with ...
DarthJedi's user avatar
  • 101
0 votes
0 answers
2k 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: ...
user2983041's user avatar
0 votes
0 answers
3k views

Noob Troubleshooting failed BSC transaction using ethers.js and Pancakeswap v2 router

How do i debug or troubleshoot this... I am going broke $0.07 at a time.. LOL The code approves WBNB on Pancakeswap and gives a transaction receipt. Then it fails the swapExactTokensForTokens when ...
LiveWire's user avatar
  • 763