The LiquidityManagement contract, which inherits from PeripheryPayments, is vulnerable to disruptions caused by token blocklists (e.g., USDT) during Uniswap V3 liquidity provision. This report outlines how blocklisted addresses can impede the contract's operation in the context of adding liquidity to Uniswap V3 pools.
Flow of Execution
A user initiates the addition of liquidity through the LiquidityManagement contract.
The addLiquidity function of LiquidityManagement calls pool.mint, intending to deposit tokens into a Uniswap V3 pool.
The Uniswap V3 pool, in turn, calls the uniswapV3MintCallback function.
Within the uniswapV3MintCallback, the pay function from PeripheryPayments is called to transfer tokens.
Token transfers are attempted using the TransferHelper.safeTransfer or TransferHelper.safeTransferFrom methods.
Transaction Reverts: When a blocklisted contract address attempts to execute safeTransferFrom, the transaction fails, reverting with an error if the token enforces blocklisting.
Scenario Simulation: Deploying these contracts in a test environment and simulating the addition of liquidity using a blocklisted token results in transaction failures, as predicted by the contract's logic.
Impact
Users attempting to provide liquidity involving blocklisted tokens experience transaction failures, leading to loss of gas fees.
Recommended Mitigation Steps
Before initiating token transfers, implement a function to check the blocklist status of the involved addresses
Lines of code
https://github.com/code-423n4/2024-06-vultisig/blob/cb72b1e9053c02a58d874ff376359a83dc3f0742/src/base/LiquidityManagement.sol#L20 https://github.com/code-423n4/2024-06-vultisig/blob/cb72b1e9053c02a58d874ff376359a83dc3f0742/src/base/PeripheryPayments.sol#L21
Vulnerability details
Summary
The LiquidityManagement contract, which inherits from PeripheryPayments, is vulnerable to disruptions caused by token blocklists (e.g., USDT) during Uniswap V3 liquidity provision. This report outlines how blocklisted addresses can impede the contract's operation in the context of adding liquidity to Uniswap V3 pools.
Flow of Execution
LiquidityManagement
contract.addLiquidity
function ofLiquidityManagement
callspool.mint
, intending to deposit tokens into a Uniswap V3 pool.uniswapV3MintCallback
function.uniswapV3MintCallback
, thepay
function fromPeripheryPayments
is called to transfer tokens.TransferHelper.safeTransfer
orTransferHelper.safeTransferFrom
methods.Vulnerable Code
https://github.com/code-423n4/2024-06-vultisig/blob/cb72b1e9053c02a58d874ff376359a83dc3f0742/src/base/LiquidityManagement.sol#L20
https://github.com/code-423n4/2024-06-vultisig/blob/cb72b1e9053c02a58d874ff376359a83dc3f0742/src/base/PeripheryPayments.sol#L21
Proof of Concept
safeTransferFrom
, the transaction fails, reverting with an error if the token enforces blocklisting.Impact
Users attempting to provide liquidity involving blocklisted tokens experience transaction failures, leading to loss of gas fees.
Recommended Mitigation Steps
Before initiating token transfers, implement a function to check the blocklist status of the involved addresses
Assessed type
ERC20