# PSA Regarding SafeMoon Forks on PancakeSwap - Transfers not working? Read This!

**URL:** <https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692>\
**Category:** Support\
**Tags:** safemoon\
**Created:** [May 2, 2021, 12:39pm UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692 "2021-05-02T12:39:47Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 11, 2021, 2:52am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/22 "2021-05-11T02:52:58Z")

</div>

I think you would have to, unless there is a way to tell the new Router and Dex what the existing Pair is. Is there a way to do that for Uni/Pancake/Sushi?

---

<div class="post-metadata">

**Author:** ![FreezyEx](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/freezyex/32/5498_2.png) [@FreezyEx](https://forum.openzeppelin.com/u/FreezyEx)\
**Post date:** [May 11, 2021, 10:39am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/23 "2021-05-11T10:39:11Z")

</div>

I didn’t search yet but I will check

---

<div class="post-metadata">

**Author:** ![AlexSum](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/alexsum/32/5606_2.png) [@AlexSum](https://forum.openzeppelin.com/u/AlexSum)\
**Post date:** [May 11, 2021, 6:18pm UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/24 "2021-05-11T18:18:38Z")

</div>

hello, I had the same problem with the liquidity lock on pancake v2 as you did. Can you tell me how to solve the problem? I didn’t click renounceOwnership and swapAndLiquifyEnabled - it shows false.

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 11, 2021, 7:37pm UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/25 "2021-05-11T19:37:23Z")

</div>

Check your maxTxAmount. If you still have ownership, set the MaxTxPercent to 100 using function “setMaxTxPercent”

---

<div class="post-metadata">

**Author:** ![AlexSum](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/alexsum/32/5606_2.png) [@AlexSum](https://forum.openzeppelin.com/u/AlexSum)\
**Post date:** [May 11, 2021, 8:57pm UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/26 "2021-05-11T20:57:15Z")

</div>

please tell me what is this value in uint256?

---

<div class="post-metadata">

**Author:** ![AlexSum](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/alexsum/32/5606_2.png) [@AlexSum](https://forum.openzeppelin.com/u/AlexSum)\
**Post date:** [May 12, 2021, 1:55am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/27 "2021-05-12T01:55:35Z")

</div>

I enter 100, press write and I get an error in metamask:  
ALERT: Transaction Error. Exception thrown in contract code.

I also see the following text:

 ![1](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/d/dd3f52d8dad32a05c79c6c6ba9887d789964de63.png)

> **[Droopy Dog (DROOPY) Token Tracker | BscScan](https://bscscan.com/token/0xad62706b7092e825c468b95cb3ff5ef4474ee48c)**
>
> Droopy Dog (DROOPY) Token Tracker on BscScan shows the price of the Token $0.00, total supply 2,000,000,000, number of holders 3 and updated information of the token. The token tracker page also shows the analytics and historical data.

---

<div class="post-metadata">

**Author:** ![AlexSum](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/alexsum/32/5606_2.png) [@AlexSum](https://forum.openzeppelin.com/u/AlexSum)\
**Post date:** [May 12, 2021, 1:10pm UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/28 "2021-05-12T13:10:23Z")

</div>

I figured out the error. In the beginning, I applied the transferOwnership function to my other address, so I couldn’t interact with the contract.

I tried putting 100 as you said, but the contract has a maximum limit of 10. I also put setTaxFeePercent to 0 and setLiquidityFeePercent to 0 - but that didn’t help. I do not know what to do next.

![2](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/d/d081456471abed91dfd4fee14e877ead277fcfa0.png)

---

<div class="post-metadata">

**Author:** ![bnwater](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/bnwater/32/10390_2.png) [@bnwater](https://forum.openzeppelin.com/u/bnwater)\
**Post date:** [May 13, 2021, 1:14am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/29 "2021-05-13T01:14:57Z")

</div>

Were you able to test this in testnet? I’m doing the safemoon contract but i can’t add liquidity in testnet to BNB/SAFEMOON. I can create the pair but can’t add liquidity.

Now SAFEMOON has this feature where if the contract balance goes above`numTokensSellToAddToLiquidity` which is `500000 * 10 **6 * 10** 9` it will swap for ETH (BNB) and then provide more liquidity. This is a feature that is important so i tested it and added `>500000 * 10 **6 * 10** 9` into the contract and then it gave me and error that there wasn’t enough liquidity.

I assume this is because it was never added after the contract deployed. Although, in testnet, i can’t add liquidity even after i deploy with the `addLiquidityETH` function.

---

<div class="post-metadata">

**Author:** ![crypto.net](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/crypto.net/32/5775_2.png) [@crypto.net](https://forum.openzeppelin.com/u/crypto.net)\
**Post date:** [May 14, 2021, 7:36am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/30 "2021-05-14T07:36:01Z")

</div>

Bro, Can you please show me how dod you do that? Thanks in advance

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 14, 2021, 8:33am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/31 "2021-05-14T08:33:09Z")

</div>

The only errors that apply is maxTxPercent and SwapAndLiquify.

maxTxPercent is the max % you can transfer in one transaction. Set to 100.

Set SwapAndLiquify to False.

---

<div class="post-metadata">

**Author:** ![crypto.net](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/crypto.net/32/5775_2.png) [@crypto.net](https://forum.openzeppelin.com/u/crypto.net)\
**Post date:** [May 14, 2021, 9:12am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/32 "2021-05-14T09:12:40Z")

</div>

Hi Tsuchima

Can you make the address changeable for future versions anyway, please?  
WHat is your advice?

Thanks

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 14, 2021, 9:18am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/33 "2021-05-14T09:18:05Z")

</div>

My advice is to build a function that allows you to change that. [How to fix Pancakeswap's Router address in Safemoon](https://forum.openzeppelin.com/t/how-to-fix-pancakeswaps-router-address-in-safemoon/8113)

---

<div class="post-metadata">

**Author:** ![crypto.net](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/crypto.net/32/5775_2.png) [@crypto.net](https://forum.openzeppelin.com/u/crypto.net)\
**Post date:** [May 14, 2021, 9:22am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/34 "2021-05-14T09:22:30Z")

</div>

Have you tested that function please? does it work properly?

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 14, 2021, 9:26am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/35 "2021-05-14T09:26:43Z")

</div>

It is a setter function, there isn’t much to it. Please test the function in your own contracts and see if it works for you.

---

<div class="post-metadata">

**Author:** ![crypto.net](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/crypto.net/32/5775_2.png) [@crypto.net](https://forum.openzeppelin.com/u/crypto.net)\
**Post date:** [May 14, 2021, 9:29am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/36 "2021-05-14T09:29:52Z")

</div>

Okay, but can you please tell me exactly where I should add that function on the smart contract as I am new here?

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 14, 2021, 9:32am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/37 "2021-05-14T09:32:02Z")

</div>

No I cannot tell you exactly. You just need to add the function somewhere in your smart contract that makes sense.

If you are new here please follow the guide [OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat](https://forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-hardhat/3580)

This should get you up to speed.

Learning Resources:

> [@Solidity learning resources](https://forum.openzeppelin.com/t/solidity-learning-resources/4242):
>
> The following is a list of Solidity learning resources. This is a wiki post that you can edit and add to. OpenZeppelin Learn Guides [https://docs.openzeppelin.com/learn/](https://docs.openzeppelin.com/learn/)Play [Ethernaut](https://ethernaut.openzeppelin.com/) + [Ethernaut Community Solutions](https://forum.openzeppelin.com/t/ethernaut-community-solutions/561)[Damn Vulnerable DeFi](https://www.damnvulnerabledefi.xyz/) + [Community Solutions to Damn Vulnerable DeFi](https://forum.openzeppelin.com/t/community-solutions-to-damn-vulnerable-defi/4744)books Read Security Audits Best practices [https://consensys.github.io/smart-contract-best-practices/](https://consensys.github.io/smart-contract-best-practices/)Books Articles/Posts [What are your top three recommendations for a new developer in the spa…](https://forum.openzeppelin.com/t/what-are-your-top-three-recommendations-for-a-new-developer-in-the-space/862)

---

<div class="post-metadata">

**Author:** ![crypto.net](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/crypto.net/32/5775_2.png) [@crypto.net](https://forum.openzeppelin.com/u/crypto.net)\
**Post date:** [May 14, 2021, 9:37am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/38 "2021-05-14T09:37:38Z")

</div>

Thank you so much, very useful resources.  
sorry for bother you but another question, now my LP is stuck on Panceke V2, which I used v1 router in my SC, as well as there were few successful transaction, but now I cant remove the LP. do you have any idea how to remove it anyway?  
Pancake support just do not reply :

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 14, 2021, 9:39am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/39 "2021-05-14T09:39:33Z")

</div>

Please refer to

> [@PSA Regarding SafeMoon Forks on PancakeSwap - Transfers not working? Read This!](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692):
>
> Recently PancakeSwap has migrated to V2. You can migrate to V2 following the guide. [https://medium.com/beefyfinance/pancakeswap-migration-2d599e262900](https://medium.com/beefyfinance/pancakeswap-migration-2d599e262900) The V2 router is now [https://bscscan.com/address/0x10ed43c718714eb63d5aa57b78b54704e256024e](https://bscscan.com/address/0x10ed43c718714eb63d5aa57b78b54704e256024e) However if you are already on V1, you will want to stay on V1 if possible because there is a problem with SafeMoon code in that the V1 router for PancakeSwap was hardcoded in. Line 758 [https://bscscan.com/address/0x8076c74c5e3f5852037f31ff0093eeb8c8add…](https://bscscan.com/address/0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3#code)

It’s either SwapAndLiquify needs to be set to False or MaxTxPercent needs to be set to 100.

If you have rejected ownership then you likely cannot get the liquidity back.

---

<div class="post-metadata">

**Author:** ![crypto.net](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/crypto.net/32/5775_2.png) [@crypto.net](https://forum.openzeppelin.com/u/crypto.net)\
**Post date:** [May 14, 2021, 9:55am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/40 "2021-05-14T09:55:36Z")

</div>

You mean the ownership verification on BSCscan? if I get that ownership I can change the code `swapAndLiquifyEnabled` to false?

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 14, 2021, 9:57am UTC](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692/41 "2021-05-14T09:57:31Z")

</div>

Yes, that is exactly what it means.

[Previous page](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692.md?page=1)

[Next page](https://forum.openzeppelin.com/t/psa-regarding-safemoon-forks-on-pancakeswap-transfers-not-working-read-this/7692.md?page=3)
