forked from Uniswap/v3-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accumulate seconds per liquidity instead of liquidity (Uniswap#467)
* first remove SecondsOutside.sol * first pass of accumulating seconds per liquidity instead of liquidity * seconds * fix the unit tests that were incorrect before * no mulDiv necessary * fix echidna tests * fix compiling * compute and set the seconds cumulative on ticks in swap * assert initialized * assert back to require * revert the change to the echidna test * shift left before dividing instead of shifting right * fix the parentheses * change the computation of reciprocal to use type(uint160).max * avoid fresh sstores in the swap that crosses ticks * store and update seconds outside * update comments * add the seconds per liquidity cumulative logic in modify position * rename the filler bits * unit tests * another unit test for cross * fix the test values * few more unit tests and some documentation nits * snapshots * debug run slither * debug run slither correct command * put the number in a constant * get the echidna tests to work * fix the types * address the nits * view function for snapshots (Uniswap#471) * add a view function for getting the current seconds per liquidity inside snapshot and seconds inside snapshot * add some unit tests * more tests * remove only * add a few more tests * add the cumulative tick to the tick (Uniswap#481) * put the cumulative tick outside in the tick * first pass ofmerging the snapshot function * bool is cheaper, reorder to match observation with tick cumulative first * add comment * noDelegateCall and some gas tests * some comment polish * more comment polish * unskip tests, more comments * fix skipped full oracle test failures * interpolation calculation for max liquidity * few more tests
- Loading branch information
1 parent
ba2aa27
commit 7d15bc4
Showing
20 changed files
with
966 additions
and
685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.