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
Rank: 101/105
Findings: 1
Award: $6.61
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: b0g0
Also found by: 0x175, 0xAlix2, 0xblackskull, 0xspryon, 14si2o_Flint, Fitro, Giorgio, MSaptarshi, MohammedRizwan, Silvermist, boredpukar, crypticdefense, grearlake, kfx, maxim371, y0ng0p3
6.6125 USDC - $6.61
Usage of slot0
is extremely easy to manipulate
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();
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.
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)