Compatibility issue: import different version of contracts from Uniswap
Summary
The project import both uniswap/v3-core and uniswap/v3-core-0.8-support. It is better to unify these two versions in project to avoid possible compatible problem.
Vulnerability Detail
@uniswap/v3-core-0.8-support/contracts/libraries/FullMath.sol is imported in some files, like dn-gmx-vaults/contracts/libraries/FeeSplitStrategy.sol and dn-gmx-vaults/contracts/vaults/DnGmxSeniorVault.sol. While some other .sol files import @uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol.
zimu
low
Compatibility issue: import different version of contracts from Uniswap
Summary
The project import both
uniswap/v3-core
anduniswap/v3-core-0.8-support
. It is better to unify these two versions in project to avoid possible compatible problem.Vulnerability Detail
@uniswap/v3-core-0.8-support/contracts/libraries/FullMath.sol
is imported in some files, likedn-gmx-vaults/contracts/libraries/FeeSplitStrategy.sol
anddn-gmx-vaults/contracts/vaults/DnGmxSeniorVault.sol
. While some other .sol files import@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol
.Impact
It may encounter compatible problem.
Code Snippet
The files import
v3-core-0.8-support
https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/libraries/FeeSplitStrategy.sol#L1 https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/vaults/DnGmxSeniorVault.sol#L1 https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/periphery/WithdrawPeriphery.soll#L1 https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/vaults/DnGmxBatchingManager.sol#L1 https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/vaults/DnGmxSeniorVault.sol#L1The files import
v3-core
throughimport { ISwapRouter } from '@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol'
https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/vaults/DnGmxJuniorVault.sol#L1 https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/mocks/SwapRouterMock.sol#L1 https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/mocks/DnGmxJuniorVaultMock.sol#L1 https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/interfaces/IDnGmxJuniorVault.sol#L1 https://github.com/sherlock-audit/2022-10-rage-trade/blob/main/dn-gmx-vaults/contracts/libraries/DnGmxJuniorVaultManager.sol#L1Tool used
Manual Review
Recommendation
Unify these two versions in project to avoid possible compatible problem.