├── .forge-snapshots ├── BitMathLeastSignificantBitMaxUint128.snap ├── BitMathLeastSignificantBitMaxUint256.snap ├── BitMathLeastSignificantBitSmallNumber.snap ├── BitMathMostSignificantBitMaxUint128.snap ├── BitMathMostSignificantBitMaxUint256.snap ├── BitMathMostSignificantBitSmallNumber.snap ├── HooksShouldCallBeforeSwap.snap ├── NoDelegateCallOverhead.snap ├── donate gas with 1 token.snap ├── donate gas with 2 tokens.snap ├── gas overhead of no-op lock.snap ├── initialize.snap ├── mint with empty hook.snap ├── mint with native token.snap ├── mint.snap ├── poolExtsloadSlot0.snap ├── poolExtsloadTickInfoStruct.snap ├── simple swap.snap ├── swap against liquidity with native token.snap ├── swap against liquidity.snap ├── swap with hooks.snap └── swap with native.snap ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── BUG_REPORT.yml │ └── FEATURE_IMPROVEMENT.yml ├── pull_request_template.md └── workflows │ ├── lint.yml │ ├── mythx.yml │ └── tests.yml ├── .gitignore ├── .gitmodules ├── .nvmrc ├── .prettierignore ├── .prettierrc ├── .solhint.json ├── .yarnrc ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── contracts ├── NoDelegateCall.sol ├── Owned.sol ├── PoolManager.sol ├── interfaces │ ├── IDynamicFeeManager.sol │ ├── IHookFeeManager.sol │ ├── IHooks.sol │ ├── IPoolManager.sol │ ├── IProtocolFeeController.sol │ ├── callback │ │ └── ILockCallback.sol │ └── external │ │ └── IERC20Minimal.sol ├── libraries │ ├── BitMath.sol │ ├── CurrencyLibrary.sol │ ├── Fees.sol │ ├── FixedPoint128.sol │ ├── FixedPoint96.sol │ ├── FullMath.sol │ ├── Hooks.sol │ ├── Pool.sol │ ├── PoolId.sol │ ├── Position.sol │ ├── SafeCast.sol │ ├── SqrtPriceMath.sol │ ├── SwapMath.sol │ ├── TickBitmap.sol │ ├── TickMath.sol │ └── UnsafeMath.sol ├── test │ ├── BitMathEchidnaTest.sol │ ├── EmptyTestHooks.sol │ ├── FullMathEchidnaTest.sol │ ├── FullMathTest.sol │ ├── HooksTest.sol │ ├── MockContract.sol │ ├── MockHooks.sol │ ├── NoDelegateCallTest.sol │ ├── PoolDonateTest.sol │ ├── PoolLockTest.sol │ ├── PoolManagerReentrancyTest.sol │ ├── PoolModifyPositionTest.sol │ ├── PoolSwapTest.sol │ ├── PoolTakeTest.sol │ ├── ProtocolFeeControllerTest.sol │ ├── SqrtPriceMathEchidnaTest.sol │ ├── SqrtPriceMathTest.sol │ ├── SwapMathEchidnaTest.sol │ ├── SwapMathTest.sol │ ├── TestERC20.sol │ ├── TestInvalidERC20.sol │ ├── TickBitmapEchidnaTest.sol │ ├── TickBitmapTest.sol │ ├── TickEchidnaTest.sol │ ├── TickMathEchidnaTest.sol │ ├── TickMathTest.sol │ ├── TickOverflowSafetyEchidnaTest.sol │ ├── TickTest.sol │ └── UnsafeMathEchidnaTest.sol └── types │ └── BalanceDelta.sol ├── echidna.config.yml ├── foundry.toml ├── hardhat.config.ts ├── justfile ├── latex ├── main.bib └── main.tex ├── package.json ├── remappings.txt ├── test ├── FullMath.spec.ts ├── PoolManager.gas.spec.ts ├── PoolManager.spec.ts ├── SqrtPriceMath.spec.ts ├── SwapMath.spec.ts ├── Tick.spec.ts ├── TickBitmap.spec.ts ├── TickMath.spec.ts ├── __snapshots__ │ ├── BitMath.spec.ts.snap │ ├── Hooks.spec.ts.snap │ ├── NoDelegateCall.spec.ts.snap │ ├── Oracle.spec.ts.snap │ ├── PoolManager.gas.spec.ts.snap │ ├── PoolManager.spec.ts.snap │ ├── SqrtPriceMath.spec.ts.snap │ ├── SwapMath.spec.ts.snap │ ├── Tick.spec.ts.snap │ ├── TickBitmap.spec.ts.snap │ └── TickMath.spec.ts.snap ├── foundry-tests │ ├── BitMath.t.sol │ ├── DynamicFees.t.sol │ ├── Fees.t.sol │ ├── Hooks.t.sol │ ├── NoDelegateCall.t.sol │ ├── Owned.t.sol │ ├── Pool.t.sol │ ├── PoolManager.t.sol │ ├── SafeCast.t.sol │ ├── types │ │ └── BalanceDelta.t.sol │ └── utils │ │ ├── Deployers.sol │ │ ├── MockERC20.sol │ │ └── TokenFixture.sol └── shared │ ├── checkObservationEquals.ts │ ├── constants.ts │ ├── expect.ts │ ├── fixtures.ts │ ├── format.ts │ ├── mockContract.ts │ └── utilities.ts ├── tsconfig.json ├── whitepaper-v4-draft.pdf └── yarn.lock /.forge-snapshots/BitMathLeastSignificantBitMaxUint128.snap: -------------------------------------------------------------------------------- 1 | 458 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathLeastSignificantBitMaxUint256.snap: -------------------------------------------------------------------------------- 1 | 461 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathLeastSignificantBitSmallNumber.snap: -------------------------------------------------------------------------------- 1 | 456 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathMostSignificantBitMaxUint128.snap: -------------------------------------------------------------------------------- 1 | 394 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathMostSignificantBitMaxUint256.snap: -------------------------------------------------------------------------------- 1 | 415 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathMostSignificantBitSmallNumber.snap: -------------------------------------------------------------------------------- 1 | 322 -------------------------------------------------------------------------------- /.forge-snapshots/HooksShouldCallBeforeSwap.snap: -------------------------------------------------------------------------------- 1 | 34 -------------------------------------------------------------------------------- /.forge-snapshots/NoDelegateCallOverhead.snap: -------------------------------------------------------------------------------- 1 | 41 -------------------------------------------------------------------------------- /.forge-snapshots/donate gas with 1 token.snap: -------------------------------------------------------------------------------- 1 | 131234 -------------------------------------------------------------------------------- /.forge-snapshots/donate gas with 2 tokens.snap: -------------------------------------------------------------------------------- 1 | 185921 -------------------------------------------------------------------------------- /.forge-snapshots/gas overhead of no-op lock.snap: -------------------------------------------------------------------------------- 1 | 61036 -------------------------------------------------------------------------------- /.forge-snapshots/initialize.snap: -------------------------------------------------------------------------------- 1 | 37613 -------------------------------------------------------------------------------- /.forge-snapshots/mint with empty hook.snap: -------------------------------------------------------------------------------- 1 | 320432 -------------------------------------------------------------------------------- /.forge-snapshots/mint with native token.snap: -------------------------------------------------------------------------------- 1 | 294445 -------------------------------------------------------------------------------- /.forge-snapshots/mint.snap: -------------------------------------------------------------------------------- 1 | 313109 -------------------------------------------------------------------------------- /.forge-snapshots/poolExtsloadSlot0.snap: -------------------------------------------------------------------------------- 1 | 1151 -------------------------------------------------------------------------------- /.forge-snapshots/poolExtsloadTickInfoStruct.snap: -------------------------------------------------------------------------------- 1 | 2785 -------------------------------------------------------------------------------- /.forge-snapshots/simple swap.snap: -------------------------------------------------------------------------------- 1 | 67737 -------------------------------------------------------------------------------- /.forge-snapshots/swap against liquidity with native token.snap: -------------------------------------------------------------------------------- 1 | 161615 -------------------------------------------------------------------------------- /.forge-snapshots/swap against liquidity.snap: -------------------------------------------------------------------------------- 1 | 146322 -------------------------------------------------------------------------------- /.forge-snapshots/swap with hooks.snap: -------------------------------------------------------------------------------- 1 | 67712 -------------------------------------------------------------------------------- /.forge-snapshots/swap with native.snap: -------------------------------------------------------------------------------- 1 | 67737 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/BUG_REPORT.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.github/ISSUE_TEMPLATE/BUG_REPORT.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/FEATURE_IMPROVEMENT.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.github/ISSUE_TEMPLATE/FEATURE_IMPROVEMENT.yml -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.github/pull_request_template.md -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.github/workflows/lint.yml -------------------------------------------------------------------------------- /.github/workflows/mythx.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.github/workflows/mythx.yml -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.github/workflows/tests.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.gitmodules -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v16 -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | typechain/ 2 | lib/forge-std/ 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.prettierrc -------------------------------------------------------------------------------- /.solhint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/.solhint.json -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | ignore-scripts true 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/README.md -------------------------------------------------------------------------------- /contracts/NoDelegateCall.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/NoDelegateCall.sol -------------------------------------------------------------------------------- /contracts/Owned.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/Owned.sol -------------------------------------------------------------------------------- /contracts/PoolManager.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/PoolManager.sol -------------------------------------------------------------------------------- /contracts/interfaces/IDynamicFeeManager.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/interfaces/IDynamicFeeManager.sol -------------------------------------------------------------------------------- /contracts/interfaces/IHookFeeManager.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/interfaces/IHookFeeManager.sol -------------------------------------------------------------------------------- /contracts/interfaces/IHooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/interfaces/IHooks.sol -------------------------------------------------------------------------------- /contracts/interfaces/IPoolManager.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/interfaces/IPoolManager.sol -------------------------------------------------------------------------------- /contracts/interfaces/IProtocolFeeController.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/interfaces/IProtocolFeeController.sol -------------------------------------------------------------------------------- /contracts/interfaces/callback/ILockCallback.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/interfaces/callback/ILockCallback.sol -------------------------------------------------------------------------------- /contracts/interfaces/external/IERC20Minimal.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/interfaces/external/IERC20Minimal.sol -------------------------------------------------------------------------------- /contracts/libraries/BitMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/BitMath.sol -------------------------------------------------------------------------------- /contracts/libraries/CurrencyLibrary.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/CurrencyLibrary.sol -------------------------------------------------------------------------------- /contracts/libraries/Fees.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/Fees.sol -------------------------------------------------------------------------------- /contracts/libraries/FixedPoint128.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/FixedPoint128.sol -------------------------------------------------------------------------------- /contracts/libraries/FixedPoint96.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/FixedPoint96.sol -------------------------------------------------------------------------------- /contracts/libraries/FullMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/FullMath.sol -------------------------------------------------------------------------------- /contracts/libraries/Hooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/Hooks.sol -------------------------------------------------------------------------------- /contracts/libraries/Pool.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/Pool.sol -------------------------------------------------------------------------------- /contracts/libraries/PoolId.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/PoolId.sol -------------------------------------------------------------------------------- /contracts/libraries/Position.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/Position.sol -------------------------------------------------------------------------------- /contracts/libraries/SafeCast.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/SafeCast.sol -------------------------------------------------------------------------------- /contracts/libraries/SqrtPriceMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/SqrtPriceMath.sol -------------------------------------------------------------------------------- /contracts/libraries/SwapMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/SwapMath.sol -------------------------------------------------------------------------------- /contracts/libraries/TickBitmap.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/TickBitmap.sol -------------------------------------------------------------------------------- /contracts/libraries/TickMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/TickMath.sol -------------------------------------------------------------------------------- /contracts/libraries/UnsafeMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/libraries/UnsafeMath.sol -------------------------------------------------------------------------------- /contracts/test/BitMathEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/BitMathEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/test/EmptyTestHooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/EmptyTestHooks.sol -------------------------------------------------------------------------------- /contracts/test/FullMathEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/FullMathEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/test/FullMathTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/FullMathTest.sol -------------------------------------------------------------------------------- /contracts/test/HooksTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/HooksTest.sol -------------------------------------------------------------------------------- /contracts/test/MockContract.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/MockContract.sol -------------------------------------------------------------------------------- /contracts/test/MockHooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/MockHooks.sol -------------------------------------------------------------------------------- /contracts/test/NoDelegateCallTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/NoDelegateCallTest.sol -------------------------------------------------------------------------------- /contracts/test/PoolDonateTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/PoolDonateTest.sol -------------------------------------------------------------------------------- /contracts/test/PoolLockTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/PoolLockTest.sol -------------------------------------------------------------------------------- /contracts/test/PoolManagerReentrancyTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/PoolManagerReentrancyTest.sol -------------------------------------------------------------------------------- /contracts/test/PoolModifyPositionTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/PoolModifyPositionTest.sol -------------------------------------------------------------------------------- /contracts/test/PoolSwapTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/PoolSwapTest.sol -------------------------------------------------------------------------------- /contracts/test/PoolTakeTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/PoolTakeTest.sol -------------------------------------------------------------------------------- /contracts/test/ProtocolFeeControllerTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/ProtocolFeeControllerTest.sol -------------------------------------------------------------------------------- /contracts/test/SqrtPriceMathEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/SqrtPriceMathEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/test/SqrtPriceMathTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/SqrtPriceMathTest.sol -------------------------------------------------------------------------------- /contracts/test/SwapMathEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/SwapMathEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/test/SwapMathTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/SwapMathTest.sol -------------------------------------------------------------------------------- /contracts/test/TestERC20.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TestERC20.sol -------------------------------------------------------------------------------- /contracts/test/TestInvalidERC20.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TestInvalidERC20.sol -------------------------------------------------------------------------------- /contracts/test/TickBitmapEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TickBitmapEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/test/TickBitmapTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TickBitmapTest.sol -------------------------------------------------------------------------------- /contracts/test/TickEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TickEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/test/TickMathEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TickMathEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/test/TickMathTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TickMathTest.sol -------------------------------------------------------------------------------- /contracts/test/TickOverflowSafetyEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TickOverflowSafetyEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/test/TickTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/TickTest.sol -------------------------------------------------------------------------------- /contracts/test/UnsafeMathEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/test/UnsafeMathEchidnaTest.sol -------------------------------------------------------------------------------- /contracts/types/BalanceDelta.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/contracts/types/BalanceDelta.sol -------------------------------------------------------------------------------- /echidna.config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/echidna.config.yml -------------------------------------------------------------------------------- /foundry.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/foundry.toml -------------------------------------------------------------------------------- /hardhat.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/hardhat.config.ts -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/justfile -------------------------------------------------------------------------------- /latex/main.bib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/latex/main.bib -------------------------------------------------------------------------------- /latex/main.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/latex/main.tex -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/package.json -------------------------------------------------------------------------------- /remappings.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/remappings.txt -------------------------------------------------------------------------------- /test/FullMath.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/FullMath.spec.ts -------------------------------------------------------------------------------- /test/PoolManager.gas.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/PoolManager.gas.spec.ts -------------------------------------------------------------------------------- /test/PoolManager.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/PoolManager.spec.ts -------------------------------------------------------------------------------- /test/SqrtPriceMath.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/SqrtPriceMath.spec.ts -------------------------------------------------------------------------------- /test/SwapMath.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/SwapMath.spec.ts -------------------------------------------------------------------------------- /test/Tick.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/Tick.spec.ts -------------------------------------------------------------------------------- /test/TickBitmap.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/TickBitmap.spec.ts -------------------------------------------------------------------------------- /test/TickMath.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/TickMath.spec.ts -------------------------------------------------------------------------------- /test/__snapshots__/BitMath.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/BitMath.spec.ts.snap -------------------------------------------------------------------------------- /test/__snapshots__/Hooks.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/Hooks.spec.ts.snap -------------------------------------------------------------------------------- /test/__snapshots__/NoDelegateCall.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`NoDelegateCall runtime overhead 1`] = `41`; 4 | -------------------------------------------------------------------------------- /test/__snapshots__/Oracle.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/Oracle.spec.ts.snap -------------------------------------------------------------------------------- /test/__snapshots__/PoolManager.gas.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/PoolManager.gas.spec.ts.snap -------------------------------------------------------------------------------- /test/__snapshots__/PoolManager.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`PoolManager bytecode size 1`] = `29219`; 4 | -------------------------------------------------------------------------------- /test/__snapshots__/SqrtPriceMath.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/SqrtPriceMath.spec.ts.snap -------------------------------------------------------------------------------- /test/__snapshots__/SwapMath.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/SwapMath.spec.ts.snap -------------------------------------------------------------------------------- /test/__snapshots__/Tick.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/Tick.spec.ts.snap -------------------------------------------------------------------------------- /test/__snapshots__/TickBitmap.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/TickBitmap.spec.ts.snap -------------------------------------------------------------------------------- /test/__snapshots__/TickMath.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/__snapshots__/TickMath.spec.ts.snap -------------------------------------------------------------------------------- /test/foundry-tests/BitMath.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/BitMath.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/DynamicFees.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/DynamicFees.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/Fees.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/Fees.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/Hooks.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/Hooks.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/NoDelegateCall.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/NoDelegateCall.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/Owned.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/Owned.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/Pool.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/Pool.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/PoolManager.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/PoolManager.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/SafeCast.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/SafeCast.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/types/BalanceDelta.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/types/BalanceDelta.t.sol -------------------------------------------------------------------------------- /test/foundry-tests/utils/Deployers.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/utils/Deployers.sol -------------------------------------------------------------------------------- /test/foundry-tests/utils/MockERC20.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/utils/MockERC20.sol -------------------------------------------------------------------------------- /test/foundry-tests/utils/TokenFixture.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/foundry-tests/utils/TokenFixture.sol -------------------------------------------------------------------------------- /test/shared/checkObservationEquals.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/shared/checkObservationEquals.ts -------------------------------------------------------------------------------- /test/shared/constants.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/shared/constants.ts -------------------------------------------------------------------------------- /test/shared/expect.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/shared/expect.ts -------------------------------------------------------------------------------- /test/shared/fixtures.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/shared/fixtures.ts -------------------------------------------------------------------------------- /test/shared/format.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/shared/format.ts -------------------------------------------------------------------------------- /test/shared/mockContract.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/shared/mockContract.ts -------------------------------------------------------------------------------- /test/shared/utilities.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/test/shared/utilities.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/tsconfig.json -------------------------------------------------------------------------------- /whitepaper-v4-draft.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/whitepaper-v4-draft.pdf -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maral272/v4-core/HEAD/yarn.lock --------------------------------------------------------------------------------