"totalDepositCap is the maximum amount of value that can be deposited", however, it is compared against totalSupply() which is the number of shares and may be different than the deposited amount.
Recommended Mitigation Steps
Either track the amounts and check against the sum of them or remove the confusion by naming this variable something like totalSharesCap and updating comments.
Handle
pauliax
Vulnerability details
Impact
"totalDepositCap is the maximum amount of value that can be deposited", however, it is compared against totalSupply() which is the number of shares and may be different than the deposited amount.
Recommended Mitigation Steps
Either track the amounts and check against the sum of them or remove the confusion by naming this variable something like totalSharesCap and updating comments.