{"aip":10,"title":"Adding xSushi on AAVE","status":"WIP","author":"0xMaki (@0xMaki), Joseph Delong (@dangerousfood)","shortDescription":"Aave governance proposal to enable xSushi as a base asset","discussions":"https://governance.aave.com/t/listing-proposal-add-xsushi/1794","created":"2021-01-15T00:00:00.000Z","updated":"2021-02-08T00:00:00.000Z","preview":"## Simple Summary\nxSUSHI is the governance token of Sushiswap, a …","basename":"AIP-10","description":"\n## Simple Summary\nxSUSHI is the governance token of Sushiswap, a community-led DEX with a current TVL of more than 1.1B.\n\n## Abstract\nAdd xSushi to the AAVE V2 market.\n\n## Motivation\nAave would be the first platform to support xSushi a yield bearing asset with over of 100m$ currently under utilized.\n\nAavengers could use their platform of predilection to borrow their existing xSushi.\n\nSupport community-led projects.\n\n## Specification\nxSushi is one of the two currently supported assets for Sushi governance (ETH/SUSHI SLP being the other one). We are currently not fully decentralized but the members of the Ops multisig and Treasury multisig are bound to respect all of the governance votes. We do plan to be a real DAO most likely leveraging Aragon v2 in 6 to 12 months depending on the progress made by community.\n\nxSushi is receiving 0.05% of all the swaps happening on Sushiswap and should also benefits from all of the future revenues streams from upcoming platforms such as Bento-Miso-Gusoku-Deriswap and more.\n\nThe current yield on this asset alone is hovering around 10-40% APY with over $100MM locked in the Sushibar making it an ideal productive asset as collateral.\n\n## Rationale\n\nThe rationale for adding xSushi to the AAVE V2 market is simple; xSushi is a popular yield bearing asset but is currently incapable of being utilized for borrowing or lending.\n\nSUSHI can currently be borrowed and lent on [cream.finance](https://app.cream.finance/). However, xSushi cannot be borrowed or lent on any platform currently. By allowing xSushi to be borrowed and lent on AAVE v2, this will allow xSushi holders to access the liquidity of their platform\n\n\nThe rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages. The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.-->\n\n## Test Cases\n\n*see implementation*\n\n## Implementation\nAAVE does not use TWAP oracle and xSushi does not have sufficient liquidity on centralized exchanges we will calculate the xSushi using the existing oracle of SUSHI and applying a calculated exchange rate.\n\nThe price oracle for xSushi will calculate the price using a SUSHI price oracle multiplied by the exchange rate for SUSHI<>xSushi.\n\n`xSushiPrice = sushiPrice * exchangeRate`\n\nTo calculate the exchange rate we will check the SUSHI balance of the xSushi contract.\n\nAn example implementation of exchange rate calculation can be found below\n\n```js\nlet sushi = new ethers.Contract('0x6b3595068778dd592e39a122f4f5a5cf09c90fe2', abi, provider)\n\nlet totalSushiStakedinXSushi = await sushi.methods.balanceOf('0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272').call()\n\nlet xSushi = new ethers.Contract('0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272', abi, provider)\n\nlet totalXSushiSupply = await xSushi.methods.totalSupply().call()\n\nlet exchangeRate = totalSushiStakedinBar.div(totalXSushiSupply)\n```\n\nAt the request of the AAVE team we have included a convenience contract for returning the exchange rate of Sushi -> xSushi exchange rate.\n\n[Exchange Rate contract](https://etherscan.io/address/0xE8061286f2975EF38c8F70607eD839Fc9C0f0090#readContract)\n[Exchange Rate contract repo](https://github.com/sushiswap/xsushi-exchange-rate)\n\nValues from the `getExchangeRate()` method are returned as `uint256` values with a pecision of `10**18`\n\nLastly, xSushi is explicitly convertible for SUSHI at the exchange rate described above. Fees are paid as SUSHI to xSushi holders and collected into a pool of SUSHI, where each xSushi token represents a proportional share in the pool size. In essence SUSHI fees paid are accumulated to the xSushi which are not redeemable without the destruction of the underlying xSushi.\n\nSince debts incurred on AAVE would require that the debt be repaid in xSushi, the fees that are accumulated are safe from being harvested.\n\n\n## Audits/Security Reviews\n[Peckshield & Quantstamp](https://docs.defisafety.com/finished-reviews/sushiswap-process-quality-audit#audits)\n\n[**AAVE Community xSushi Risk Assement**](https://governance.aave.com/t/listing-proposal-add-xsushi/1794/16)\n\n![Screenshot 2021-01-05 at 19.56.10](https://aws1.discourse-cdn.com/standard21/uploads/aave/optimized/1X/e35ebb4c429ea6e1162d1fd6faf7d7b624287a14_2_690x184.png)\n\nSushiSwap is a DEX forked of Uniswap that grew very fast, now at $1.6B of TVL, thanks to generous liquidity mining incentives. It is now part of the Yearn conglomerate with many new upcoming features.\n\nxSUSHI is the staked SUSHI that receives .05% of the fees with 10 to 40% APY a great property for a collateral. The redeeming process from xSUSHI to SUSHI is permissionless allowing the analysis to focus on SUSHI.\n\n[**SUSHI Smart contract**](https://ethplorer.io/address/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2) **Risk: B-**\n\nSUSHI was launched late August by a fork of the Uniswap Exchange. Shortly after launch, the key developer stole the development funds, eventually returning them. The network managed secure support from some industry leaders and has grown fast in these few month reaching two dozen users and over a billion transactions.\n\n**SUSHI Counterparty Risk: B**\n\nSushi is a permissionless blockchain protocol where token holders vote on incentives and upgrades. Anyone can create new Sushi markets.\n\n[**SUSHI Market**](https://www.coingecko.com/en/coins/sushi) **Risk: C +**\n\nSUSHI has a good market capitalisation with a high volume. The price has suffered from extreme volatility since inception, suffering from large drops in value which is problematic for a collateral, requiring prudent parameters. This was driven by internal drama which also deeply affected community trust, now on the mend.\n\n### Risk Parameters ~ New (also proposed for SNX)\n\nLTV 25%\n\nLiquidation Threshold 45%\n\nLiquidation Bonus 15%\n\nReserve Factor 35%\n\n### Variable Interest Rate Model ~ Collaterals\n\n![Screenshot 2020-12-15 at 19.44.31](https://aws1.discourse-cdn.com/standard21/uploads/aave/optimized/1X/db265d003d9c9d4afa45b1fcc6aa6d59a7527206_2_690x444.png)\n\nUOptimal 45%\n\nR_0 0%\n\nR_s1 7%\n\nR_s2 300%\n\n## References\n[Classic UI (deprecated 2021-1-22)](https://sushiswap.fi/)\n[SushiSwap Lite](https://lite.sushiswap.fi/)\n[SushiSwap.fi](https://lite.sushiswap.fi/)\n[Sushi token 0x6b3595068778dd592e39a122f4f5a5cf09c90fe2](https://etherscan.io/address/0x6b3595068778dd592e39a122f4f5a5cf09c90fe2)\n[xSushi token 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272](https://etherscan.io/address/0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272)\n[Sushi Governance forum](forum.sushiswapclassic.org)\n[Help and FAQ](docs.sushiswap.fi)\n\n## Copyright\n\nCopyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/)."}