Assessment reports>Origami Finance>Threat Model>_chainlinkPrice

Function: _chainlinkPrice(IAggregatorV3Interface oracle, uint256 scalar, bool scaleDown, uint256 stalenessThreshold, OrigamiMath.Rounding roundingMode)

Gets latest Chainlink price.

Inputs

  • oracle

    • Control: Full.

    • Constraints: None.

    • Impact: The oracle to use.

  • scalar

    • Control: Full.

    • Constraints: None.

    • Impact: Amount to scale price by.

  • scaleDown

    • Control: Full.

    • Constraints: None.

    • Impact: Scale direction.

  • stalenessThreshold

    • Control: Full.

    • Constraints: None.

    • Impact: Freshness threshold of the oracle price.

  • roundingMode

    • Control: Full.

    • Constraints: None.

    • Impact: Rounding direction.

Branches and code coverage

Intended branches

  • Scales and rounds in specified directions.

Negative behavior

  • Verify that the response is fresh enough.

Zellic © 2025Back to top ↑