[M-1] Users can deposit ERC 20 not accounted by any LiquidationPair and potentially freezing the deposits to the PrizePool
Summary
An ERC20's yield can not be liquidated if there is no LiquidationPair.
Vulnerability Detail
A user can deposit into the vault an ERC20 to be deposited into an ERC4626 to generate yield, such yield is to be liquidated by a LiquidationPair, but if no liquidator includes said ERC20 as __tokenIn, it's yield, can not be liquidated, and therefor it can not be deposited into PrizePool.sol, worst case scenario, the share _mintLimit can be reached with this unliquidatable token, meaning that the vault can be frozen if the user refuse to withdraw.
MrCrowNFT
medium
[M-1] Users can deposit ERC 20 not accounted by any
LiquidationPair
and potentially freezing the deposits to thePrizePool
Summary
An ERC20's yield can not be liquidated if there is no
LiquidationPair
.Vulnerability Detail
A user can deposit into the vault an ERC20 to be deposited into an ERC4626 to generate yield, such yield is to be liquidated by a
LiquidationPair
, but if no liquidator includes said ERC20 as__tokenIn
, it's yield, can not be liquidated, and therefor it can not be deposited intoPrizePool.sol
, worst case scenario, the share_mintLimit
can be reached with this unliquidatable token, meaning that the vault can be frozen if the user refuse to withdraw.Impact
Medium
Code Snippet
https://github.com/sherlock-audit/2024-05-pooltogether/blob/main/pt-v5-vault/src/PrizeVault.sol#L963-L998 https://github.com/sherlock-audit/2024-05-pooltogether/blob/main/pt-v5-tpda-liquidator/src/TpdaLiquidationPairFactory.sol#L40-L79
Tool used
Manual Review
Recommendation
Add a check on the
deposit
function to prevent deposit of an unliquidatable token.