Skip to content

Commit

Permalink
Merge pull request #65 from eco-stake/adjust-omniflixhub-provision
Browse files Browse the repository at this point in the history
Omniflixhub staking is 60% of annual provision
  • Loading branch information
tombeynon authored Jun 25, 2023
2 parents fc7df95 + d2cb591 commit 7f81eb1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions chains/chainMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,21 @@ function ChainMonitor() {
mint: undefined
}
}
case 'stargaze': {
const params = await got.get(restUrl + 'minting/annual-provisions', gotOpts).json();
return { annualProvision: multiply(params.result, 0.5) }
}
default: {
const stakingProvisionFactor = {
'stargaze': 0.5,
'omniflixhub': 0.6
}
let annualProvision
try {
const params = await got.get(restUrl + 'cosmos/mint/v1beta1/annual_provisions', gotOpts).json();
return { annualProvision: bignumber(params.annual_provisions) }
annualProvision = bignumber(params.annual_provisions)
} catch (e) {
const params = await got.get(restUrl + 'minting/annual-provisions', gotOpts).json();
return { annualProvision: bignumber(params.result) }
annualProvision = bignumber(params.result)
}
if(annualProvision){
return { annualProvision: multiply(annualProvision, stakingProvisionFactor[chain.path] ?? 1) }
}
}
}
Expand Down

0 comments on commit 7f81eb1

Please sign in to comment.