DoS: The `initProject` function can be subject to a denial-of-service (DoS) attack if a malicious attacker creates a `WETH/VULT` pool on Uniswap V3 and initializes the initial price incorrectly earlier. #24
A malicious attacker can create WETH/VULT pools with different fees and initialize those pools incorrectly before the vaultsig team calls the initProject function. As a result, this function either reverts or the protocol team is unable to initialize the pools as they intended.
Proof of Concept
A protocol team initializes a project by calling the initProject function. This function initializes the Uniswap V3 pool(L63).
The _initUniV3PoolIfNecessary function creates a WETH/VULT pool if it does not exist. If the pool exists, it gets the current price of the pool and initializes it if the price is 0. If the current price of the pool is not 0, it checks if the current price is equal to sqrtPriceX96, the value of InitProjectParams.
If a malicious attacker creates WETH/VULT pools and initializes them with an incorrect price (not $0.03, as intended by the Vaultsig team) earlier than the protocol team, the _initUniV3PoolIfNecessary function can be subject to a denial-of-service (DoS) attack.
Tools Used
Manual Review
Recommended Mitigation Steps
The protocol team should create WETH/VULT pools and initialize them with proper prices via a deployer with the deployment of the Vult token contract.
Lines of code
https://github.com/code-423n4/2024-06-vultisig/blob/0957ff9e50441cd6de6b4f6e28c7ea93f5cffa85/src/ILOManager.sol#L57-L65
Vulnerability details
Impact
A malicious attacker can create
WETH/VULT
pools with different fees and initialize those pools incorrectly before the vaultsig team calls the initProject function. As a result, this function either reverts or the protocol team is unable to initialize the pools as they intended.Proof of Concept
A protocol team initializes a project by calling the initProject function. This function initializes the Uniswap V3 pool(L63).
The _initUniV3PoolIfNecessary function creates a
WETH/VULT
pool if it does not exist. If the pool exists, it gets the current price of the pool and initializes it if the price is0
. If the current price of the pool is not0
, it checks if the current price is equal tosqrtPriceX96
, the value ofInitProjectParams
.If a malicious attacker creates
WETH/VULT
pools and initializes them with an incorrect price (not $0.03, as intended by the Vaultsig team) earlier than the protocol team, the _initUniV3PoolIfNecessary function can be subject to a denial-of-service (DoS) attack.Tools Used
Manual Review
Recommended Mitigation Steps
The protocol team should create
WETH/VULT
pools and initialize them with proper prices via a deployer with the deployment of theVult
token contract.Assessed type
DoS