I added basic tests about 3 swaps in https://etherscan.io/tx/0x485e08dc2b6a4b3aeadcb89c3d18a37666dc7d9424961a2091d6b3696792f0f3.
# To see the resulting sqrtP and tick info in each swap
forge test --mc SwapMathTest
# To test the exploit & its solution
forge test --mt testBruteForceExploit
You can see more detailed explanation about tests in https://github.com/paco0x/kyber-exploit-example.
deltaL | sqrtP | tick | |
---|---|---|---|
floor | 75619198150999 | 20693058119558072255665971001964 | 111310 |
ceil | 75619198151000 | 20693058119558072255388935748427 | 111309 |