Wild Credit contest - greiart's results

Decentralized lending protocol with isolated lending pairs.

General Information

Platform: Code4rena

Start Date: 08/07/2021

Pot Size: $50,000 USDC

Total HM: 7

Participants: 13

Period: 7 days

Judge: ghoulsol

Total Solo HM: 5

Id: 18

League: ETH

Wild Credit

Findings Distribution

Researcher Performance

Rank: 2/13

Findings: 3

Award: $3,506.20

🌟 Selected for report: 11

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: a_delamo

Also found by: 0xRajeev, cmichel, greiart, shw

Labels

bug
duplicate
2 (Med Risk)

Awards

360.7268 USDC - $360.73

External Links

Handle

greiart

Vulnerability details

Impact

Freshness of the returned ETH price should be checked, since it affects an account's health (and therefore liquidations).

The latestAnswer() function is deprecated (see comment on EACAggregatorProxy), and the use latestRoundData() is recommended instead.

Referenced Codelines

https://github.com/code-423n4/2021-07-wildcredit/blob/main/contracts/UniswapV3Oracle.sol#L94

Recommend Mitigation Steps

Use latestRoundData() instead of latestAnswer(), and check the timestamp value returned for freshness.

(, int256 price, ,uint256 updatedAt,) = wethOracle.latestRoundData(); // example of needing price to have been updated at max 5 mins ago require(updatedAt >= block.timestamp - 5 minutes, 'expired price'); // TODO: convert price to uint

#0 - talegift

2021-07-14T10:34:19Z

#75

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