Skip to content

Cosmos Zone 별 Staking APR 구하는 방법 및 코드 구현

Notifications You must be signed in to change notification settings

soohoio/cosmos-staking-apr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cosmos Zone APR Calculation

APR 구하는 공식

Annual Provision = GET {Cosmos SDK REST Endpoint}/cosmos/mint/v1beta1/annual_provisions
Bonded Tokens = GET {Cosmos SDK Rest Endpoint}/cosmos/staking/v1beta1/pool

block_provision = Annual Provision / blocks_per_year-Param
Real Annual Provision = block_provision * blocks_per_Year-Real

Nominal APR = [Annual Provision * (1-Community Tax)] / Bonded Tokens ;
Real Staking APR = (Nominal APR) * [(Real Annual Provision) / (Annual Provision)]

Final Staking APR = (Real Staking APR) * (1-Validator’s commission)

Run

npm i

COSMOS_REST_URL=https://evmos-testnet-api.polkachu.com npm start

About

Cosmos Zone 별 Staking APR 구하는 방법 및 코드 구현

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published