The UniswapV3Oracle.tokenPrice function gets the price by combining the chainlink ETH price with the TWAP prices of the token <> pairToken and pairToken <> WETH pools.
It is therefore required that the pairToken <> WETH pool exists and has sufficient liquidity to be tamper-proof.
Impact
When listing lending pairs for tokens that have a WETH pair with low liquidity (at 0.3% fees) the prices can be easily manipulated leading to liquidations or underpriced borrows.
This can happen for tokens that don't use WETH as their default trading pair, for example, if they prefer a stablecoin, or WBTC.
Recommendation
Ensure there's enough liquidity on the pairToken <> WETH Uniswap V3 0.3% pair, either manually or programmatically.
Handle
cmichel
Vulnerability details
The
UniswapV3Oracle.tokenPrice
function gets the price by combining the chainlink ETH price with the TWAP prices of thetoken <> pairToken
andpairToken <> WETH
pools. It is therefore required that thepairToken <> WETH
pool exists and has sufficient liquidity to be tamper-proof.Impact
When listing lending pairs for tokens that have a WETH pair with low liquidity (at 0.3% fees) the prices can be easily manipulated leading to liquidations or underpriced borrows. This can happen for tokens that don't use
WETH
as their default trading pair, for example, if they prefer a stablecoin, orWBTC
.Recommendation
Ensure there's enough liquidity on the
pairToken <> WETH
Uniswap V3 0.3% pair, either manually or programmatically.