The APY shows on the UI is sum of `baseAPY` and `rewardAPR` (not a typo, it is APR, not APY).
## Base APY
Base APY is the APY that you get when you deposit (or you need to pay when you borrow).
Base APY is simply = $(dailyRate + 1)^{365} - 1$
DailyRate is `supplyRatePerTimestamp` (or `borrowRatePerTimestamp`) multiplied by `86400` (number of seconds in day).
## Reward APR
Let's take PLY reward in deposit pool for example. There is a `rewardSpeed` indicates how much PLY we will give to a market per second as reward. We can calculate the reward value per second:
`rewardValueUSD = plyPrice * rewardSpeed`.
Then the reward APR is calculate as follow:
`APR = rewardValueUSD * (seconds in years) / (total deposit in USD)`