BEP-20 Burn Function help

Hello everyone! This is my second post as my first was in the introduction section. I hope to learn alot here. I am not a programmer im just trying to have some fun and understand whats makes smart contracts tick.

My buddy launched a smart contract on BSC. Through a website called coin tool.

I used the burn function on BSC scan. I tried burning 10m tokens. And it only pulled 2,161,000 from my wallet. And pulled the rest from the 13 other wallets to make up the 10 million. ( not to worry the 11 other holdrs are all people we know lol.
Its more of a just for fun project to see how these things work. And im interested in why this is happening and how we can fix it.

Thanks in advance!

Here is the contract on bsc scan

0x7B5d079227a849e0f9B8DA54C2EE5A2e165d8B32

I used the burn function on BSC scan.

Here are the burn functions

function burn(uint256 _value) public{
		_burn(msg.sender, _value);
	}

function _burn(address _who, uint256 _value) internal {
		require(_value <= _rOwned[_who]);
		_rOwned[_who] = _rOwned[_who].sub(_value);
		_tTotal = _tTotal.sub(_value);
		emit Transfer(_who, address(0), _value);
	}

Looking at your transactions I see 3 in specific

Each of these has you burning tokens? Are you 0x2676a677eacda4ae88f217eaf0cef88527e2b826?

I do not believe they are losing tokens when you burned because looking at one of the holders

He did not lose any tokens. He still has 2,000,000

Now when people transfer they do have a burn applied to their tokens as this is deflationary.

Yes that is my wallet. And the burn function is set to 0% for transactions.
And 1% goes to the contract.
But it still shows 0 going to the contract.
Thats fine.

The issue is when i burned 10 mill tokens it only pulled 2.1m from my wallet and pulled the remaiing 7m from the rest of the holders

Can you show me evidence of this happening?

Idk how to but we tested it with 3 of my friends i accessed the burn function through bscscan and burned the tokens and they lost tokens. And i screen shotted my balance before the 10m was burned and only 2.1m was subtracted from my address

Its also strange i sent 100m to the contract directly and now all the liquidty is gone. We went from 8k liquidty to $9

Please show me your transaction where this occured.

This is a link to my wallet on bsc scan

https://bscscan.com/token/0x7B5d079227a849e0f9B8DA54C2EE5A2e165d8B32?a=0x2676a677eacda4ae88f217eaf0cef88527e2b826

This is the link for where i used the burn function on bsc scan for 10m coins where only 2.1m was pulled from my wallet

https://bscscan.com/tx/0xbaacd8adef52161aecda74c1ee09ecf998897c36eb58c5cee6a57669c98fe3ba

And this is the link where i sent 100m tokens to the contract and the liquidity went missing after

https://bscscan.com/tx/0x0b02ef86ddf2760b800cea0b4243cd808fc04f2050164e9200aaef23a4592ad9

Thanks alot for your help!

This is a link to my wallet on bsc scan

https://bscscan.com/token/0x7B5d079227a849e0f9B8DA54C2EE5A2e165d8B32?a=0x2676a677eacda4ae88f217eaf0cef88527e2b826

This is the link for where i used the burn function on bsc scan for 10m coins where only 2.1m was pulled from my wallet

https://bscscan.com/tx/0xbaacd8adef52161aecda74c1ee09ecf998897c36eb58c5cee6a57669c98fe3ba

And this is the link where i sent 100m tokens to the contract and the liquidity went missing after

https://bscscan.com/tx/0x0b02ef86ddf2760b800cea0b4243cd808fc04f2050164e9200aaef23a4592ad9

Thanks alot for your help!

From your code it does not indicate why what you say is happening.
From the transactions it does not show what you are saying happens.

It would require me to load this contract and do my own tests to figure out what’s going on.

I believe what you say, but it will require a deep dive and specific testing to figure out why the _burn function is doing that in order to replicate it.

So it will be delayed. I suggest using rinkeby’s test net, deploy there, then play around with it and figure out why.

I see. ya it sounds like its above my capability lol i woudlnt know where to begin.

Thank you for your help!

Where you begin is by setting up a dev environment and creating tests.

I use VSCode with HardHat.

By creating tests you can see what’s going on with console.log().

Ok cool. As a quick fix can the burn function be completely removed from the contract?

Thanks!

Maybe? Do you require the burn or not? If you require the burn you should build it into it and test that it works before deploying.

I think were better off disabling it. Is there an easy way to do that

Also we want to remove the mint function on top of that.

Also my buddy is under the impression he cant make changes to the contract because it was deployed through a generator? Is that the case?

If you and your friend are new to developing smart contracts, please follow the tutorial

and then read the basic material

Contracts when deployed cannot have their code changed. You can get around this by using a proxy.

I really think you should start with a basic contract and build in the functionality you want.