Wild Credit contest - 0xRajeev'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: 4/13

Findings: 4

Award: $2,077.87

🌟 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

0xRajeev

Vulnerability details

Impact

UniswapV3Oracle contract uses Chainlink’s deprecated API latestAnswer(). Such functions might suddenly stop working if Chainlink stopped supporting deprecated APIs.

Impact: Deprecated API stops working. Prices cannot be obtained. Protocol stops and contracts have to be redeployed.

Proof of Concept

See similar Low-severity finding L11 from OpenZeppelin's Audit of Opyn Gamma Protocol: https://blog.openzeppelin.com/opyn-gamma-protocol-audit/

See https://docs.chain.link/docs/deprecated-aggregatorinterface-api-reference/#latestanswer.

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

Tools Used

Manual Analysis

Use V3 interface functions: https://docs.chain.link/docs/price-feeds-api-reference/

#0 - talegift

2021-07-14T14:34:05Z

#75

Findings Information

🌟 Selected for report: jonah1005

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

Labels

bug
duplicate
2 (Med Risk)

Awards

360.7268 USDC - $360.73

External Links

Handle

0xRajeev

Vulnerability details

Impact

The “safe” versions of token transfer/transferFrom as implemented either by OpenZeppelin’s SafeERC20 or Uniswap libraries, use a low-level call and make checks on the return data to handle cases where tokens may not return any value on transfer/transferFrom and make sure that when they do so, it is a boolean whose value is true.

The functions safeTransfer() and safeTransferFrom() implemented here do not do that and instead are wrappers around token transfer/transferFrom checking for their returned boolean values. This will not work as expected, i.e. cause a revert, with tokens that do not return a boolean in these functions.

Proof of Concept

https://github.com/code-423n4/2021-07-wildcredit/blob/82c48d73fd27a9d4d5d4a395b3affcef4ef6c5c8/contracts/TransferHelper.sol#L19-L23

https://github.com/code-423n4/2021-07-wildcredit/blob/82c48d73fd27a9d4d5d4a395b3affcef4ef6c5c8/contracts/LendingPair.sol#L468-L474

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/3935b907d40c9a23b04b721c2f61758df1caf722/contracts/token/ERC20/utils/SafeERC20.sol#L20-L97

https://github.com/Uniswap/uniswap-lib/blob/c01640b0f0f1d8a85cba8de378cc48469fcfd9a6/contracts/libraries/TransferHelper.sol#L6-L51

Tools Used

Manual Analysis

Re-evaluate the function implementations in the context of OZ and Uniswap versions.

#0 - talegift

2021-07-16T02:35:24Z

#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