Assessment reports>Orderly Network>Threat Model>perpPriceUpload

Function: perpPriceUpload(MarketTypes.UploadPerpPrice data)

The function updates perpMarketCfg.indexPriceOrderly, perpMarketCfg.markPrice, and perpMarketCfg.lastMarkPriceUpdated configuration in marketManager contract. The function can be called only by trusted Operator.

Inputs

  • data

    • Control: Controlled by operator.

    • Constraints: Verify that perpPrices is signed by cefiMarketUploadAddress.

    • Impact: The perpMarketCfg configuration is not used in any way — without impact.

Branches and code coverage

Intended branches

  • perpMarketCfg is updated properly.

Negative behavior

  • Caller is not trusted operator.

  • data.perpPrices is not signed by cefiMarketUploadAddress.

Function call analysis

  • _innerPing()

    • External/Internal? Internal.

    • Argument control? N/A.

    • Impact: Update the lastOperatorInteraction by current timestamp.

  • _perpMarketInfo(data) -> marketManager.updateMarketUpload(data)

    • External/Internal? External.

    • Argument control? The data is controlled by operator.

    • Impact: Updates perpMarketCfg configuration in marketManager.

Zellic © 2024Back to top ↑