Wild Credit contest - shw'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: 5/13

Findings: 3

Award: $1,789.88

🌟 Selected for report: 1

🚀 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

shw

Vulnerability details

Impact

According to Chainlink's documentation, the latestAnswer function is deprecated. This function does not error if no answer has been reached but returns 0, causing an incorrect price fed to the UniswapV3Oracle.

Proof of Concept

Referenced code: UniswapV3Oracle.sol#L94

Referenced documentation: Chainlink - Deprecated API Reference Chainlink - Migration Instructions Chainlink - API Reference

Use the latestRoundData function to get the price instead. Add checks on the return data with proper revert messages if the price is stale or the round is uncomplete, for example:

(uint80 roundID, int256 price, , uint256 timeStamp, uint80 answeredInRound) = wethOracle.latestRoundData();
require(answeredInRound >= roundID, "...");
require(timeStamp != 0, "...");

#0 - talegift

2021-07-15T10:57:12Z

#75

Findings Information

🌟 Selected for report: jonah1005

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

Labels

bug
duplicate
1 (Low Risk)

Awards

360.7268 USDC - $360.73

External Links

Handle

shw

Vulnerability details

Impact

In the migrateRewards and _transferReward functions of RewardDistribution, the return values of rewardToken.transfer are not checked to be true. The return value could be false if the reward token is not ERC20-compliant, indicating that the transfer fails, and the calling contract will not notice the failure.

Proof of Concept

Referenced code: RewardDistribution.sol#L182 RewardDistribution.sol#L189 RewardDistribution.sol#L191

Replace transfer with the _safeTransfer function in the LendingPair contract.

#0 - talegift

2021-07-15T11:01:09Z

#67

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