Lybra Finance - Cryptor's results

A protocol building the first interest-bearing omnichain stablecoin backed by LSD.

General Information

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

Lybra Finance

Findings Distribution

Researcher Performance

Rank: 125/132

Findings: 1

Award: $1.32

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

1.3247 USDC - $1.32

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
duplicate-27

External Links

Lines of code

https://github.com/code-423n4/2023-06-lybra/blob/7b73ef2fbb542b569e182d9abf79be643ca883ee/contracts/lybra/pools/LybraRETHVault.sol#L9-L11 https://github.com/code-423n4/2023-06-lybra/blob/7b73ef2fbb542b569e182d9abf79be643ca883ee/contracts/lybra/pools/LybraRETHVault.sol#L46-L49

Vulnerability details

Impact

Wrong function called in rETH implementation

Proof of Concept

The function getAssetPrice relies on the function getexchangeratio called using an interface for the rockettoken interface, in order to calculate the rETH exchange rate for a collateral asset. The problem is that the function getexchangeratio does not exist in the in the interface.

https://github.com/rocket-pool/rocketpool/blob/master/contracts/interface/token/RocketTokenRETHInterface.sol#L1C7-L1C8

That means that the function getAssetprice will revert when called

Tools Used

Manual Review

Use the function getexchangerate from rockettoken rETH interface

https://github.com/rocket-pool/rocketpool/blob/6a9dbfd85772900bb192aabeb0c9b8d9f6e019d1/contracts/interface/token/RocketTokenRETHInterface.sol#L10

Assessed type

Other

#0 - c4-pre-sort

2023-07-04T13:17:50Z

JeffCX marked the issue as duplicate of #27

#1 - c4-judge

2023-07-28T17:14:12Z

0xean changed the severity to 2 (Med Risk)

#2 - c4-judge

2023-07-28T17:15:15Z

0xean marked the issue as satisfactory

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter