Fixed fee level is used when swap tokens on Uniswap.
The SmartVaultV3.swap
function is designed for swapping collateral tokens. It constructs the ISwapRouter.ExactInputSingleParams
with a constant fee of 3000 (0.3%). However, not all Uniswap pools operate at this fee level. For instance, the XMON/ETH pool on Mainnet (0x59b4bb1f5d943cf71a10df63f6b743ee4a4489ee) has a 1% fee, and the WETH/BOB pool on Optimism (0x1a54ae9f662b463f8d432482975c17e51518b50d) charges 0.05%.
This fixed fee approach poses several issues:
It restricts swaps to pools with a 0.3% fee, potentially leading to suboptimal liquidity utilization. For example, the USDC/ETH pool with 0.05% fees has $161.32 million in TVL, compared to $71.89 million in the 0.3% fee pool. Higher liquidity pools could reduce slippage, offering better rates for users. A fixed fee can lead to missed opportunities for optimal swaps.
The approach may cause transactions to revert when attempting to swap in non-existent pools with the fixed fee level.
Manual Review
Modify the SmartVaultV3.swap
function to accept a variable fee parameter, enhancing flexibility and addressing the outlined issues. This change involves passing the fee as a parameter to the function, allowing for dynamic fee adjustments based on pool characteristics.
By adopting this recommendation, the SmartVaultV3 will be able to interact more effectively with a broader range of liquidity pools, improving swap efficiency and potentially reducing transaction failures.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.