Fujicracy / fuji-v2

Cross-chain money market aggregator
https://fuji-v2-frontend.vercel.app
15 stars 10 forks source link

Fuzzing test fail SimpleRouter.t.sol #254

Closed 0xdcota closed 1 year ago

0xdcota commented 1 year ago

I have identified to fuzzing tests that do not pass 100% of the time.

I am sure the issue has to do with the settings of the test, however, it will be good that we address this so that the CI doesn't spit failed every so often.

The tests that I identified that require review are:

forge test --mp test/mocking/routers/SimpleRouter.t.sol --mt test_tryFoeSweepETH

forge test --mp test/mocking/routers/SimpleRouter.t.sol --mt test_tryFoeSweepToken

In both, there is an address impersonation that is still able to sweep the stucked tokens.

0xdcota commented 1 year ago

This has been addressed, the vm.assume statement should exclude the test contract address too.