- Install slither
- Install solc 0.8.3
- Install echidna-test
Change block.chainid to some number to unbreak slither, then:
slither contracts/ETF.sol --solc /usr/local/bin/solc
~/Downloads/echidna-test/echidna-test contracts/test/ETFFuzzing.sol --contract ETFFuzzing --config echinda.config.yaml
Flash Loan Scenario:
Total Supply - 10 ETF A - 5 ETF B - 5 ETF
C - 10 ETF, (20 ETF) B - 0 C - 15 ETF (20 ETF)
When C tries to redeem, the transaction will fail.
Recursive ETF Scenario:
ETF A - 1 part ETF A, 3 part DAI
User B authorized ETF to pull INF etf User B has 3 DAI User B calls create
User B -> 1 ETF, 3 DAI (mint) User B -> 3 DAI (transferunderlying) REVERT because we cannot return the 3 dai b/c we don't have them yet
Transitively Recursive ETF Scenario:
Cycle length 2 Scenario: