Assessment reports>Tradoor>Threat Model>Message: FeedPrices

Message: FeedPrices

This operation allows an executor to provide updated prices as well as new values for globalRolloverFeeGrowth and globalLpFundingFeeGrowth. The message is only accepted if sent by one of the allowlisted executor addresses.

The updated prices are provided as a map that completely replaces the previous prices stored in the contract storage. The keys and values of the new map — corresponding to the asset ID and price, respectively — are not validated in any way.

The message handler recalculates the fees due to the protocol and to the liquidity providers.

Liquidity-provider fees are increased by two logical factors:

  1. msg.lpFundingFeeGrowth - self.globalLpFundingFeeGrowth — term due to funding fees

  2. (msg.rolloverFeeGrowth - self.globalRolloverFeeGrowth) * self.lpRolloverFeeRate / PERCENTAGE_BASIS_POINT — term due to a percentage of the rollover fees

Protocol fees are also increased by one logical factor: msg.rolloverFeeGrowth - self.globalRolloverFeeGrowth - lpRolloverFeeGrowthDelta (the remaining percentage of the rollover fees not credited to the LPs).

We note that the fee recalculation only determines an internal accounting change (to the self.globalLPFund and self.protocolTradingFee) and this handler does not transfer any assets.

The values used to compute the funding and rollover fees are completely under control of the message sender, which is trusted not to act maliciously in the security model of the contract.

Inputs

The incoming message has the following structure:

message FeedPrices { trxId: Int as uint64; lpFundingFeeGrowth: Int as coins; rolloverFeeGrowth: Int as coins; prices: map; }
  • trxId

    • Validation: None.

    • Impact: Identifier for the message — does not affect the handler logic.

  • lpFundingFeeGrowth

    • Validation: None.

    • Impact: Used to compute the updated funding fees.

  • rolloverFeeGrowth

    • Validation: None.

    • Impact: Used to compute the updated rollover fees.

  • prices

    • Validation: None.

    • Impact: Dictionary with updated prices, replacing all the previously stored prices.

Test coverage

This function is not exercised by the test suite.

Zellic © 2025Back to top ↑