Open zlsecure3 opened 1 year ago
submission_id:1772418690
review_type:GRADING
result: TBD-yes,no
rating: TBD-123
comment: TBD-Rejected,Accepted by Secure3.
severity: TBD-Critical,Medium,Low,Informational
category:
description:
submission_id:1772418690
review_type:CLIENT_FEEDBACK
result: TBD-yes,no
severity: TBD-Critical,Medium,Low,Informational
comment:
submission_id:1772418690
review_type:CLIENT_FEEDBACK_DECISION
result: TBD-yes,no,yes-honored,no-honored
severity: TBD-Critical,Medium,Low,Informational
comment:
subject
The price will be wrong when the token's USD price feed's decimals != 8
description
PriceOracle assumes and inexplicitly requires the token's USD feed's decimals to be 8. However, there are certain token's USD feed has a different decimals.
In the current implementation, it assumes basePriceDecimals == quotePriceDecimals
However, there are tokens with USD price feed's decimals != 8 (E.g: AMPL / USD feed decimals = 18)
When the token's USD feed's decimals != 8, getIndexPrice() will return an incorrect price.
recommendation
Consider adding a check for feed.decimals() to make sure feed's decimals = 8:
locations
severity
Medium
damage
exploitability
category
Logical
system_generated: auditor:thereksfour submission_id:1772418690