Skip to content

xSushi APY

jiro-ono edited this page Jan 4, 2021 · 1 revision

Formula

APR = (((VolumePerDay * 0.05 * 0.01) / xSushiSupply) * 365) / (xSushiRatio * sushiPrice)

APY = (( 1 + (APR / 365))^365) - 1

  • Note: APY is to get the compounding returns. Swap out 365 with 52 if you are calculating APY for 7day volume.

Queries To Use

import sushiData from @sushiswap/sushi-data
  • sushiData.bar.info() will return an object with totalSupply and ratio.

    • totalSupply can be used for xSushiSupply
    • ratio can be used for xSushiRatio
  • sushiData.exchange.dayData(1) will return an object with volumeETH.

    • volumeETH can be used for VolumePerDay
    • One thing to note is is that the 1 in dayData function will return the current days volume, use 2 to get current day and prior days volumes. And use 7 to get the volume for each day in the last week.
  • sushiData.sushi.info() will return an object with derivedETH.

    • derivedETH can be used for sushiPrice
Clone this wiki locally