Guys an address sent bnb manually to the liquidity pool before the add of liquidity and now it gives problems trying to add liquidity, is there a way to fix this?

Jun 29, 2021, 12:29 AM
Now there's 0 token and x bnb
Is there a way to fix the ratio back to 0 on the pair?
Jun 29, 2021, 12:31 AM
wtf I hope this is not a way to change the rate. What happens if someone send more tokens?
Jun 29, 2021, 7:45 AM
It is...
Jun 29, 2021, 7:53 AM
😳
not here
check group in bio
Jun 29, 2021, 8:34 AM
Sent y amount of tokens and call sync() on pair
Jun 29, 2021, 9:18 AM
I did
Jun 29, 2021, 9:18 AM
Or better, simply call skim()
Jun 29, 2021, 9:18 AM
I mean he did and then I did to make the ratio good
He also called sync
Jun 29, 2021, 9:18 AM
Aah then skim won't work
Jun 29, 2021, 9:19 AM
Yeah
Jun 29, 2021, 9:19 AM
Then send tokens, call mint and remove liquidity
Jun 29, 2021, 9:19 AM
why a token should have changeble name and symbol?πŸ˜…
Jun 29, 2021, 9:21 AM
a portion of the liquidity would go to pancake as fees locking me out of the lpπŸ˜…
I had someone I know that did that
Jun 29, 2021, 9:57 AM
Yeah I forgot thatπŸ˜…. So no, its not possible to reset the pair
You can adjust the k, but no reset once it is initialised
Jun 29, 2021, 9:59 AM
how?
calling mint?
Jun 29, 2021, 10:00 AM
Sending x tokens and y bnb to pair, then calling sync()
Jun 29, 2021, 10:00 AM
I did that
now the ratio is good
Jun 29, 2021, 10:00 AM
It will force sync the ratio with current balance
Jun 29, 2021, 10:01 AM
so in thiw way anyone can change a ratio?
or only the owner?
Jun 29, 2021, 10:01 AM
yeah, problem is that once you mint lp tokens for the first time it starts taking fees on each minting of lp tokens
so even if it successfully adds all the liquidity on dxsale a big portion of it will go to pancake as fees
Jun 29, 2021, 10:02 AM
Anyone with token and BNB
Jun 29, 2021, 10:02 AM
anyone guys...
be careful
Jun 29, 2021, 10:02 AM
shit ahah
Jun 29, 2021, 10:02 AM
first time I experienced this
https://bscscan.com/address/0x24d86dc4e75979e9b57861b7a0944cdf38d73de0 this is the address that sent bnb to the pair
Jun 29, 2021, 10:03 AM
It was fairly common on ether, tokens with pre created pair and no liquidity
Jun 29, 2021, 10:04 AM
he is poor ahah
Jun 29, 2021, 10:04 AM
yeah ahahah
yeah it's incredible how easy it is :/
and how fucking damage it brings ahah
Jun 29, 2021, 10:05 AM
It doesn't do any real damage because you can always call sync anytime you want
Jun 29, 2021, 10:06 AM
anyone can
man I explained I guess
Jun 29, 2021, 10:06 AM
sorry but this can't be used for bad behaviour?
Jun 29, 2021, 10:06 AM
Hence, decentralised πŸ™‚
Jun 29, 2021, 10:06 AM
now there is correct ratio but it still wouldn't work
yeah man don't treat me like an idiot lmao
Jun 29, 2021, 10:07 AM
Haha no, not at all. Just pointing out any damage done by liquidity ratio manipulation can easily be bypassed
Jun 29, 2021, 10:08 AM
this
Jun 29, 2021, 10:09 AM
.
Jun 29, 2021, 10:09 AM
What do you mean a big portion goes to pancake as fees?
Big portion of what? Trading fee?
Jun 29, 2021, 10:11 AM
you know everytime you add liquidity and it's not the first add a portion of the lp tokens go to https://bscscan.com/address/0x07d80ae6f36a5e08dca74ce884a24d39db9934ed ?
sure I'd say
Jun 29, 2021, 10:14 AM
this is pancake fees of v2 right?
Jun 29, 2021, 10:15 AM
Yes
Jun 29, 2021, 10:16 AM
it scared a lot of people
nope sorry
I am not good with web3
Jun 29, 2021, 10:16 AM
That's the feeto address of pancake right? As far as I know, its negligible compared to the trading fee you get as a real lp holder
Aah I understand your concern. If the K is manipulated to a higher value before liquidity addition from dxsale, a significantly higher amount will go to pancake feeTo. That, also can be fixed by syncing before dxsale adds its liquidity
Jun 29, 2021, 10:24 AM
Man this is the transaction with which I told the guy to try adding liquidity from the finalize, after manually setting the correct ratio, you can see where it failed and I think it can't be solved, now the sale is canceled but idk, https://bscscan.com/tx/0x8a249c9910d9c928124e9453e8b6226e17cbc7d957e1091c17743f0faefec73d this is what happened, do you think it could have gone differently?
Jun 29, 2021, 10:47 AM
This could've been avoided if sync() was called before dxsales liquidity addition. Before that, you have to adjust the ratio by sending appropriate amount of token as well
But yeah, nobody checks pair contract if it is already synced before adding liquidityπŸ™ƒ
Jun 29, 2021, 11:55 AM
man it was
check the transactions
we sent tokens and then called sync
Jun 29, 2021, 12:10 PM
Can you send that pair contract or token contracts add
Jun 29, 2021, 12:15 PM
this is the pair https://bscscan.com/address/0x406be9078687cf6f64a58086cf27ffbd02d9f01b
Jun 29, 2021, 12:16 PM
How come this is for adding liquidity? I don't know how dxsale adds liquidity, but the value is 0, which means they are adding liquidity with 0 bnb? It doesn't make any sense...
Jun 29, 2021, 12:25 PM
I didn't udnerstand
dxSale added already liquidity or not?
Jun 29, 2021, 12:27 PM
This is the finalize function of dxsale, which idk what it does as code is not verified but at the end you can check also on tenderly that it adds addliquidity on pancake
Nope, dxsale should have added liquidity but since someone manually sent bnb to the pair it ended screwing up everything
Jun 29, 2021, 12:30 PM
okok
well I thought that dxSale contracts used a proxy lol
Jun 29, 2021, 12:31 PM
Insufficient A amount, which is thrown when token A amount is insufficient while adding liquidity to an existing pool. Token A, which in this case is WBNB should also be transferred in the transaction as BNB. But the value of that transaction is 0, which will obviously result in fail. Maybe dxsale doesn't add liquidity straightforward
Jun 29, 2021, 12:35 PM
me too tbh lol
idk, I can't know how dxsale does what it does, can only guess it
this is where it failed
Jun 29, 2021, 12:38 PM
Interesting how people trust a platform which runs solely on unverified contracts
Jun 29, 2021, 12:38 PM
yeah...
Jun 29, 2021, 12:39 PM
Couldn't agree more
Jun 29, 2021, 12:39 PM
and asks a lot of money/ tokens ahah
what is this magic tool ahah
Jun 29, 2021, 12:39 PM
This must be inside addLiquidity on router contract? And that amountAMin would be the amount of token A
Jun 29, 2021, 12:40 PM
I never recommend that and I'd rather code a contract to handle that but apes like dxsale and clients don't care about such details
yes
amountAmin is set to 239997600000000000172800
Jun 29, 2021, 12:41 PM
Telegram should have wei to ether converter
Jun 29, 2021, 12:41 PM
I guess a rounding error with floating points screwed the situation
Jun 29, 2021, 12:41 PM
just count 18 digits
Jun 29, 2021, 12:42 PM
Just human eyes rolls after 10 to 12 digits πŸ˜‚πŸ˜‚
Jun 29, 2021, 12:43 PM
usually I count with ,
Jun 29, 2021, 12:44 PM
That's.... A lot of BNBπŸ™ƒ
Jun 29, 2021, 12:45 PM
which tool is it?
Jun 29, 2021, 12:45 PM
tenderly man, sorry you found about this now ahahah
Jun 29, 2021, 12:47 PM
ahah I swear first time I heard about it
Jun 29, 2021, 12:47 PM
yes
Jun 29, 2021, 12:47 PM
https://tenderly.co/
Jun 29, 2021, 12:47 PM
everyday we learn new things😁
Jun 29, 2021, 12:48 PM
Hey everyone how do you handle unknown DMs
About trading, tokens, investment in blockchain and crap
Jun 29, 2021, 12:53 PM
ignore and signal as spam
Jun 29, 2021, 12:53 PM
If you are going to pitch about some trade company or something , we can end this conversation in no time
I usually send this first
If they are pissed, they are one of them. πŸ˜‚πŸ˜‚
Jun 29, 2021, 12:55 PM
something like this
Jun 29, 2021, 12:56 PM
That's a lot to digest.
But I didn't get the logic why they are doing this.
Jun 29, 2021, 12:57 PM
Damn sonπŸ˜…
Jun 29, 2021, 12:57 PM
you had a rough week man? ahahah
Jun 29, 2021, 1:14 PM
not here please
Jun 29, 2021, 1:29 PM
Block and report, simple as
Jun 29, 2021, 1:33 PM
yes you gace 4 arguments
ussually
_transfer function is
_transfer(sender, recipient, amount)
Jun 29, 2021, 1:54 PM
Ah makes sense
Thanks it compiled now
Off topic but do you guys think btc is gonna break out finally this time
Jun 29, 2021, 1:57 PM
not here please
Jun 29, 2021, 1:58 PM
My bad
Jun 29, 2021, 1:59 PM
please check group in bio
Jun 29, 2021, 2:12 PM
Lol as soon as someone mentions money our bot davinci shows up
Let's try this
Looking for a developer with 20 years of experience on solidity, will pay very well
Apparently he doesn't like my proposal
Lol
Deleted the message
Probably now he will change name
Jun 29, 2021, 2:18 PM
what?
uhπŸ˜…
for jobs offers please check group in bio
Jun 29, 2021, 2:22 PM
i did thanks
Jun 29, 2021, 2:22 PM
😜😜
please check this
FortuneCookie maybe
returns(uint256 rAMount, uint256 rTransferAmount...)
Jun 29, 2021, 4:45 PM
ok. thanks let me try that
Jun 29, 2021, 4:45 PM
nono
I mean in returns
Jun 29, 2021, 4:52 PM
ok .. let me try
you mean like this right

