* 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
* fix: remove old harvest permissions from committee
* add new hard param keys to allowed committee params
* add all cdp collateral types to committee permissions
* Add 'InterestFactor' to CDP type (#734)
* update cdp type to include interest factor
* fix build
* Add cdp accumulator methods (#735)
* remame fees to interest
* add accumulate interest method
* add basic test
* add note
* address review comments
* update tests
* Add sync cdp interest method (#737)
* remame fees to interest
* add accumulate interest method
* add basic test
* add note
* address review comments
* update tests
* remove old fee functions
* add method to synchronize cdp interest
* add multi-cdp tests
* add test with many blocks
* add test for interest getter
* address review comments
* calculate time difference then convert to seconds
* fix: update collateral index when syncing interest
* fix: differentiate between case when apy is zero and all fees are being rounded to zero
* fix: round time difference properly
* update cdp genesis state and migrations (#738)
* remame fees to interest
* add accumulate interest method
* add basic test
* add note
* address review comments
* update tests
* remove old fee functions
* add method to synchronize cdp interest
* add multi-cdp tests
* add test with many blocks
* add test for interest getter
* update cdp genesis state and migrations
* address review comments
* calculate time difference then convert to seconds
* fix: update collateral index when syncing interest
* fix: differentiate between case when apy is zero and all fees are being rounded to zero
* fix: simplify add/remove/update collateral index
* update genesis state to include total principal amounts
* update migration
* Delete kava-4-cdp-state-block-500000.json
* Add cdp liquidations by external keeper (#750)
* feat: split liquidations between external keepers and automated begin blocker
* address review comments
* USDX incentive accumulators (#752)
* feat: split liquidations between external keepers and automated begin blocker
* wip: refactor usdx minting incentives to use accumulators/hooks
* wip: refactor usdx minting claim object
* feat: use accumulators/hooks for usdx minting rewards
* fix: get tests passing
* fix: don't create claim objects unless that cdp type is eligable for rewards
* add begin blocker
* update client
* cleanup comments/tests
* update querier
* address review comments
* fix: check for division by zero
* address review comments
* run hook before interest is synced
* Remove savings rate (#764)
* remove savings rate
* remove savings rate from debt param
* update migrations
* address review comments
* Add usdx incentives calculation test (#765)
* add usdx incentive calculation test
* update reward calculation
* add allowable error to test criteria
* Update x/incentive/keeper/rewards_test.go
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
* fix: remove old fields from test genesis state
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
* draft kava-4 bep3 migration
* add busd, btcb, xrpb to bep3 migration
* add deputy addresses
* update xrp unit conversion
* harmonize fees
* set min swap relative to fees
* fix: missing zero in min swap amount
* set busd fees equal to other assets
* improve comments
* set new bep3 asset limits to 1000 usd equivalent
* initial sketch
* add module migrations
* add migrations for all accout types
* test account migration
* add tendermint migration and migrate cmd
* remove need for errors pkg dependency
* add bech32 decoding fork
* add suggested params and cmd to write them
* add basic upgrade instructions
* fix tests
* address some migration todos
* tidy contrib folder
* finalize params values
* align cdp init genesis with other modules
* add tendermint and distribution test
add custom distribution migration to patch bug
* add staking migration test
* add slashing, evidence tests, refactor auth tests
* add full migration test
* remove go-amino dependency from go.mod
also tidy up unused indirect dependencies
* address remaining TODOs
* remove commented out code from legacy types
* add spot/liquidation markets ids to kava-3 params
* Apply suggestions from code review
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* address code review suggestions
* add validate genesis to migrate test
* refactor add params func
* remove commented out code from old types
* fix add params
* add deputy address
* add tests using exported kava-2 state
* incorporate new cdp params from master
* update params from review
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
* add deputy account
* add committee permissions for new params
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>