mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
prepare v0.24.1 release (#1758)
* prepare v0.24.1 release * add staking_rewards migration doc
This commit is contained in:
parent
db5f89b9be
commit
bdfcf56fba
@ -36,6 +36,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
## [v0.24.1](https://github.com/Kava-Labs/kava/releases/tag/v0.24.1)
|
||||
|
||||
### Features
|
||||
- (metrics) [#1668] Adds non-state breaking x/metrics module for custom telemetry.
|
||||
- (metrics) [#1669] Add performance timing metrics to all Begin/EndBlockers
|
||||
|
@ -24,13 +24,13 @@ Reference implementation of Kava, a blockchain for cross-chain DeFi. Built using
|
||||
|
||||
## Mainnet
|
||||
|
||||
The current recommended version of the software for mainnet is [v0.23.0](https://github.com/Kava-Labs/kava/releases/tag/v0.23.0). The master branch of this repository often contains considerable development work since the last mainnet release and is __not__ runnable on mainnet.
|
||||
The current recommended version of the software for mainnet is [v0.24.1](https://github.com/Kava-Labs/kava/releases/tag/v0.24.1). The master branch of this repository often contains considerable development work since the last mainnet release and is __not__ runnable on mainnet.
|
||||
|
||||
### Installation and Setup
|
||||
For detailed instructions see [the Kava docs](https://docs.kava.io/docs/participate/validator-node).
|
||||
|
||||
```bash
|
||||
git checkout v0.23.0
|
||||
git checkout v0.24.1
|
||||
make install
|
||||
```
|
||||
|
||||
|
80
migrate/v0_24/staking_rewards.md
Normal file
80
migrate/v0_24/staking_rewards.md
Normal file
@ -0,0 +1,80 @@
|
||||
# Migrate Staking Reward Calculation to Endpoint
|
||||
|
||||
Kava 15 (v0.25.x) is changing the mechanism for staking rewards, which will no longer be inflationary but will be paid out of the community module. In order to continue displaying expected yields or APYs to users, wallets and explorers will need to update.
|
||||
|
||||
To accommodate an easy transition to these new changes, a new endpoint has been backported to v0.24.
|
||||
|
||||
The endpoint calculates staking rewards for the current kava version and is forward compatible with future changes.
|
||||
|
||||
All consumers who display yearly staking reward percentages are encouraged to migrate from the standard calculation to using the endpoint, as the standard calculation will no longer be accurate in the near-future.
|
||||
|
||||
Endpoint: `/kava/community/v1beta1/annualized_rewards`
|
||||
Example Response:
|
||||
```json
|
||||
{
|
||||
"staking_rewards": "0.203023625910000000"
|
||||
}
|
||||
```
|
||||
|
||||
## Before Kava 15
|
||||
The staking APR is calculated the same way as other cosmos-sdk chains. Various parameters are fetched and then combined in this calculation:
|
||||
```
|
||||
staking_apr ≈ mint_inflation *
|
||||
(1 - distribution_params.community_tax) *
|
||||
(total_supply_ukava/pool.bonded_tokens)
|
||||
```
|
||||
|
||||
_Note this doesn’t include transaction fees paid to stakers._
|
||||
|
||||
Endpoints used:
|
||||
|
||||
* https://api.data.kava.io/cosmos/mint/v1beta1/params
|
||||
* https://api.data.kava.io/cosmos/distribution/v1beta1/params
|
||||
* https://api.data.kava.io/cosmos/bank/v1beta1/supply/by_denom?denom=ukava
|
||||
* https://api.data.kava.io/cosmos/staking/v1beta1/pool
|
||||
|
||||
Informational Endpoints
|
||||
|
||||
* https://api.data.kava.io/cosmos/mint/v1beta1/inflation
|
||||
* https://api.data.kava.io/cosmos/mint/v1beta1/annual_provisions
|
||||
|
||||
## After Kava 15
|
||||
Kava 15 will implement new staking rewards as ratified in this proposal: https://www.mintscan.io/kava/proposals/141. They will come into effect at the “switchover time” on 2024-01-01.
|
||||
|
||||
* All delegating and claiming transactions remain unchanged. There is no change in how rewards are claimed or how claimable balances are queried.
|
||||
* After the switchover time, inflation will be set to zero (and rewards will be paid from the community module account).
|
||||
* After the switchover time, rewards are paid out according to:
|
||||
```
|
||||
staking apy ≈ community_params.staking_rewards_per_second *
|
||||
seconds_per_year / pool.bonded_tokens
|
||||
```
|
||||
|
||||
_Note this doesn’t include transaction fees paid to stakers._
|
||||
|
||||
* There will be a new endpoint `kava/community/v1beta1/annualized_rewards`
|
||||
* before the switchover time, it will return the current staking APY (calculated in the previous section)
|
||||
* after the switchover time, it will return the new staking APY above
|
||||
|
||||
* Existing endpoints above will remain active, but the params will change such that the old apr calculation will return 0.
|
||||
|
||||
* https://api.data.kava.io/cosmos/mint/v1beta1/params
|
||||
* no format changes
|
||||
* `inflation_max` and `inflation_min` will be 0.0
|
||||
|
||||
* https://api.data.kava.io/cosmos/distribution/v1beta1/params
|
||||
* no format changes
|
||||
* `community_tax` will be 0.0
|
||||
|
||||
* https://api.data.kava.io/cosmos/bank/v1beta1/supply/by_denom?denom=ukava
|
||||
* no changes
|
||||
|
||||
* https://api.data.kava.io/cosmos/staking/v1beta1/pool
|
||||
* no changes
|
||||
|
||||
* https://api.data.kava.io/cosmos/mint/v1beta1/inflation
|
||||
* no format changes
|
||||
* `inflation` will be 0.0
|
||||
|
||||
* https://api.data.kava.io/cosmos/mint/v1beta1/annual_provisions
|
||||
* no format changes
|
||||
* `annual_provisions` will be 0.0
|
Loading…
Reference in New Issue
Block a user