function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity,uint256 tLottery, uint256 tGrowth) {
(uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tLottery, uint256 tGrowth) = _getTValues(tAmount);
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, tLottery, tGrowth, _getRate());
return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity, tLottery, tGrowth);
}

it didnt work
Jun 29, 2021, 4:55 PM
yes but then you don't have to redefine
remove uint256 from the others
Jun 29, 2021, 4:57 PM
ok.. let me try
Jun 29, 2021, 4:57 PM
you mean like this right

function _getValues(uint256 tAmount) private view returns (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity,uint256 tLottery, uint256 tGrowth) {
(tTransferAmount, tFee, tLiquidity, tLottery, tGrowth) = _getTValues(tAmount);
(rAmount, rTransferAmount, rFee) = _getRValues(tAmount, tFee, tLiquidity, tLottery, tGrowth, _getRate());
return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity, tLottery, tGrowth);
}

it didnt work
Jun 29, 2021, 4:58 PM
ok. i will try this one
this worked, and then the next function triggered stack too deep error

function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256) {
uint256 tFee = calculateTaxFee(tAmount);
uint256 tLiquidity = calculateLiquidityFee(tAmount);
uint256 tLottery = calculateLotteryFee(tAmount);
uint256 tGrowth = calculateGrowthFee(tAmount);
uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tLottery).sub(tGrowth);
return (tTransferAmount, tFee, tLiquidity, tLottery, tGrowth);
}

