Skip to content

Oracle Uses Manipulable Curve Pool Function

Description

The oracle uses the get_p() Curve pool function which can be manipulated via flashloan to calculate the asset price, potentially leading to incorrect calculations.

Examples

Insecure Code

solidity
contract Oracle { function getPrice() public view returns (uint) { return get_p(); } }

Secure Code

solidity
contract Oracle { function getPrice() public view returns (uint) { return securePriceOracle.getPrice(); } }

Remediation

Use a secure price oracle that is resistant to flashloan manipulation.

Rule Details

FieldValue
IDCODE-0228
CategoryCrypto
SeverityHIGH
CWECWE-682
ConfidenceLOW
ImpactHIGH
LikelihoodLOW
ExploitabilityMODERATE
Tagsoracle, flashloan, curve
OWASPN/A

References