Thanks. I have a fork of PCS with a farm and pool setup for my token. My token has very high gas fees, so I asked the dev to increase the gas fees and he did. Since he increased it, the Recent Token profits no longer updates. My assumption is that tokens from the rewards are now being transferred to the contract to be used for the gas fees.What do you think is happening?
Apr 16, 2022, 5:02 AM
Please let me know if this makes sense?
Apr 16, 2022, 7:03 AM
Mhm? How can you raise gasFee? gasFee = ETH spent on transaction, to miners, for the function elaboration cost
Share some links in case
Apr 16, 2022, 7:06 AM
It's not sent to miners, it's sent to the treasury
Apr 16, 2022, 7:14 AM
then it's not gasFee
Apr 16, 2022, 7:14 AM
Gas has nothing to do with miners. Miners are paid through block
Apr 16, 2022, 7:14 AM
it's a custom transfer, like a tax model
Apr 16, 2022, 7:14 AM
Why would you do that?
Apr 16, 2022, 7:14 AM
Thanks for responding. Here are my pools https://lotuscapital.xyz/pools before the harvest would fail https://bscscan.com/tx/0xbd0f47d2969733992f0d1064018ba50d9dddca86b4c3862a5a85b6d522975412 then the dev adjusted the gas fees for the harvest and it's now successful https://bscscan.com/tx/0xd928e0cfe486aa9dab94aeec179700a51b4236fc613335564376d67259e72803 but my recent (token) profits don't update (see screenshot)
Apr 16, 2022, 7:14 AM
O.o yes but what are in those blocks? gas, that's the paycheck for miners
this ETH goes to miners, and it's called gasFee, made by gasValue * gasPrice.
The more code you need to elaborate in a tx, the more the gas and you cannot take it
The more code you need to elaborate in a tx, the more the gas and you cannot take it
i call it ETH because it's the default currency for EVM, in this case i'm sending a screenshot for bnb chain, so it's BNB instead of ETH
Apr 16, 2022, 7:17 AM
Oh for BnB. Yeah maybe
But BnB has no miners
It's proof of stake.... So not sure what you're referring to
Apr 16, 2022, 7:18 AM
there is no dev transaction in there
no miners but validators
they still receive the gasFee for being a validator
if they validate a block
Apr 16, 2022, 7:19 AM
some how he managed to increase the gas limit
Apr 16, 2022, 7:19 AM
you (user) can raise the gasLimit of your tx
Apr 16, 2022, 7:20 AM
its the harvest function for the Auto pool
honestly, i dont know how he increased it...
Apr 16, 2022, 7:21 AM
from what i see, he did nothing
if you sent the tx from metamask/trust, the app calculated the gasLimit
you can calculate it too by reading the response of contract.callStatic.function()
that's how wallets calculate it
same way they warn you "this tx would fail"
Apr 16, 2022, 7:22 AM
well, the harvest function failed before and now it works.
Apr 16, 2022, 7:22 AM
i think it's just a coincidence, a bad-calculation done by your wallet in the past transaction
i had some users with that problem too in staking, but i did nothing and they resolved the problem without my interaction
Apr 16, 2022, 7:23 AM
ok, so im happy the harvest feature now works for whatever reason but my concern is why my auto pool shows no recent profits
where does the auto pool take the fees to use for the gas fee?
Apr 16, 2022, 7:25 AM
don't know what's the precise call, but it's a call to contract from the front-end.
If you're testing it in localhost, like ganache/hardhat, remember to change the mine mode, otherwise you should make a tx to mine another block
If you're testing it in localhost, like ganache/hardhat, remember to change the mine mode, otherwise you should make a tx to mine another block
Apr 16, 2022, 7:25 AM
i just call function 3 to activate the harvest function https://bscscan.com/address/0x249e40AB07A9153270857AC1FD4c2B9D8Bdb7959#writeContract
Apr 16, 2022, 7:26 AM
that's not gasFee, those are tokens
Apr 16, 2022, 7:27 AM
so it uses the tokens to pay for the gas fees?
Apr 16, 2022, 7:29 AM
no, gasFees are paid in ETH of the chain you're using
^ that's just a check to
if the users is withdrawing before the timer, apply that tax and send the tokens to treasury
if the users is withdrawing before the timer, apply that tax and send the tokens to treasury
if you're facing that tax, by conseguences you will pay a little more gasFees
but that's not going to treasury, tokens are going to treasury, not ETH
Apr 16, 2022, 7:30 AM
ok, thanks I do receive tokens in my treasury wallet. I think the issue is about the harvest function. The Auto compounding feature calls the harvest function to pay out the tokens to each person staking, right?
as soon as the dev adjusted the fees for this function, the recent profits stopped updating on the auto pools
Apr 16, 2022, 7:33 AM
you mean this?
he adjusted the tokens per block
Apr 16, 2022, 7:34 AM
no i did that
Apr 16, 2022, 7:34 AM
i'm familiar with syrup pool v2 staking, that's the sushi staking system but i think it's similar
Apr 16, 2022, 7:35 AM
old harvest (failed) https://bscscan.com/tx/0xbd0f47d2969733992f0d1064018ba50d9dddca86b4c3862a5a85b6d522975412
new harvest (successfull) https://bscscan.com/tx/0xd928e0cfe486aa9dab94aeec179700a51b4236fc613335564376d67259e72803
new harvest (successfull) https://bscscan.com/tx/0xd928e0cfe486aa9dab94aeec179700a51b4236fc613335564376d67259e72803
Apr 16, 2022, 7:35 AM
รฉ_รจ
Apr 16, 2022, 7:35 AM
?
Apr 16, 2022, 7:36 AM
that's alot of inherit, harvest simply withdraw & deposit the pending tokens in staking, but as soon one transfer is called on the token contract, it starts the redistribution.
So probably this was the problem of the first transaction, not connected to the staking itself but with the token
So probably this was the problem of the first transaction, not connected to the staking itself but with the token
the famous generic error on pancake "probably there is an issue with the token your swapping" ๐
about this i don't know :o
5.28$ of harvest in gasFee is too much btw
not really worth doing that as little holder
Apr 16, 2022, 7:38 AM
yeah, i believe the dev. he's always told me how he's never seen a token with such high gas fees
Apr 16, 2022, 7:38 AM
i have, sadly ๐ it's a baby token
Apr 16, 2022, 7:39 AM
i would just love to know why the recent token profits are set to 0... i really believe it has something to do with the high gas fees for the harvest
Apr 16, 2022, 7:40 AM
most devs undervaluate the costs of these, expecially with a staking siystem, when you do a transfer you trigger ALL the code inside the main contract, and that costs gas, sometimes too much that invalidate the first function.
I do harvest to compound my 15$ bag, but if i pay 5$ in gasFee, i'm compounding 10$
I do harvest to compound my 15$ bag, but if i pay 5$ in gasFee, i'm compounding 10$
so it's not worth anymore for me doing that on a regular basis
that's one of my staking with compound function, 22 cents
Apr 16, 2022, 7:42 AM
yup im not doubting the high fees on my token... not much i can do about it
Apr 16, 2022, 7:43 AM
contract has a special skip inside transfer function when is a transfer from staking.
It's called gas optimization and the users will say ty for that.
Of course it's in our hands
It's called gas optimization and the users will say ty for that.
Of course it's in our hands
Apr 16, 2022, 7:43 AM
I just wish I knew why the recent profits are still at 0
Apr 16, 2022, 7:44 AM
keep searching and you will find the answer
Apr 16, 2022, 7:45 AM
my guess is the contract takes the fees to pay for gas from the rewards pool and is allocating enough for the harvest function first before assigning them to the users profits
Apr 16, 2022, 7:46 AM
i lost so many days on staking ๐but you can use remix VM to play with a standard token, so you can test all the interactions without re-deploy everytime
or go hardhat if you have the knowledge
Apr 16, 2022, 7:46 AM
i dont have any lol
Apr 16, 2022, 7:46 AM
then you or your dev are in troubles
https://dashboard.tenderly.co/
you can use this to debug in case
https://dashboard.tenderly.co/
you can use this to debug in case
always try to fully understand the platform you're offering to users so you can handle every situation that will pop out eventually
Apr 16, 2022, 7:48 AM
yep im doing this for my dev
Apr 16, 2022, 7:48 AM
Thanks for the info. You're right.
Apr 16, 2022, 8:45 AM