Platform: Code4rena
Start Date: 04/03/2024
Pot Size: $88,500 USDC
Total HM: 31
Participants: 105
Period: 11 days
Judge: ronnyx2017
Total Solo HM: 7
Id: 342
League: ETH
Rank: 56/105
Findings: 1
Award: $92.11
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Aymen0909
Also found by: KupiaSec, Topmark, befree3x, kennedy1030, linmiaomiao, pynschon
92.1136 USDC - $92.11
When depositing, the vault checks if the GlobalLendLimit
has been reached. It does this by comparing totalSupply()
against globalLendLimit
, but the totalSupply()
refers to the vault shares that have been minted and not the liquidity held in the vault.
The protocol will revert even when the GlobalLendLimit
hasn't been reached, since the exchange rate starts at 1:1 and keeps growing with time, the totalSupply()
will be less than assets.
None
Instead of (totalSupply() > globalLendLimit)
it should be _convertToAssets(totalSupply(), lendExchangeRateX96, Math.Rounding.Up)
, that way the globalLendLimit
would be compared against the liquidity.
Math
#0 - c4-pre-sort
2024-03-18T19:02:43Z
0xEVom marked the issue as sufficient quality report
#1 - c4-pre-sort
2024-03-18T19:03:53Z
0xEVom marked the issue as duplicate of #324
#2 - c4-judge
2024-03-31T14:51:29Z
jhsagd76 marked the issue as satisfactory