this one
Jun 29, 2021, 5:02 PM
do the same
function _getTValues(uint256 tAmount) private view returns (uint256 tFee, uint256 tLiquidity, uint256 tLottery, uint256 tGrowth, uint256 tTransferAmount) {
tFee = calculateTaxFee(tAmount);
tLiquidity = calculateLiquidityFee(tAmount);
tLottery = calculateLotteryFee(tAmount);
tGrowth = calculateGrowthFee(tAmount);
tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tLottery).sub(tGrowth);
return (tTransferAmount, tFee, tLiquidity, tLottery, tGrowth);
}
Jun 29, 2021, 5:03 PM
ok ..let me try
thank you so much it worked
Jun 29, 2021, 5:05 PM
😁😁
Jun 29, 2021, 5:05 PM
you are a genius
Jun 29, 2021, 5:08 PM
ahah no bro
I just had the same problem
Jun 29, 2021, 5:10 PM
that's cool bro,
Jun 29, 2021, 5:13 PM
can yoi give more details
and you are on bsc mainnet right?
then use testnet one
0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3
and use this to test
https://pancake.kiemtienonline360.com/#/swap
Jun 29, 2021, 6:48 PM
It worked. Thank you. Sorry, I'm a newb lol
Jun 29, 2021, 6:52 PM
np I'm a noob too o/
Jun 29, 2021, 6:52 PM
Whats strange is the 0x10 Pancake router address worked on the last contract i tested on testnet...
Jun 29, 2021, 6:52 PM
Rishabh3321/dApp_boilerplate: React Truffle Web3js Boilerplate using Context Api.
https://github.com/Rishabh3321/dApp_boilerplate
Jun 29, 2021, 8:48 PM

Β© 2024 Draquery.com All rights reserved.