Commit Graph

28 Commits

Author SHA1 Message Date
drklee3
3375484f79
Update deprecated Cosmos methods (#1530)
* Use cosmossdk.io/errors for deprecated error methods

* Update error registration with cosmossdk.io/errors

* Use cosmossdk.io/math for deprecated sdk.Int alias

* Fix modified proto file

* Update sdk.Int usage in swap hooks

* Update e2e test deprecated method usage
2023-04-05 16:21:59 -07:00
Ruaridh
ffef832d45
Upgrade to sdk v0.44.5 and add IBC (#1106)
- Upgrade cosmos-sdk to v0.44.5 from v0.39.2
- Add Legacy Tx Endpoint for backwards compatibility
- Add IBC v1.2.3 Support

Co-authored-by: DracoLi <draco@dracoli.com>
Co-authored-by: drklee3 <derrick@dlee.dev>
Co-authored-by: denalimarsh <denalimarsh@gmail.com>
Co-authored-by: Draco Li <draco@kava.io>
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Denali Marsh <denali@kava.io>
2022-01-07 17:39:27 -07:00
Kevin Davis
da5a852a6c
Misc simulation fixes (#963)
* fix: catch min swap edge case in bep3 sims

* fix: check repayment is above min in cdp sims

* remove print statement
2021-07-15 10:46:56 -05:00
Kevin Davis
290cb61882
feat: backport swap sims for deposit, withdraw (#965)
* sims: MsgDeposit operation

* implement withdraw

* update comment

* fix: add interest factors to cdp sims

Co-authored-by: denalimarsh <denalimarsh@gmail.com>
2021-07-15 10:35:24 -05:00
Kevin Davis
c63ecf908a
Cdp accumulators (#751)
* 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>
2021-01-18 12:12:37 -07:00
Ruaridh
2ffb1edd1f
Simulation fixes (#527)
* 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>
2020-09-01 11:33:12 -04:00
Kevin Davis
2a3192fa0e
fix: use collateral type in cdp simulations (#632) 2020-08-21 17:38:12 -04:00
Kevin Davis
daa1b2bb83
Add collateral type to cdp (#629)
* add collateral type field to cdp and collateral  param

* fix upstream tests

* fix simulations

* fix validation logic

* update incentive to use collateral type instead of denom

* use collateral type instead of denom in cdp

* remove unused code

* address review comments
2020-08-21 15:42:46 -04:00
Kevin Davis
5336ccc0c0
Add surplus and debt auction lot params (#531)
* wip: add lot size param for surplus and debt auctions

* update tests with new params

* update spec

* address review comments
2020-05-31 09:59:40 -04:00
Kevin Davis
ade6edb918
[R4R] Add liquidation pricefeed (#524)
* add parameter for liquidation pricefeed
2020-05-24 09:42:46 -04:00
Federico Kunze
511e1e07ac
fix conflicts from development 2020-04-30 17:12:22 -04:00
Kevin Davis
22bba81944
Check spendable balance in cdp sims (#480)
* fix: check spendable balance

* don't log noisy result.Log

* remove dead comment
2020-04-30 17:02:42 -04:00
Federico Kunze
fe72a24aa0
update format 2020-04-30 10:23:41 -04:00
Federico Kunze
8853e8d3d1
linters and format 2020-04-30 10:13:31 -04:00
Kevin Davis
c175e9e856
Add kava modules to TestAppImportExport (#472)
* add kava modules to TestAppImportExport
2020-04-29 10:10:41 -04:00
Kevin Davis
ae4aee46ff
Use sdk.Coin in cdp module (#466)
* Use sdk.Coin in cdp module
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Denali Marsh <denali@kava.io>
Co-authored-by: John Maheswaran <john@noreply>
2020-04-27 10:40:34 -04:00
Denali Marsh
b969a0ea33
Incentive module simulations (#439)
* Incentive module simulations (#439)
Co-authored-by: John Maheswaran <jmaheswaran@users.noreply.github.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
Co-authored-by: John Maheswaran <john@kava.io>
2020-04-24 17:55:18 -04:00
jmahess
5737f4fa19
[R4R] Update fees for all cdps (#449)
* update cdp fees in begin block

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Denali Marsh <denali@kava.io>
Co-authored-by: John Maheswaran <john@noreply>
Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
2020-04-23 19:25:44 -04:00
Federico Kunze
a573625df8
[R4R] bump SDK version to v0.38.3 (#421)
* 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>
2020-04-23 12:35:58 -04:00
Kevin Davis
0949a912cf
Choose simulation seed that runs without unbonding (#447)
* fix: ci failing due to memory consumption

* feat: choose seed that doesn't immediately exit

* fix: don't attempt to draw too much debt

* fix: remove comment
2020-04-18 11:34:25 -04:00
jmahess
55747ed0b8
[R4R] Fix pricefeed sims so does not always go to zero (#434)
* Generate pricefeed prices using a random walk at the beginning of sims

Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
Co-authored-by: John Maheswaran <john@kava.io>
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
Co-authored-by: John Maheswaran <john@noreply>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
Co-authored-by: Denali Marsh <denali@kava.io>
2020-04-17 18:29:54 -04:00
Kevin Davis
4cde3ba577
fix: prevent cdp sim from attempting to draw too much debt (#438)
* fix: account for all fees when drawing more debt
2020-04-15 14:54:38 -04:00
Kevin Davis
55b73e36ee
Fix: Check debt limit when adding cdp (#433)
* fix: check debt limit when opening cdp

* fix: increase debt limit for querier tests
2020-04-15 13:50:14 -04:00
Kevin Davis
1fab788fd5
[R4R] Add cdp simulations (#422)
feat: cdp sims
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
Co-authored-by: John Maheswaran <john@kava.io>
2020-04-13 21:29:46 -04:00
Federico Kunze
66c73362c8
address comments from review 2020-04-06 18:43:43 -04:00
Federico Kunze
3f4aba1c7f
decoder tests 2020-04-04 19:42:35 -03:00
Federico Kunze
11ed343dea
simulation decoders for kava modules 2020-04-01 12:27:38 -03:00
Ruaridh
c7b1331f4d
Fix simulations (#377)
* 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
2020-02-25 10:11:09 -05:00