Open sherlock-admin2 opened 2 months ago
Escalate
On behalf of the watson
Escalate
On behalf of the watson
You've created a valid escalation!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
After additionally considering this issue, here's my understanding. Let's assume a scenario of 30% depeg and USDT = 0.7 USD.
Hence, even though it's not a direct loss of funds but a loss in value, this should be a valid medium (considering depeg as an extensive limitation). Thus, planning to accept the escalation and validate with medium severity. The duplicate is #113, are there any additional duplicates?
Result: Medium Has duplicates
4gontuk
Medium
LPs will withdraw more value than deposited during pegged token de-peg events
Summary
The
CONTEXT
function ingl-sherlock/contracts/api.vy
uses the<quote-token>/USD
price for valuation, assuming a 1:1 peg between the quote token and USD. This assumption can fail during de-peg events, leading to incorrect valuations and potential exploitation.Root Cause
The
CONTEXT
function calls theprice
function from theoracle
contract to get the price of the quote token. This price is adjusted based on thequote_decimals
, implying it is using the<quote-token>/USD
price for valuation.Detailed Breakdown
CONTEXT
Function inapi.vy
: TheCONTEXT
function calls theprice
function from theoracle
contract to get the price of the quote token.price
Function inoracle.vy
: Theprice
function inoracle.vy
uses theextract_price
function to get the price from the oracle.extract_price
Function inoracle.vy
: Theextract_price
function adjusts the price based on thequote_decimals
, which implies it is using the<quote-token>/USD
price for valuation.Impact
During a de-peg event, LPs can withdraw more value than they deposited, causing significant losses to the protocol.
Attack Path
Proof of Concept (PoC)
De-peg Event: The pegged token de-pegs to 0.70 USD (external event).
Withdraw:
Mitigation
To mitigate this issue, the protocol should use the
<base-token>/<quote-token>
price directly if available, or derive it from the<base-token>/USD
and<quote-token>/USD
prices. This ensures accurate valuations even if the quote token de-pegs from USD.