DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: medium
Valid

priceFeedHeartbeatSeconds can't be updated

Description

The update function in MarketConfiguration.sol does not update priceFeedHeartbeatSeconds parameter of the market

/// @notice Updates the given market configuration.
/// @dev See {MarketConfiguration.Data} for parameter details.
function update(Data storage self, Data memory params) internal {
self.name = params.name;
self.symbol = params.symbol;
self.priceAdapter = params.priceAdapter;
self.initialMarginRateX18 = params.initialMarginRateX18;
self.maintenanceMarginRateX18 = params.maintenanceMarginRateX18;
self.maxOpenInterest = params.maxOpenInterest;
self.maxSkew = params.maxSkew;
self.maxFundingVelocity = params.maxFundingVelocity;
self.minTradeSizeX18 = params.minTradeSizeX18;
self.skewScale = params.skewScale;
self.orderFees = params.orderFees;
}

Impact

The updatePerpMarketConfiguration in GlobalConfigurationBranch.sol does not work as expected and will give the false expectation that it updates market parameters as expected when in reality priceFeedHeartbeatSeconds is not updated, this can lead to various issues with oracle down the line.

Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

`MarketConfiguration::update` function lacks `priceFeedHeartbeatSeconds` argument

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.