Hello guys, can someone tell me how to set the burn function to 100% on any sold tx at uniswap?

Nov 4, 2020, 11:48 PM
Like if someone sells their tokens, the contract automatically burns all tokens sold
And reduces the tottal supply
Nov 4, 2020, 11:49 PM
if (_receiver == UNISWAP_PAIR_ADRESS) {
_burn(_sender , _amount);
Return true;
}
This would also burn all tokens you try to put into the liquidity pool btw, there is no other way to it though.
If anyone is working on a cool project they need support with, contact me :)
Nov 5, 2020, 7:51 AM
Isn't there any chance if hypothetically someone sell 10tokens and he get his ether for it, and after that the contract burns the tokens the guy had sold
But only on selling
Nov 5, 2020, 7:51 AM
Yes but then also if someone put liquidity in and withdrew it
Noo I mean then also if someone put liquidity in the contract
Then it would get burned
And the function would fa
So that's not possible
Nov 5, 2020, 7:52 AM
Wtf even if the liquidity is locked?
Nov 5, 2020, 7:52 AM
Oh wait actually
Which contract is used to add liquidity?
Nov 5, 2020, 7:53 AM
The one from core
Nov 5, 2020, 7:53 AM
But you cannot burn tokens that are being sold, because then the check on the pair contract would fail and the swap would throw
Because the pair contracts checks if it got enough tokens after every swap, and if there are not enough tokens, the swap fails
So you cannot burn tokens that are sold and still make the swap happen
Nov 5, 2020, 7:54 AM
I knew... Shit
Nov 5, 2020, 7:54 AM
You would also screw with the price and the liquidity holder's balance
Nov 5, 2020, 7:54 AM

© 2024 Draquery.com All rights reserved.