0g-chain/x/incentive/keeper
Ruaridh 6f193c7f2a
Refactor incentive accumulators to be the same (#970)
* add test for validate multi reward periods

* tidy up: combine files

* don't accumulate global indexes containing zeros
Previously if the time since last block was 0,
indexes were added containing 0s.
Now leave them out. Missing is assumed to be 0.

* move state independent test to types folder

* clarify reward source concept to "source shares"
- rename variables and update doc comments
- extract method from swap accumulation

* tidy up and expand swap accumulation unit tests

* rename swap test file to match others

* update swap pool id format in tests

* refactor borrow accumulation, use new accumulator

* refactor supply accumulation, use new accumulator

* refactor delegator accumulation, use accumulator

* refactor usdx accumulation, use new accumulator

* fix types const

* remove unsed methods

* more usdx minting param validation.
Protect against the rewards per second denom changing.
It should always be "ukava".

* add safety check in InitGenesis
It prevents huge accumulations on the first block by limiting all
previous accumulation times to be within one year of genesis

* add todo for adding swp token distirbution info
2021-07-22 13:53:18 +01:00
..
cdp_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
claim_test.go Refactor incentive payout (#953), Users can claim swap rewards (#955) 2021-07-15 15:05:54 +01:00
claim.go Refactor incentive payout (#953), Users can claim swap rewards (#955) 2021-07-15 15:05:54 +01:00
diff_test.go Fix: delete incentive reward factors on full withdraw/repay (#885) 2021-03-23 17:28:03 -06:00
hooks.go Swap users accumulate rewards (#950) 2021-07-13 13:35:02 +01:00
integration_test.go Refactor incentive payout (#953), Users can claim swap rewards (#955) 2021-07-15 15:05:54 +01:00
keeper_test.go Incentive genesis refactor: remove sync on export (#954) 2021-07-15 15:41:55 +01:00
keeper.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
params.go Refactor to DelegatorClaim and implement new MsgClaimDelegatorReward (#948) 2021-07-07 18:50:14 +02:00
payout_test.go Refactor incentive payout (#953), Users can claim swap rewards (#955) 2021-07-15 15:05:54 +01:00
payout.go Refactor incentive payout (#953), Users can claim swap rewards (#955) 2021-07-15 15:05:54 +01:00
querier.go Swap users accumulate rewards (#950) 2021-07-13 13:35:02 +01:00
rewards_borrow_accum_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_borrow_init_test.go Refactor to DelegatorClaim and implement new MsgClaimDelegatorReward (#948) 2021-07-07 18:50:14 +02:00
rewards_borrow_sync_test.go Refactor to DelegatorClaim and implement new MsgClaimDelegatorReward (#948) 2021-07-07 18:50:14 +02:00
rewards_borrow_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_borrow_update_test.go Refactor to DelegatorClaim and implement new MsgClaimDelegatorReward (#948) 2021-07-07 18:50:14 +02:00
rewards_borrow.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_delegator_accum_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_delegator_init_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_delegator_sync_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_delegator_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_delegator.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_supply_accum_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_supply_init_test.go Refactor to DelegatorClaim and implement new MsgClaimDelegatorReward (#948) 2021-07-07 18:50:14 +02:00
rewards_supply_sync_test.go Refactor to DelegatorClaim and implement new MsgClaimDelegatorReward (#948) 2021-07-07 18:50:14 +02:00
rewards_supply_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_supply_update_test.go Refactor to DelegatorClaim and implement new MsgClaimDelegatorReward (#948) 2021-07-07 18:50:14 +02:00
rewards_supply.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_swap_accum_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01: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 Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_swap.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_usdx_accum_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_usdx_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
rewards_usdx_unit_test.go Swaps accumulate global rewards (#947) 2021-07-07 14:23:06 +01:00
rewards_usdx.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00
unit_test.go Refactor incentive accumulators to be the same (#970) 2021-07-22 13:53:18 +01:00