Kevin Davis
bb1bc7fed4
fix: update swap genesis in test ( #964 )
2021-07-15 10:03:30 -05:00
Ruaridh
38a98ac4fc
Refactor incentive payout ( #953 ), Users can claim swap rewards ( #955 )
...
* split up payout.go file
* extract genesis builders to new testutil package
* move claim integration tests out of keeper
* convert claim integration tests to handler tests
* combine claim usdx minting keeper methods
* combine hard claim keeper methods
* combine delegator claim keeper methods
* add multiply coins helper method
* rename file to better match contents
* add basic claiming unit tests
* add claiming subset of delegator reward denoms
* refactor msg tests
* add msg ValidateBasic tests
* connect swap hooks into keeper methods
* tidy up delegator handler tests
* add swap claiming msgs and keeper method
* add swap claiming to client
* add subset claiming to other msg types
* split up handler test file
* connect up subset claiming for swap
* make multiplier name validation more strict
* fix: struct tag typo in swap incentives
* connect up subset claiming for hard
* connect up subset claiming for delegator
* fix: register cli tx routes for swp claiming
* fix claim amount in claim event
* fix token name in cli help docs
* remove unused field in msg tests
* tidy up swap and delegator handler tests
* refactor hard handler tests
* refactor usdx handler tests
* remove unused constant
Co-authored-by: karzak <kjydavis3@gmail.com>
2021-07-15 15:05:54 +01:00
Ruaridh
c7962e45c0
Swaps accumulate global rewards ( #947 )
...
* add get set methods for swap reward indexes
* add get set methods for swap accrual time
* tidy up location of multi periods
* add swap reward periods to params
* add initial legacy types for incentive
* minor refactor of migration code
* add incentive migration for swap params
* minor incentive test refactors
* add math methods to RewardIndexes
* add keeper method to increment global indexes
* add swap keeper to incentive keeper
* indicate if pool shares were found or not
* add accumulator to compute new rewards each block
* accumulate swap rewards globally
* remove unecessary keeper method
* expand doc comments on accumulator methods
* test precision not lost in accumulation
* minor fixes from merge
* rename storeGlobalDelegatorFactor to match others
* fix migration from merge
* fix bug in app setup
* fix accumulation bug when starting with no state
* rename swap files to match others
* add swap accumulation times to genesis
* remove old migration refactor
* minor updates to spec
* add high level description of how rewards work
2021-07-07 14:23:06 +01:00
Denali Marsh
bc33b94822
Update delegator rewards to multi-reward index ( #945 )
...
* update claim attribute type to MultiRewardIndexes
* update param attribute type to MultiRewardPeriods
* keeper: update params to match types
* keeper: update delegator core keeper methods
* keeper: update InitializeHardDelegatorReward
* keeper: update SynchronizeHardDelegatorRewards
* remove reward factor in favor of reward indexes
* update querier
* fix test: delegator init test
* fix test: delegator sync test
* implement delegator reward accumulation
* fix test: delegator general tests
* add legact types, update v0_11 -> v0_14 migration
* remove duplicate import form v0_15 migration
* implement v0_15incentive migration
* test data and migration test
* add multiple reward denoms to init/sync tests
* update delegator test with multiple reward coins
* clean up simulation sync
2021-07-06 00:01:25 +02:00
Denali Marsh
8744d3210c
Genesis import/export fixes ( #871 )
...
* panic on export if prev accrual time not set
* on export if interest factor not set, set to 1.0
* fix prev accrual time in cdp export
* panic on export if prev accrual time not set
* export hard reward denom accumulation times
* init genesis starts usdx reward indexes at 0.0
* update incentive migration
* update incentive tests
2021-03-10 21:32:35 -07:00
Kevin Davis
e9eb5ea20c
genesis updates for incentive migration ( #806 )
2021-02-08 13:47:29 -07:00
Denali Marsh
9b52154409
Accrue Hard module rewards in multiple coin denoms ( #785 )
...
* types: multiple rewards
* supply-side reward keeper methods
* remove legacy comments
* update hard claim reward to coins type
* borrow-side reward keeper methods
* update claim payout to sdk.Coins
* make tests compile
* fix genesis validation for compile
* comment out failing tests
* fix ! found logic
2021-02-02 09:17:46 -07:00
Denali Marsh
4e6f6d1e9c
Incentive/Hard rebase to master ( #773 )
...
* spike: incentive/types
* spike: incentive/types tests
* spike: incentive/types/expected_keepers.go
* spike: incentive/keeper
* spike: incentive/keeper tests
* spike: incentive/sims and incentive/sims tests
* spike: incentive/module
* spike: incentive/module tests
* spike: hard/types
* spike: hard/types hooks
* spike: hard/types
* spike: hard/keeper basics
* spike: hard/keeper hooks
* integrate hard/keeper/borrow.go
* integrate hard/keeper/deposit.go
* integrate hard/keeper/liquidation.go
* integrate hard/keeper/withdraw.go
* integrate hard/keeper/repay.go
* spike: hard/sims
* spike: hard/sims tests
* spike: hard/client
* spike: hard/module
* integrate app.go
* spike: x/hard/keeper compile tests
* incentive/keeper test clean up
* validate usdx incentive types in genesis
* refactoring & fix deposit test
* fix liquidaton tests
* fix incentive tests for hard supply rewards
* fix hard genesis tests
* update incentive genesis state and params
* update cdp rewards accumulation
* update app init order and begin blocker order
Co-authored-by: karzak <kjydavis3@gmail.com>
2021-01-21 14:52:09 +01:00
Kevin Davis
67b58f555b
[R4R] fix: validate usdx minting collaterals in incentive genesis ( #770 )
...
* fix: validate that usdx incentive collateral types are found in cdp params
* update app initialization and tests
2021-01-19 22:42:50 -07:00