# BGD. Swap of price feed of xSUSHI on Aave v2 Ethereum

**URL:** <https://governance.aave.com/t/bgd-swap-of-price-feed-of-xsushi-on-aave-v2-ethereum/11901>\
**Category:** Development\
**Created:** [February 15, 2023, 4:34pm UTC](https://governance.aave.com/t/bgd-swap-of-price-feed-of-xsushi-on-aave-v2-ethereum/11901 "2023-02-15T16:34:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgdlabs](https://dub1.discourse-cdn.com/flex013/user_avatar/governance.aave.com/bgdlabs/32/1829_2.png) [@bgdlabs](https://governance.aave.com/u/bgdlabs)\
**Post date:** [February 15, 2023, 4:34pm UTC](https://governance.aave.com/t/bgd-swap-of-price-feed-of-xsushi-on-aave-v2-ethereum/11901/1 "2023-02-15T16:34:21Z")

</div>

## TL;DR

Proposal to swap the current xSUSHI price adapter feed for the Chainlink calculated xSUSHI/ETH feed, on Aave v2 Ethereum, in order to optimize gas cost and follow good practices.

  

## Rationale

When xSUSHI was listed on Aave v2 Ethereum, it was not the norm for Chainlink to provide price feeds calculated off-chain, on tokens whose prices depend on an underlying, like in the case of xSUSHI and SUSHI.

Because of that, an [adapter price feed](https://etherscan.io/address/0x9b26214bEC078E68a394AaEbfbffF406Ce14893F) was set up to price xSUSHI, using the SUSHI/ETH Chainlink feed and the ratio SUSHI/xSUSHI under the hood.  
Even if this is valid and at the moment completely functional, there are 2 aspects by which it is way less optimal than an off-chain calculated equivalent feed, in practice doing the same calculation:

1. **Gas-wise**. Every time the protocol queries the price of xSUSHI, the adapter needs to do the calculation from SUSHI/ETH and the SUSHI/xSUSHI ratio, which is relatively gas expensive.
2. **Additional unnecessary risk**. Even if not applicable at the moment, with xSUSHI not enabled to borrow on Aave v2 Ethereum (and even frozen), as described [here](https://governance.aave.com/t/analysis-of-xsushis-incident/6335), if borrowing would be enabled by any chance by mistake, that could lead to troubles, which can be fully removed by swapping to the calculated price feed.

  

## The proposal

The action to be executed is really simple, and given its fully technical nature, we don’t think Snapshot is required, only the on-chain governance proposal.

The payload will simply consist of calling the `AaveOracle` of Aave v2 Ethereum and replacing the current feed of xSUSHI with [its calculated version.](https://etherscan.io/address/0xF05D9B6C08757EAcb1fbec18e36A1B7566a13DEB#code)

In order to get extra assurance we did back-testing comparing both price feeds (working adapter vs off-chain calculated feed) for the last past year, in intervals of 2 hours, with the following results:

- In 24.88% of the cases, both prices differ by less than 0.1%.
- In 55.63% they differ between 0.1% and 1%.
- In 19.49% they differ between 1% and 2%.

Given the 2% default Chainlink deviation on both the SUSHI/ETH and calculated xSUSHI/ETH, and as expected, the swap should not create any meaningful problem.  
Still, same as with any other asset, **we encourage people using xSUSHI on the protocol to keep a healthy Health Factor, as if the swap will act as another price update, which could lead to liquidation with HF really close to 1 (e.g. 1.001)**.

## Next steps

We will be submitting a governance proposal during the following days, for the community to approve the price feed swap.

---

<div class="post-metadata">

**Author:** ![bgdlabs](https://dub1.discourse-cdn.com/flex013/user_avatar/governance.aave.com/bgdlabs/32/1829_2.png) [@bgdlabs](https://governance.aave.com/u/bgdlabs)\
**Post date:** [February 20, 2023, 1:00pm UTC](https://governance.aave.com/t/bgd-swap-of-price-feed-of-xsushi-on-aave-v2-ethereum/11901/2 "2023-02-20T13:00:57Z")

</div>

We have created a governance proposal to proceed with the price feed swap. Voting will be open in approximately 24h from now.

[https://app.aave.com/governance/proposal/?proposalId=160](https://app.aave.com/governance/proposal/?proposalId=160)

---

<div class="post-metadata">

**Author:** ![bgdlabs](https://dub1.discourse-cdn.com/flex013/user_avatar/governance.aave.com/bgdlabs/32/1829_2.png) [@bgdlabs](https://governance.aave.com/u/bgdlabs)\
**Post date:** [February 25, 2023, 8:34am UTC](https://governance.aave.com/t/bgd-swap-of-price-feed-of-xsushi-on-aave-v2-ethereum/11901/3 "2023-02-25T08:34:28Z")

</div>

We can confirm that, after being approved by the Aave Governance, the price feed of xSUSHI has been swapped to the [Chainlink calculated xSUSHI/ETH](https://etherscan.io/address/0xF05D9B6C08757EAcb1fbec18e36A1B7566a13DEB#readContract#F8), on Aave v2 Ethereum.
