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: 121/132
Findings: 1
Award: $9.93
🌟 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
Oracles should be used to return the price of a token and not the price of another token similar. A bad example is using an oracle to get the price of a token as the price of the derivative. This shouldn't be done because the price of the derivative will not always align with the price of the original token. The primitives that support the derivative may have issues which do not affect the original token which can lead to price discrepancies.
In LybraStETHVault
it is inferred that the price of ETH is returned from the oracle instead of stEth. Lido the entity supporting stEth can have issues like smart contract hacks which might affect the price of stEth but not Eth.
The Natspec comment specifies that amount
argument must be greater than zero in the burn
function of LybraEUSDVaultBase
but it isn't checked in the code.
A user's position's health should be easily accessible by other contracts and the outside world. Currently, the _checkHealth function is internal in LybraEUSDVaultBase
so it's not easily accessible in LybraStETHVault
which inherits from it. Other entities would have to perform multiple calls to get the health of an address's position.
#0 - JeffCX
2023-07-27T16:13:21Z
Oracle should return price of stETH and not ETH
Captured by the bot
Unchecked input parameter
NC
An address’s positions health can’t be checked publicly
worth reviewing
#1 - c4-pre-sort
2023-07-27T16:14:05Z
JeffCX marked the issue as high quality report
#2 - c4-judge
2023-07-27T23:51:43Z
0xean marked the issue as grade-b
#3 - c4-sponsor
2023-07-29T08:59:30Z
LybraFinance marked the issue as sponsor acknowledged