Submitted by leastwood
The shelter mechanism provides emergency functionality in an effort to protect users funds. The enterShelter function will withdraw all LP tokens from the pool, transfer them to the shelter contract and activate the shelter for the target LP token. Conversely, the exitShelter function will deactivate the shelter and transfer all LP tokens back to the ConvexStakingWrapper.sol contract.
Unfortunately, LP tokens arent restaked in the pool, causing LP tokens to be stuck within the contract. Users will be unable to withdraw their LP tokens as the withdraw function attempts to withdrawAndUnwrap LP tokens from the staking pool. As a result, this function will always revert due to insufficient staked balance. If other users decide to deposit their LP tokens, then these tokens can be swiped by users who have had their LP tokens locked in the contract.
This guarantees poor UX for the protocol and will most definitely lead to LP token loss.
ConvexStakingWrapper.sol#L121-L130
ConvexStakingWrapper.sol#L309-L331
Manual code review.
Confirmation from Taek.
Consider re-depositing LP tokens upon calling exitShelter. This should ensure the same tokens can be reclaimed by users wishing to exit the ConvexStakingWrapper.sol contract.
leekt (Concur) confirmed
Alex the Entreprenerd (judge) commented:
