- Code snippet for "A short experience to perform Fuzzing and Formal Verification".
- https://docs.google.com/presentation/d/1WvHQgKbDKE2uw-FFpIMszQQTkjNiiuA9s32nE0ntMh0/edit?usp=sharing
The exchange rate contains inflation attack.
exploit
[stake] 1 asset and get 1 share
[vault] 1 asset, 1 share
exploit
[donate] 100e18 asset
[vault] 100e18 + 1 asset, 1 share
user
[stake] 100e18 asset and get 0 share
- share = 100e18 \* 1 / 100e18 + 1 = 0
forge test --mc UnitTest
forge test --mc FuzzTest
forge test --mc Invariant
solc-select use 0.8.23
echidna ./test/echidna/EchidnaCore.sol --contract StakingInvariant
FOUNDRY_PROFILE=fv forge build --force
halmos --contract StakingV1Symbol --solver-timeout-assertion 0