The _addLiquidity function in the contract does not verify whether the pool associated with _poolId has already expired before allowing liquidity to be added. This omission can lead to unintended behavior, including users providing liquidity to an expired pool, which may result in locked or unusable funds.
This vulnerability allows users to add liqudity to pool which already expired.
Medium
Lack of Expiry Validation:
The function _addLiquidity retrieves pool parameters using getPoolParameters(_poolId). However, it does not check whether block.timestamp has already surpassed pool.expiryTime.
In the DIVA Protocol, expired pools should not accept additional liquidity since they are no longer active for trading or derivatives settlement.
Potential Consequences:
If liquidity is added to an expired pool, it may get locked and become unrecoverable, leading to financial loss for the user.
The protocol might not correctly handle cases where liquidity is provided to an expired pool, possibly leading to unexpected contract behavior.
Manual Review
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.