Serious issue trying to add initial liquidity to a bep20 token on Pancakeswap

I have created an deployed my token, it worked exactly as intended and I’ve set everything up to launch the darn thing. The project doesn’t really do much, it’s intended only to be a true deflationary currency. I’m just tired of all the scams and BS in the coins these days so I wanted to create a tradable asset that’s ironic and gives a people a serious chance who missed the all the come ups from other coins.

That all being said. I’ve run into an issue, I created a coin with autoburn so once it’s launched and on the market I can forget about it and just trade my share of coins away over the years. I think that auto burn might be causing an issue with pancakeswap and I cannot get help anywhere so far on how to fix this.

I approved the right for the router to use the wallets supply on metamask, and after that I attempted to create the initial supply.
This is where the problem arises, I click add supply, it pops up the normal window that says “you are creating a pool”, after that I click “create pool & supply” from there it should send a confirmation approval to metamask, however it fails this instantly every single time and reverts immediately back to the “you are creating a pool” prompt.

So far I have tried the following fixes:
• Verified on BSCScan.com
• Tried trust wallet, and tried on two other metamasks.
• I have tried VPNs
• I have tried from mobile
• I have tried on brave, firefox, and chrome
• I have changed slippage anywhere from 1% to 49%
• I have waited 5 days just incase it was a pancakeswap issue
• I have tried every variable possible of initial price

I’m at a loss for why it isn’t working.

Anyway, here’s my code, the link to the contract on BSCScan, and the transaction for approval to spend the coin from pancake swap to their router.

contract on BSCScan

Transaction for approval

pragma solidity ^0.8.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol";


contract ScamCoin is ERC20 {

//suposed to act as a stopping point for minimum total supply
uint256 private _minimumSupply = 10000000 * (10 ** 18);

/**
 * @dev Constructor that gives msg.sender all of existing tokens.
 */
constructor () public ERC20("ScamCoin", "SCAM") {
    _mint(msg.sender, 500000000000000 * (10 ** uint256(decimals())));
}

function transfer(address to, uint256 amount) public override returns (bool) {
    return super.transfer(to, _partialBurn(amount));
}

function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
    return super.transferFrom(from, to, _partialBurn(amount));
}

function _partialBurn(uint256 amount) internal returns (uint256) {
    uint256 burnAmount = _calculateBurnAmount(amount);

    if (burnAmount > 0) {
        _burn(msg.sender, burnAmount);
    }

    return amount -(burnAmount);
}

function _calculateBurnAmount(uint256 amount) internal view returns (uint256) {
    uint256 burnAmount = 0;

   //supposed to calculate the burn amount?
    if (totalSupply() > _minimumSupply) {
        burnAmount = amount / 10;
        uint256 availableBurn = totalSupply() -(_minimumSupply);
        if (burnAmount > availableBurn) {
            burnAmount = availableBurn;
        }
    }

    return burnAmount;
}

}

The first step would be to comment this out in your code and see if it works. The solution is probably to exclude the burn when providing liquidity.

Narrow down what's broken. You can test on https://pancake.kiemtienonline360.com/#/swap using router address 0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3

I’m having this same issue… did you ever find a resolution? I’ve tried everything you mentioned… I’ve been searching everywhere for 2 days for an answer.

Being that the contract is already up and running I’ll have to create a new contract with that change correct?

Tbh, I I’m fairly new to solidity so I don’t even know what variable I would add to keep it from burning on liquidity transactions.

Here’s a whole thread on the issue and what I’ve tried so far. Figured it might help ya.