0g-chain/x/incentive/keeper
Robert Pirtle f37321839b
add x/kavamint & x/community modules (#1400)
* add `x/kavamint` module (#1376)

* stub out the x/kavamint module

* mint staking rewards in x/kavamint BeginBlocker

* calculate cumulative inflation from x/kavamint

* cleanup, abstract bond denom, grpc query tests

* store & use previous block time to calculate mints

* move test suite to testutil

* add test of x/kavamint BeginBlocker

* cleanup & comments from @DracoLi review

* fix x/incentive integration test

* remove rest client grpc test

* add x/kavamint module spec

* track previous block time in genesis

* suggested cleanup from PR review

* bugfix incorrect module account check

* add x/community module (#1388)

* add x/community module

* refactor and setup fund-community-pool tx

* remove unused features (params, genesis state)

* test x/community query and message

* update with master branch deps

* updates from review

* indicate deprecated methods on module (still needed to fulfill interface)
* remove legacy querier
* derive msg Route() and Type() from sdk.MsgTypeURL(&msg)

* use module name for message Route()

* mint community pool inflation in x/kavamint (#1389)

* mint community pool inflation in x/kavamint

* refactor x/kavamint abci inflation test

* test inflation from x/kavamint

* default kavamint rates to 0%

* rename kavamint account name variables

* panic if genesis kavamint previous block time not set

* emit event on kavamint begin blocker

* add kavamint year of inflation sanity check test

* update fund_community_pool message event

* add x/community spec

* refactor inflation accumulation into single func

* use new comm pool in kavadist multispend proposal (#1403)

the x/community module houses the new community pool. this commit
points the CommunityPoolMultiSpendProposal at the new community pool
so that multispend proposals can continue to be processed once original
fee pool funds are move to x/community

* updates from proto lint changes

* update earn proposals to use new community pool

originally the CommunityPoolDepositProposal & CommunityPoolWithdrawProposal
used the vanilla community pool fee pool. this commit updates them both
to use the new x/community module account.

* spec formatting update

* add x/community & x/kavamint to internal testnet genesis

* increase test coverage of x/kavamint

* increase test coverage of x/community

* use string type for sdk.Dec proto fields; disable generation of getters
for genesis and params (and other store objects)

* follow sdk conventions for params endpoint naming

* add kavamint to swagger; update swagger & proto docs

* remove legacy querier; touch up module to match others

* reduce max minting rate; refactor genesis to allow nil/zero block time;
repace proto stringers and remove getters; keep sdk.Dec values strings
in protos; increase validation of sdk.Dec values in params; increase
coverage; add module account permission checks; ensure import and export
of genesis does not change state

* fix scaling of rate values -- should be yearly rates

* revert key change

* fix typo in test name

* fix regression in running tests -- rename method

Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
2022-12-09 13:24:35 -08:00
..
accumulators Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
adapters Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
store Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
claim_test.go Revert per-module incentive claim denom multipliers (#1312) 2022-09-27 19:46:14 -07:00
claim.go Revert per-module incentive claim denom multipliers (#1312) 2022-09-27 19:46:14 -07:00
diff_test.go Fix: delete incentive reward factors on full withdraw/repay (#885) 2021-03-23 17:28:03 -06:00
hooks.go Disable savings incentives (#1320) 2022-09-29 21:18:06 +01:00
integration_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
keeper_state_test.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
keeper_test.go Add base earn incentives (#1292) 2022-09-22 11:26:08 -07:00
keeper_utils_test.go Add incentive earn tests with real keepers (#1354) 2022-10-19 16:13:37 -07:00
keeper.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
msg_server_delegator_test.go Upgrade to sdk v0.44.5 and add IBC (#1106) 2022-01-07 17:39:27 -07:00
msg_server_earn_test.go Add incentive earn tests with real keepers (#1354) 2022-10-19 16:13:37 -07:00
msg_server_hard_test.go Upgrade to sdk v0.44.5 and add IBC (#1106) 2022-01-07 17:39:27 -07:00
msg_server_swap_test.go Add incentive earn tests with real keepers (#1354) 2022-10-19 16:13:37 -07:00
msg_server_usdx_test.go Upgrade to sdk v0.44.5 and add IBC (#1106) 2022-01-07 17:39:27 -07:00
msg_server.go Disable savings incentives (#1320) 2022-09-29 21:18:06 +01:00
params.go Revert per-module incentive claim denom multipliers (#1312) 2022-09-27 19:46:14 -07:00
payout_test.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
payout.go Upgrade to sdk v0.44.5 and add IBC (#1106) 2022-01-07 17:39:27 -07:00
querier_test.go Fix /incentive/apy pricefeed denom conversion (#1340) 2022-10-08 02:35:15 +01:00
querier.go Fix /incentive/apy pricefeed denom conversion (#1340) 2022-10-08 02:35:15 +01:00
rewards_accumulate_test.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
rewards_borrow_accum_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_borrow_init_test.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_borrow_sync_test.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_borrow_test.go Add incentive earn tests with real keepers (#1354) 2022-10-19 16:13:37 -07:00
rewards_borrow_update_test.go Fix incentive usdx/borrow/supply reward calculation bug (#974) 2021-07-26 20:07:24 +01:00
rewards_borrow.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_delegator_accum_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_delegator_init_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_delegator_sync_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_delegator_test.go Add EVM Support (#1215) 2022-04-21 16:16:28 -04:00
rewards_delegator.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_earn_accum_integration_test.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
rewards_earn_accum_test.go Add liquid staking reward redistribution via incentive (#1308) 2022-09-28 13:20:01 -07:00
rewards_earn_init_test.go Add base earn incentives (#1292) 2022-09-22 11:26:08 -07:00
rewards_earn_staking_integration_test.go add x/kavamint & x/community modules (#1400) 2022-12-09 13:24:35 -08:00
rewards_earn_staking_test.go Add liquid staking reward redistribution via incentive (#1308) 2022-09-28 13:20:01 -07:00
rewards_earn_sync_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_earn.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
rewards_init_test.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
rewards_savings_accum_test.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_savings_init_test.go Incentive savings hooks + init/sync of savings claims (#1209) 2022-04-21 16:19:03 +02:00
rewards_savings_sync_test.go Incentive savings hooks + init/sync of savings claims (#1209) 2022-04-21 16:19:03 +02:00
rewards_savings.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_supply_accum_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_supply_init_test.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_supply_sync_test.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_supply_test.go Add incentive earn tests with real keepers (#1354) 2022-10-19 16:13:37 -07:00
rewards_supply_update_test.go Incentive savings hooks + init/sync of savings claims (#1209) 2022-04-21 16:19:03 +02:00
rewards_supply.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_swap_accum_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_swap_init_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_swap_sync_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_swap.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_sync_test.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
rewards_usdx_accum_test.go Add weighted bkava support for earn incentives (#1299) 2022-09-23 09:38:22 -07:00
rewards_usdx_test.go Add incentive earn tests with real keepers (#1354) 2022-10-19 16:13:37 -07:00
rewards_usdx_unit_test.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards_usdx.go gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
rewards.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00
unit_test.go Use different accumulator for earn (#1395) 2022-11-29 14:23:33 -08:00