Safemoon fork - automated liquidity fee issue

I deployed liquidity for a Safemoon fork, but unsure if the automated liquidity fee is being added properly to the pool

:computer: Environment
Remix 0.6.12

:memo:Details

Hello everyone,

I have a question in regards to the liquidity fee in my Safemoon fork.

I have created the liquidity as per Tsushima’s instructions using Pancake testnet router, but when I do a test transaction, I see the Liquidity Fee is deducted but this is not reflected on the pool created in Pancake, is that normal? Shouldn’t we be able to see or track the liquidity fee and see it added in the pool? I want to make sure that the liquidity fee is actually transferred correctly, I’m not sure how I can verify that!

This is the pair I created on my Safemoon fork: https://testnet.bscscan.com/address/0x72a2eed3072ede25eb77a18a0097e8b66b62551a

This is a test transaction where you can see that the fee was successfully deducted:

I’m new to blockchain, I hope you can help as I didn’t find enough resources covering this topic online.

Appreciate your support!

A % of transaction is taken as a fee and stored in the contract itself address(this). The contract balance is checked in _transfer with bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;

So the contract’s balance is swapped and “liquified” only when it reaches the value given by numTokensSellToAddToLiquidity

1 Like

Could you just set this to happen for every transaction instead of a certain value? Or make the value really low?

Yes just remove the numTokensSelll… variable

Literally just delete the 3 lines that numTokensSellToAddToLiquidity appears on, and the liquidity will happen on every transaction?

I was reading in this other post that even without the numTokensSellToAddToLiquidity lines, the SwapAndLiquify isn’t actually doing what it advertises

Just set the value to 0 :wink: … it still will not happen on any buy though, the (from != uniswapPair) prevents that

@0f0crypto will I only see the LP happen automatically if I reach the threshold of numTokensSellToAddToLiquidity?

Do I still need create Liquidity manually on PancakeSwap? Currently this is what I see for my Safemoon fork? I’d hope it would trigger automatically from the contract.

You have to make the initial supply (which also sets the price); this has nothing to do with swapAndLiquify or numTokensSellToAddToLiquidity … other than that swapAndLiquify cannot function without liquidity

@0f0crypto You have to make the initial supply - Manually?

other than that swapAndLiquify cannot function without liquidity - I’ve added the liquidity manually and still don’t see Liquidity added to the contract after each transaction. i.e. I only see the Liquidity I added manually.

Where can I see the current Liquidity and all the new transactions that should be added to the liquidity contract?

See initial supply here:

@Moki_Bas were you able to find an answer and track the fees added to the admin LP tokens? I also created the initial liquidity. Made a bunch of transactions but don’t see any more LP balance added to the admin’s address.