* 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>
* feat: query old blocks for auctions
* fix: add next auction id to querier
* fix: set boolean when found
* fix: use correct query route and params
* apply suggestions from review comments
* fix go version in dockerfile
* mix frequently occuring errors
* add missed import
* fix minor validator vesting sim bug
* fix auction sim bug
* fix docker build
* add todo from sim failure
* tidy up dockerfile
* update docs, add dockerignore to speed up builds
* Update simulations/README.md
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
* add stack traces to logs for easier debugging
* replace root func with sdk version
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: karzak <kjydavis3@gmail.com>
* resolve exhibit 41 - move redundant assignment into if block and only
assign if value is false. No need to assign true to already true value.
* fix exhibit 43 - use existing auctionID variable instead of GetID
* use improved name for auction type in case statemnt
* rename a to auction in PlaceBidSurplus for legibility (part of exhibit 44)
* rename a to auctions in PlaceForwardBidCollateral (part of exhibit 44)
* rename a to auction in PlaceReverseBigCollateral for legibility (part of exhibit 44)
* rename a to auction in PlaceBidDebt for legibility (part of exhibit 44)
* renmae rest of a to auction variables for legibility and resolve exhibit
44
* one missed rename and a typo fix
* bump SDK version to v0.38.3
Co-authored-by: Denali Marsh <denali@kava.io>
Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: denalimarsh <denalimarsh@gmail.com>
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
* refactor bidding test
* add some more bid test cases
* add balance checks to bid tests
* add more checks to bid tests
* add min bid increments
* protect against negative lot amounts
* fix params tests
* change endblocker to beginblocker
* update spec
* fix params tests
* fix: update alias
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
* stub out simulation integration for cdp, pricefeed
* stub out simulation integration for auction
* fix cdp export
* update pricefeed to match
* update validator-vesting to match
* auction query fixes
* minor formating tweaks
* add phase info to debt & surplus auctions
* add base auction struct tags
* use module name in querier paths
* update rest tx endoint to use http body
* improve invalid coins error messages
* add rest examples
* align starting auction ID with gov and cdp
* fix cdp test broken by auction ID change
* fix all tests broken by ID change
* feat: differentiate auction types when queried
* feat: display auction type
* feat: add phase of collateral auctions
* fix: set reverse phase directly
* feat: revert base auction, use querying specifc structs
* fix: pass auction as interface to handlers
* set reverse phase on max bid (#348)
* Revert "set reverse phase on max bid (#348)" (#351)
This reverts commit 4b855250d529a4cbecb16d9d32b25ffeaffa3a68.
* fix: missing return
* fix: include collateral auction type
* fix: always include phase field for queries
Co-authored-by: Denali Marsh <denalimarsh@gmail.com>
* add overview and basic structure
* add state and params
* add basic messages
* add state transitions
* add begin block state transitions
* add missing titles
* add concepts
* add events
* update state and concepts
* update for liquidator changes
* update events
* mention module accounts
* update begin block
* update params
* update page numbering
* add fee descriptions
* add broken link linter
* add broken link linter to CI
* move link check to end of CI
* update typo
Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com>
* address review comments
* Update x/cdp/spec/06_params.md
Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com>
* Update x/cdp/spec/README.md
Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com>
* Update x/cdp/spec/README.md
Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>