any specific function ?

here i can see .sub operations in this code block.

add a check for :

require(afterDeposit >= beforeDeposit, "");

before doing:

_amount = afterDeposit.sub(beforeDeposit);

add similar checks here :

`totalZaifInPools = totalZaifInPools.add(_amount).sub(depositFee);
user.amount = user.amount.add(_amount).sub(depositFee);
pool.totalLp = pool.totalLp.add(_amount).sub(depositFee);`

** If Possible use hardhat console logging, so that you can debug easily
then it will be easy to debug

Jul 9, 2021, 5:35 AM
Thanks i will do it...

on a different address i'am able to deposit over 70k tokens but on this i can't maxed with 3k, also on withdraw i can withdraw 69k but not all 70k, or i can withdraw all the amount on the first address when it deposits, i will try to debug on hardhat.
Jul 9, 2021, 5:38 AM

© 2024 Draquery.com All rights reserved.