Skip to content

Commit

Permalink
refactor(fullmath): use uniswap's full math
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Nov 3, 2023
1 parent 2fb1642 commit b12523f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 109 deletions.
2 changes: 1 addition & 1 deletion lib/v3-core
Submodule v3-core updated 93 files
+2 −2 .github/workflows/fuzz-testing.yml
+1 −0 .github/workflows/lint.yml
+4 −5 .github/workflows/mythx.yml
+1 −0 .github/workflows/tests.yml
+6 −5 README.md
+ audits/abdk/audit.pdf
+0 −166 audits/tob/README.md
+ audits/tob/audit.pdf
+0 −16 audits/tob/contracts/crytic/echidna/E2E_mint_burn.config.yaml
+0 −503 audits/tob/contracts/crytic/echidna/E2E_mint_burn.sol
+0 −10 audits/tob/contracts/crytic/echidna/E2E_swap.config.yaml
+0 −487 audits/tob/contracts/crytic/echidna/E2E_swap.sol
+0 −7 audits/tob/contracts/crytic/echidna/Other.config.yaml
+0 −21 audits/tob/contracts/crytic/echidna/Other.sol
+0 −205 audits/tob/contracts/crytic/echidna/Setup.sol
+0 −11 audits/tob/contracts/crytic/manticore/001.sol
+0 −12 audits/tob/contracts/crytic/manticore/002.sol
+0 −9 audits/tob/contracts/crytic/manticore/003.sol
+1 −1 contracts/NoDelegateCall.sol
+5 −5 contracts/UniswapV3Factory.sol
+237 −200 contracts/UniswapV3Pool.sol
+3 −3 contracts/UniswapV3PoolDeployer.sol
+8 −6 contracts/interfaces/IUniswapV3Pool.sol
+107 −1 contracts/interfaces/LICENSE
+19 −0 contracts/interfaces/pool/IUniswapV3PoolErrors.sol
+23 −22 contracts/interfaces/pool/IUniswapV3PoolState.sol
+69 −65 contracts/libraries/BitMath.sol
+87 −83 contracts/libraries/FullMath.sol
+107 −1 contracts/libraries/LICENSE
+0 −17 contracts/libraries/LiquidityMath.sol
+0 −46 contracts/libraries/LowGasSafeMath.sol
+138 −111 contracts/libraries/Oracle.sol
+24 −19 contracts/libraries/Position.sol
+70 −60 contracts/libraries/SqrtPriceMath.sol
+59 −57 contracts/libraries/SwapMath.sol
+56 −47 contracts/libraries/Tick.sol
+39 −33 contracts/libraries/TickBitmap.sol
+174 −165 contracts/libraries/TickMath.sol
+7 −4 contracts/libraries/TransferHelper.sol
+12 −8 contracts/test/BitMathEchidnaTest.sol
+2 −2 contracts/test/BitMathTest.sol
+41 −35 contracts/test/FullMathEchidnaTest.sol
+2 −2 contracts/test/FullMathTest.sol
+0 −16 contracts/test/LiquidityMathTest.sol
+0 −36 contracts/test/LowGasSafeMathEchidnaTest.sol
+2 −2 contracts/test/MockTimeUniswapV3Pool.sol
+3 −3 contracts/test/MockTimeUniswapV3PoolDeployer.sol
+4 −4 contracts/test/NoDelegateCallTest.sol
+21 −26 contracts/test/OracleEchidnaTest.sol
+5 −4 contracts/test/OracleTest.sol
+18 −17 contracts/test/SqrtPriceMathEchidnaTest.sol
+2 −2 contracts/test/SqrtPriceMathTest.sol
+9 −4 contracts/test/SwapMathEchidnaTest.sol
+2 −2 contracts/test/SwapMathTest.sol
+2 −2 contracts/test/TestERC20.sol
+8 −8 contracts/test/TestUniswapV3Callee.sol
+17 −19 contracts/test/TestUniswapV3ReentrantCallee.sol
+9 −8 contracts/test/TestUniswapV3Router.sol
+4 −4 contracts/test/TestUniswapV3SwapPay.sol
+2 −2 contracts/test/TickBitmapEchidnaTest.sol
+2 −2 contracts/test/TickBitmapTest.sol
+4 −3 contracts/test/TickEchidnaTest.sol
+2 −2 contracts/test/TickMathEchidnaTest.sol
+2 −2 contracts/test/TickMathTest.sol
+26 −28 contracts/test/TickOverflowSafetyEchidnaTest.sol
+2 −3 contracts/test/TickTest.sol
+4 −4 contracts/test/UniswapV3PoolSwapTest.sol
+2 −2 contracts/test/UnsafeMathEchidnaTest.sol
+23 −5 hardhat.config.ts
+2 −2 package.json
+0 −44 test/LiquidityMath.spec.ts
+3 −1 test/NoDelegateCall.spec.ts
+4 −11 test/Oracle.spec.ts
+1 −14 test/TickMath.spec.ts
+4 −1 test/UniswapV3Factory.spec.ts
+13 −27 test/UniswapV3Pool.arbitrage.spec.ts
+3 −2 test/UniswapV3Pool.gas.spec.ts
+29 −74 test/UniswapV3Pool.spec.ts
+10 −6 test/UniswapV3Pool.swaps.spec.ts
+5 −2 test/UniswapV3Router.spec.ts
+3 −3 test/__snapshots__/BitMath.spec.ts.snap
+0 −5 test/__snapshots__/LiquidityMath.spec.ts.snap
+1 −1 test/__snapshots__/NoDelegateCall.spec.ts.snap
+20 −20 test/__snapshots__/Oracle.spec.ts.snap
+8 −8 test/__snapshots__/SqrtPriceMath.spec.ts.snap
+8 −8 test/__snapshots__/SwapMath.spec.ts.snap
+9 −9 test/__snapshots__/TickBitmap.spec.ts.snap
+13 −13 test/__snapshots__/TickMath.spec.ts.snap
+3 −3 test/__snapshots__/UniswapV3Factory.spec.ts.snap
+84 −84 test/__snapshots__/UniswapV3Pool.gas.spec.ts.snap
+50 −50 test/__snapshots__/UniswapV3Pool.swaps.spec.ts.snap
+2 −1 test/shared/fixtures.ts
+2,525 −2,182 yarn.lock
2 changes: 1 addition & 1 deletion src/ChainlinkOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {IOracle} from "../lib/morpho-blue/src/interfaces/IOracle.sol";
import {AggregatorV3Interface, ChainlinkDataFeedLib} from "./libraries/ChainlinkDataFeedLib.sol";
import {IERC4626, VaultLib} from "./libraries/VaultLib.sol";
import {ErrorsLib} from "./libraries/ErrorsLib.sol";
import {FullMath} from "./libraries/FullMath.sol";
import {FullMath} from "../lib/v3-core/contracts/libraries/FullMath.sol";

/// @title ChainlinkOracle
/// @author Morpho Labs
Expand Down
107 changes: 0 additions & 107 deletions src/libraries/FullMath.sol

This file was deleted.

0 comments on commit b12523f

Please sign in to comment.