Revert Lend - MSaptarshi's results

A lending protocol specifically designed for liquidity providers on Uniswap v3.

General Information

Platform: Code4rena

Start Date: 04/03/2024

Pot Size: $88,500 USDC

Total HM: 31

Participants: 105

Period: 11 days

Judge: ronnyx2017

Total Solo HM: 7

Id: 342

League: ETH

Revert

Findings Distribution

Researcher Performance

Rank: 101/105

Findings: 1

Award: $6.61

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

6.6125 USDC - $6.61

Labels

bug
2 (Med Risk)
downgraded by judge
insufficient quality report
partial-50
:robot:_73_group
duplicate-175

External Links

Lines of code

https://github.com/code-423n4/2024-03-revert-lend/blob/435b054f9ad2404173f36f0f74a5096c894b12b7/src/V3Oracle.sol#L363

Vulnerability details

Impact

Usage of slot0 is extremely easy to manipulate

Proof of Concept

Protocol is using slot0 to calculate tokenPrice in their codebase, slot0 is the most recent data point and is therefore extremely easy to manipulate.

uint160 sqrtPriceX96; // if twap seconds set to 0 just use pool price if (twapSeconds == 0) { (sqrtPriceX96,,,,,,) = pool.slot0();

Tools Used

Manual Review

completely use a TWAP of higher time interval instead of slot0. since smaller time interval can be prone to flashLoan attacks , whereas higher interval is only prone to inaccurate prices , but since the protocol is also using ChainLink so it might not be much problem.

Assessed type

Uniswap

#0 - c4-pre-sort

2024-03-19T14:58:02Z

0xEVom marked the issue as duplicate of #191

#1 - c4-pre-sort

2024-03-19T14:58:24Z

0xEVom marked the issue as insufficient quality report

#2 - c4-judge

2024-03-31T14:28:13Z

jhsagd76 marked the issue as duplicate of #175

#3 - c4-judge

2024-03-31T14:43:55Z

jhsagd76 marked the issue as partial-50

#4 - c4-judge

2024-04-01T15:43:40Z

jhsagd76 changed the severity to 2 (Med Risk)

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