Submitted by thank_you, also found by b0g0 and ktg
M-12: Wrong global lending limit check in _deposit function
Revert utilizes a global lend limit to ensure that lenders do not exceed a global lend limit. Unfortunately, the global lend limit is denominated in assets. The value it compares itself to is totalSupply(), which is denominated in shares. This comparison is invalid since both values are in different denominations.
https://github.com/revert-finance/lend/blob/audit/src/V3Vault.sol?plain=1#L961-L963
The _deposit() function incorrectly utilizes the wrong denomination when comparing the globalLendLimit to the number of shares. The globalLendLimit denomination is set in assets. However, totalSupply() + shares denomination is set in shares. This makes this comparison check incorrect and can lead to more assets being lent than anticipated. 
More assets may be deposited than expected. 
Reviewing the function below:
Since totalSupply() + shares are denominated as shares and globalLendLimit as assets, the comparison is incorrect.
Convert the totalSupply() + shares to the correct denomination in assets:
Math 
