-
Notifications
You must be signed in to change notification settings - Fork 115
xSushi APY
jiro-ono edited this page Jan 4, 2021
·
1 revision
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.
import sushiData from @sushiswap/sushi-data
-
sushiData.bar.info()
will return an object withtotalSupply
andratio
.-
totalSupply
can be used forxSushiSupply
-
ratio
can be used forxSushiRatio
-
-
sushiData.exchange.dayData(1)
will return an object withvolumeETH
.-
volumeETH
can be used forVolumePerDay
- 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 withderivedETH
.-
derivedETH
can be used forsushiPrice
-