# 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`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gains.trade/developer/technical-reference/contracts/changelogs/v9.1.1-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
