Invariant testing Handler::swapPoolTokenForWethBasedOnOutputWeth
error ERC20InsufficientBalance
#345
Closed
Yashwant23
started this conversation in
General
Replies: 1 comment
-
The protocol takes charge when you make 10 swaps; we wrote the whole fuzzing test to prove that. That is the essence of the fuzz test we wrote. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi , I was going through invariant testing of
TSwap
contract was facing the errorERC20InsufficientBalance
when Handler::swapPoolTokenForWethBasedOnOutputWethis called
10xtimes in a single run due less than
<1 etherdifference between
outputAmountand 'outputTokenReserve'. I tmodified the
Handler::swapPoolTokenForWethBasedOnOutputWeth` function by adding checks for weth reserves to be more than 1 Ether and output amount to be less than 1 ether from weth reserve it worked.swapPoolTokenForWethBasedOnOutputWeth:
I know what is causing the error , but do not know why Patrick didn't face the issue
and are there other ways to resolve this error
Handler.t.sol
without modification of boundriesBeta Was this translation helpful? Give feedback.
All reactions