0g-chain/docs/kava-8/upgrade_wallet.md

52 lines
5.1 KiB
Markdown
Raw Normal View History

2021-09-23 17:04:31 +00:00
# kava-8 Wallet Update Guide
2021-09-23 16:54:58 +00:00
The kava-8 update includes new features. This document contains important information about the new functionality and breaking changes.
kava-8 will use the same major version of the cosmos-sdk (v0.39.x). kava-8 will have the same golang compatibility as kava-7, requiring v1.13+. Golang v1.15 has been tested and is suitable for use on kava-8 mainnet.
## Breaking Changes
#### Claiming Rewards
Reward claims in the `x/incentive` module have been updated to enable selective reward claiming by type and token denom. There are four primary reward claim message types:
- **MsgClaimUSDXMintingReward** has arguments Sender (sdk.AccAddress) and MultiplierName (string). This message will claim all USDX minting rewards for the user, applying the specified reward multiplier.
- **MsgClaimHardReward** takes three arguments: Sender (sdk.AccAddress), Multiplier Name (string), and Denoms To Claim ([]string). This message will claim any available HARD supply/borrow rewards of the specified denoms for the user, applying the specified reward multiplier.
- **MsgClaimDelegatorReward** takes three arguments: Sender (sdk.AccAddress), Multiplier Name (string), and Denoms To Claim ([]string). This message will claim any available delegation rewards of the specified denoms for the user, applying the specified reward multiplier.
2021-09-23 17:04:31 +00:00
- **MsgClaimSwapReward takes** three arguments: Sender (sdk.AccAddress), Multiplier Name (string), and Denoms To Claim ([]string). This message will claim any available SWAP protocol rewards of the specified denoms for the user, applying the specified reward multiplier.
2021-09-23 16:54:58 +00:00
#### Committee Voting
Voting in the `x/committee` module has been updated to support Yes, No, and Abstain votes.
2021-09-23 17:04:31 +00:00
- **MsgVote takes three arguments: Proposal ID (uint64), Voter (sdk.AccAddress), and Vote Type (VoteType). Valid Vote Types are “yes”, “y,” “no”, “n”, “abstain”, and “a”.
2021-09-23 16:54:58 +00:00
## New Features
2021-09-23 17:04:31 +00:00
#### SWAP Protocol
2021-09-23 16:54:58 +00:00
Kava-8 introduces SWAP protocol, a decentralized exchange that enables users to swap tokens against liquidity pools. SWAP protocol has several new messages:
- **MsgDeposit** enables liquidity providers to deposit tokens into a liquidity pool. It takes five arguments - the depositor (sdk.AccAddress) that is providing liquidity, token A (sdk.Coin) that is being deposited, token B (sdk.Coin) that is being deposited, minimum acceptable slippage (sdk.Dec), and deadline (int64). After a successful deposit the liquidity provider will be credited deposit shares in the pool.
- **MsgWithdraw** enables liquidity providers to withdraw deposited tokens from a liquidity pool. It takes five arguments - the withdrawers address (sdk.AccAddress), the amount of shares (sdk.Int) to be withdrawn, the minimum accepted token A amount (sdk.Coin) to be received by the withdrawer, the minimum accepted token B amount (sdk.Coin) to be received, and the deadline (int64). After a successful withdrawal the liquidity provider will receive tokens.
- **MsgSwapExactForTokens** supports token swaps with an exact amount of input tokens. It takes five arguments - the requesters address (sdk.AccAddress), the exact input amount of token A (sdk.Coin), the desired output amount of token B (sdk.Coin), the minimum accepted slippage (sdk.Dec) i.e. percentage difference from the output amount, and the deadline (int64).
- **MsgSwapForExactTokens** supports token swaps for an exact amount of output tokens. It takes five arguments - the requesters address (sdk.AccAddress), the desired input amount of token A (sdk.Coin), the exact output amount of token B (sdk.Coin), the minimum accepted slippage (sdk.Dec) i.e. percentage difference from the input amount, and the deadline (int64).
#### Committee
kava-8 introduces HARD and SWAP protocol governance by token holders via two new committees. Both committees have a proposal voting duration of seven days, a minimum quorum of 33%, and enact proposals that receive over 50% Yes votes.
The **HARD Governance Committee** will have permissions to change the following parameters:
- Hard module permissions
2021-09-23 17:04:31 +00:00
- *Money markets*: whitelist of supported money markets.
- *Minimum borrow USD value*: minimum valid borrow amount in USD from a money market.
2021-09-23 16:54:58 +00:00
- Incentive module permissions
2021-09-23 17:04:31 +00:00
- *Hard supply reward periods*: HARD token rewards for HARD protocol suppliers.
- *Hard borrow reward periods*: HARD token rewards for HARD protocol borrowers.
- *Delegator reward periods*: HARD token rewards for KAVA delegators
2021-09-23 16:54:58 +00:00
The **SWP Governance Committee** will have permissions to change the following parameters:
- Swap module permissions
2021-09-23 17:04:31 +00:00
- *Allowed pools*: whitelist of supported token pairs.
- *Swap fee*: global trading fee paid by users to liquidity providers.
2021-09-23 16:54:58 +00:00
- Incentive module permissions
2021-09-23 17:04:31 +00:00
- *Swap reward periods*: SWP token rewards for SWAP protocol liquidity providers.
- *Delegator reward periods*: SWP token rewards for KAVA delegators.
2021-09-23 16:54:58 +00:00
2021-09-23 17:04:31 +00:00
Kava REST API
Kavas REST API supports all Kava-8 changes and features. To minimize compatibility issues, commonly used endpoints are still supported and have not been deprecated. API documentation can be found [here](https://swagger.kava.io/).