DittoETH - XDZIBECX's results

A decentralized stablecoin protocol with an order book design for supercharged staking yield.

General Information

Platform: Code4rena

Start Date: 15/03/2024

Pot Size: $60,500 USDC

Total HM: 16

Participants: 43

Period: 21 days

Judge: hansfriese

Total Solo HM: 5

Id: 348

League: ETH

DittoETH

Findings Distribution

Researcher Performance

Rank: 29/43

Findings: 1

Award: $67.25

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: Infect3d

Also found by: Evo, LinKenji, XDZIBECX, falconhoof, foxb868, ilchovski, klau5, nonseodion

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
:robot:_114_group
duplicate-114

Awards

67.2468 USDC - $67.25

External Links

Lines of code

https://github.com/code-423n4/2024-03-dittoeth/blob/91faf46078bb6fe8ce9f55bcb717e5d2d302d22e/contracts/facets/RedemptionFacet.sol#L75

Vulnerability details

Impact

useing a cached oracle price (LibOracle.getPrice(p.asset)) with a 15-minute validity window to enhance the efficiency of the hint system for order placement. This design choice can lead to scenarios where the cached price does not reflect the current market conditions accurately due to volatility in the cryptocurrency markets The discrepancy between the cached oracle price and the actual market price at the time of redemption can result in unfair redemption outcomes. Proposers of redemptions might either benefit unduly or suffer losses due to the stale price information,

Proof of Concept

here is an example show the bug : Initial Cached Oracle Price: 100 Elapsed Time Since Last Oracle Update: 10 minutes (within the 15-minute cache window) Market Price: 120 Proposer's Price View: 118 (The price proposer believes to be accurate based on their information)

  • The contract's cached oracle price is 100, which is outdated but still within the cache window, so it hasn't been updated.
  • A user proposes a redemption based on their view that the oracle price is 118, which is close to the actual market price of 120.
  • The contract compares the proposer's price view (118) against the cached oracle price (100).
  • The price discrepancy (|118 - 100| = 18) exceeds 5% of the cached oracle price (5% of 100 = 5), leading to an "Unfair Redemption" classification due to significant price movement not reflected in the cached price

Tools Used

manual review

need to add update mechanism that adjusts the frequency of oracle price updates based on observed market volatility.

Assessed type

Other

#0 - c4-pre-sort

2024-04-06T06:02:53Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2024-04-06T06:03:05Z

raymondfam marked the issue as duplicate of #114

#2 - raymondfam

2024-04-06T06:03:39Z

See #114.

#3 - c4-judge

2024-04-11T16:12:31Z

hansfriese marked the issue as satisfactory

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