1

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: "execution reverted: Pancake: LOCKED".

Does PancakeSwap not allow to do swaps after receiving the loan?

pabsdenn
  • 11
  • 1
  • Do you have a failed transaction hash? – Ismael Oct 18 '21 at 07:40
  • Same issue, with a forked hardhat-network on my localhost. I have seen similar stackexchange/stackoverflow/reddit threads with UniswapV2: LOCKED. It seems to happen on hardhat, Ganache but also the BSC testnet. Uniswap itself fingers a Ganache bug but it happens on all testnets, not just Ganache: https://docs.uniswap.org/protocol/V2/reference/smart-contracts/common-errors – blitter Oct 22 '21 at 12:11
  • None of these threads have a satisfying answer: https://github.com/Austin-Williams/uniswap-flash-swapper/issues/13 https://www.reddit.com/r/UniSwap/comments/iyumzi/uniswap_v2_locked/ https://www.reddit.com/r/UniSwap/comments/nho044/uniswap_v2_locked/ https://www.reddit.com/r/ethdev/comments/ld5vzg/dev_help_please_error_vm_exception_while/ https://ethereum.stackexchange.com/questions/87732/how-can-i-handle-the-uniswapv2-locked-revert-reason-when-calling-swapethforexac https://github.com/Uniswap/v2-sdk/issues/42 https://github.com/Uniswap/v2-periphery/issues/44 – blitter Oct 22 '21 at 12:12

0 Answers0