Skip to content

Commit

Permalink
Merge pull request #61 from ajansari95/fix/quicksilver-apr
Browse files Browse the repository at this point in the history
fix `APY` calculation for `quicksilver`
  • Loading branch information
tombeynon authored Mar 27, 2023
2 parents f3a06ed + 13efc97 commit 6efca0b
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions chains/chainMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ function ChainMonitor() {
aprParams = await calculateApr(chain, annualProvision, bondedTokens, communityTax, blocksPerYear, actualBlocksPerYear) || {}
}
const data = {
...current,
...authzParams,
...blockParams,
...stakingParams,
...current,
...authzParams,
...blockParams,
...stakingParams,
...slashingParams,
...supplyParams,
...mintParams,
...distributionParams,
...provisionParams,
...aprParams
...supplyParams,
...mintParams,
...distributionParams,
...provisionParams,
...aprParams
}
return _.mapKeys({
...data,
Expand Down Expand Up @@ -214,9 +214,10 @@ function ChainMonitor() {
inflation: params.params
}
}
case 'quicksilver':
case 'osmosis': {
const params = await got.get(restUrl + 'osmosis/mint/v1beta1/params', gotOpts).json();
const provision = await got.get(restUrl + 'osmosis/mint/v1beta1/epoch_provisions', gotOpts).json();
const params = await got.get(restUrl + path + '/mint/v1beta1/params', gotOpts).json();
const provision = await got.get(restUrl + path + '/mint/v1beta1/epoch_provisions', gotOpts).json();
const dailyProvision = bignumber(provision.epoch_provisions)
return {
annualProvision: multiply(dailyProvision, 365.3, params.params.distribution_proportions.staking),
Expand Down

0 comments on commit 6efca0b

Please sign in to comment.