Closed sherlock-admin closed 8 months ago
3 comment(s) were left on this issue during the judging contest.
panprog commented:
invalid, UniswapAdapter allows to set arbitrary path (
setPath
), each segment in the path also specifies fee. If needed, admin can set such path from 1 segment with the needed fee. The usage of default fee seems to be intended functionality.
tsvetanovv commented:
Known issue. Check readme: "DEX SWAP: issues related to impacts of fees and slippage are known and mitigated"
takarez commented:
invalid
hals
medium
UniswapAdapter
uses a hardcoded_DEFAULT_FEE
for UNIV3 poolsSummary
UniswapAdapter
uses a hardcoded_DEFAULT_FEE
for UNIV3 poolsVulnerability Detail
The protocol integrates with Uniswap V3 as an underlying DEX to swap side tokens for base tokens of vaults via
UniswapAdapter
contract, where it uses a 0.05% fee pool regardless of the swapped asset, and by knowing that there are multiple pool tiers for the same side/base tokens pair; then it's possible that there are other pools (pools with fees different than 0.05%) where majority of the liquidity lies instead.Impact
Also, it could be possible that pools with 0.05% fee for specific side/base token pairs are not created (knowing that the protocol is supposed to be deployed initially on Arbitrum, then later on other L2s), so any attempts to swap via the specified path will fail, breaking base tokens swapping for liquidity and payoffs.
Code Snippet
UniswapAdapter._DEFAULT_FEE
UniswapAdapter.getPath function
UniswapAdapter._swapOutSingle function
UniswapAdapter._swapInSingle function
Tool used
Manual Review
Recommendation
Add a customizable pool fee for each side/base token pairs.