v9.1.1 Update

Summary

  • Apply fee tiers to oracle rewards

Full Changelog

core/facets/GNSPriceAggregator.sol (update)

  • getPrice and getLinkFee now accept _trader argument

interfaces/libraries/IPriceAggregatorUtils.sol (update)

  • Adjusted getPrice and getLinkFee functions definitions

  • Updated PriceRequested event: now emits trader address, and collateralIndex/trader/pairIndex are now the indexed properties (orderType and job no longer indexed)

libraries/updateLeverage/UpdateLeverageLifecycles.sol (update)

  • _initiateRequest: small adjustment to avoid stack too deep, now passes _trade.user to getPrice

libraries/updatePositionSize/UpdatePositionSizeLifecycles.sol (update)

  • _initiateRequest: passes _trade.user to getPrice

libraries/PriceAggregatorUtils.sol (update)

  • Library is now external

  • getPrice now accepts _trader argument, refreshes fee tier for _trader right before calculating link fee, passes _trader to getLinkFee to apply his fee tier to the oracle link fees, and PriceRequested now emits _trader

  • getLinkFee now accepts _trader and applies his fee tier to the link fee result

libraries/TradingInteractionsUtils.sol (update)

  • closeTradeMarket: passes t.user to getPrice

  • triggerOrder: refreshes t.user's fee tier before receiving the link fee from the caller, passes t.user to getLinkFee

  • _openTrade: passes _trade.user to getPrice

  • _getPriceTriggerOrder: passes _trade.user to getPrice

Last updated