* add initial auction migration from Levi's work
* reserve bid_duration field name as well
* refactor auction specifc migration code to legacy v0_17 pkg
* Add auction migration specific test. Delete v016 migration files. Add makefile target for running migration tests.
Co-authored-by: galxy25 <levismschoen@gmail.com>
* Split bid_duration field into forward/reverse durations
* Update params.go
* Update params_test for forward/reverse bid durations
* Remove duplicated import
* Replace bid duration on place bids
* Fix reversed bid errors
* Update auctions test
* Update bidding test
* Update testutil suite to use default forward/reverse bid durations
* Fix missing ReverseBidDuration param field
* Check if auction is reversed on forward bid
* Add test for conversion to reverse auction that reaches maxbid
* Make proto fields backwards compatible
* Use ForwardBidDuration for debt bid
* Make copy of v16 auction types
this doesn't actually work but keeping it in history
* Disable migrations
* Update debt tests to use forward bid duration
* 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