#15 Runtime Upgrade: Multi-token Support in Incentives Module

Stay up to date, pls join Community Discord #karura-governance

Summary

This runtime upgrade is to support multi-token rewards in the incentives module. This will allow any one or combination of native tokens, cross-parachain tokens, and ERC20 tokens to be used as rewards for LPs.

This upgrade also optmizes the current data structure hence requires storage migration. In a normal blockchain this may require a hardfork, but we will attempt to achieve this via an on-chain upgrade with a process as follows:

1. Pause certain transaction types (yes, Karura is capable of pausing certain operations while continue to produce blocks and keeping other unaffected part operational)
2. Perform runtime upgrade
3. Perform data migration and verification
4. Resume paused transaction types

The migration will start shortly before the upgrade enacted and will last between 30 to 60 minutes. Other than paused transactions, other feature such as token transfer will work normally.

Transaction Types to be Paused

These operations will be paused

  • kUSD: vault mint, payback, withdraw and deposit
  • kUSD: close loan with deposited collateral
  • kUSD: transfer vault
  • kUSD: liquidation
  • Karura Swap: add and remove liquidity
  • Earn: stake and unstake LP tokens, claim rewards
module_name module_bytes call_name call_bytes
Honzon 0x486f6e7a6f6e adjust_loan 0x61646a7573745f6c6f616e
Honzon 0x486f6e7a6f6e close_loan_has_debit_by_dex 0x636c6f73655f6c6f616e5f6861735f64656269745f62795f646578
Honzon 0x486f6e7a6f6e transfer_loan_from 0x7472616e736665725f6c6f616e5f66726f6d
CdpEngine 0x436470456e67696e65 liquidate 0x6c6971756964617465
Dex 0x446578 add_liquidity 0x6164645f6c6971756964697479
Dex 0x446578 remove_liquidity 0x72656d6f76655f6c6971756964697479
Incentives 0x496e63656e7469766573 claim_rewards 0x636c61696d5f72657761726473
Incentives 0x496e63656e7469766573 deposit_dex_share 0x6465706f7369745f6465785f7368617265
Incentives 0x496e63656e7469766573 withdraw_dex_share 0x77697468647261775f6465785f7368617265

Storage Migration

modules old storage name new storage name
Rewards Pools PoolInfos
Rewards ShareAndWithdrawnReward SharesAndWithdrawnRewards
Incentives IncentiveRewardAmount IncentiveRewardAmounts
Incentives DexSavingRewardRate DexSavingRewardRates
Incentives PayoutDeductionRates ClaimRewardDeductionRates
Incentives PendingRewards PendingMultiRewards

Technical Details

On-chain Proposal

Read more on the democracy process and how to participate here .

3 Likes