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