Platform: Code4rena
Start Date: 23/06/2023
Pot Size: $60,500 USDC
Total HM: 31
Participants: 132
Period: 10 days
Judge: 0xean
Total Solo HM: 10
Id: 254
League: ETH
Rank: 82/132
Findings: 2
Award: $74.49
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xnev
Also found by: 0xRobocop, 0xbrett8571, 0xkazim, 0xnacho, 3agle, 8olidity, ABAIKUNANBAEV, Bauchibred, Co0nan, CrypticShepherd, D_Auditor, DelerRH, HE1M, Iurii3, Kaysoft, MrPotatoMagic, RedOneN, RedTiger, Rolezn, SanketKogekar, Sathish9098, Timenov, Toshii, Vagner, bart1e, bytes032, codetilda, devival, halden, hals, kutugu, m_Rassska, naman1778, nonseodion, seth_lawson, solsaver, squeaky_cactus, totomanov, y51r, yudan, zaevlad
9.931 USDC - $9.93
require(newRatio >= 130 * 1e18 && newRatio <= 150 * 1e18 && newRatio <= vaultSafeCollateralRatio[pool] + 1e19, "LNA"); checks whether the newRatio >= 130% and <= 150% and the last check is to make sure that it's lower than current safeCollateralRatio of the pool + 10%. safeCollateralRatio is always above 160% as defined by the specification so there is no need to check the last condition at all as the second condition would be enough.
Code snippet: https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/configuration/LybraConfigurator.sol#L127
Code snippet:
Code snippet:
https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/configuration/LybraConfigurator.sol#L54 https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/configuration/LybraConfigurator.sol#L55
#0 - c4-pre-sort
2023-07-27T19:46:38Z
JeffCX marked the issue as high quality report
#1 - c4-judge
2023-07-27T23:56:53Z
0xean marked the issue as grade-b
#2 - c4-sponsor
2023-07-29T10:10:39Z
LybraFinance marked the issue as sponsor acknowledged
🌟 Selected for report: Sathish9098
Also found by: 0x3b, 0xbrett8571, ABAIKUNANBAEV, K42, MrPotatoMagic, hl_, ktg, peanuts, solsaver
64.5593 USDC - $64.56
Architecture recommendations:
Code snipppet:
depositAssetToMint(): https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/pools/base/LybraEUSDVaultBase.sol#L83
_mintEUSD():
_checkHealth():
Code snippet:
mintAmount parameter:
mintAmount check:
This means that the user will be heavily subjected to liquidations due to slight market fluctuations. It's better to have some lower limit but it's better not to have higher limit so the user can overcollateralize the minting.
Centralization risks:
Code snippet:
Code snippet: https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/configuration/LybraConfigurator.sol#L120
Code snippet: https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/configuration/LybraConfigurator.sol#L158-160
10 hours
#0 - c4-sponsor
2023-07-27T08:36:13Z
LybraFinance marked the issue as sponsor confirmed
#1 - c4-judge
2023-07-28T17:09:26Z
0xean marked the issue as grade-b
#2 - c4-judge
2023-07-28T18:36:42Z
0xean marked the issue as satisfactory