Nick DeLuca
86c0225174
encapsulate total principle calculation within cdp type and use ( #610 )
...
throughout codebase
2020-07-10 08:16:05 -05:00
Nick DeLuca
3e63356c58
Cache redundant calculation in cdp RepayPrinciple ( #569 )
...
* fix exhibit 29 and remove redundant calcuation
* use better naming (totalPrincipal instead of totalDebt) and add comment
for future maintainers
2020-06-11 16:14:47 -04:00
Nick DeLuca
25abdd10b5
Remove some redunancy in RepayPrinciple ( #577 )
...
* fix exhibit 30 - remove redunant conversions in adding principle to fee
amount, and store debt denom in local var to avoid calling getter
several times
* add deleted comment back
2020-06-11 14:32:39 -05:00
Nick DeLuca
44467569af
Fix Ineffectual if statements ( #568 )
...
* fix exhibits 19,20,28,32 ineffectual if statements
* Apply suggestions from code review
* Apply suggestions from code review
* Update x/cdp/keeper/cdp.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-09 07:07:58 -04:00
Kevin Davis
1099dfbd7d
CDP revisions ( #508 )
...
* address review comments
* add kavadist to modaccount check
* cdp and deposit validation in genesis
* cleanup genesis validation
* add validation test for types
* don't error on augmented cdp loading
* simplify collateral auction logic
2020-05-13 10:19:19 -04:00
Kevin Davis
8f3858509a
fix: various errors from linter ( #481 )
2020-05-01 14:13:29 -04:00
Federico Kunze
1a04ffe396
fix some lint bugs
2020-04-30 11:33:10 -04:00
Federico Kunze
8853e8d3d1
linters and format
2020-04-30 10:13:31 -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
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
bdff81b2a2
fix: avoid panic when closing cdp via repayment ( #353 )
2020-01-30 18:50:42 -05:00
Kevin Davis
22dc15f757
Apply debt floor to repayments ( #314 )
...
* fix: remove redundant debt limit param
* wip: test pricefeed genesis
* fix: pricefeed querier
* fix: comments, naming
* fix: query path
* fix: store methods
* fix: query methods
* feat: Liquidation Penalty
* feat: enforce debt floor on repayment
* address review comments
* fix: remove debt from liquidation penalty
* test: remove payment > balance check
* feat: handle overpayment
* fix: avoid negative coins error for overpayments
2020-01-22 16:50:27 +00:00
Kevin Davis
dca59447aa
fix: remove redundant debt limit param ( #312 )
2020-01-17 13:24:43 +01:00
Kevin Davis
9b1bf55be7
R4R: Move liquidator functions to cdp module ( #280 )
...
* wip: tpyes and keeper methods
* wip: iterators
* wip: types and keeper methods
* wip: add msgs
* wip: client methods
* wip: rebase develop
* wip: types tests
* wip: keeper tests, small fixes
* wip: add cdp tests
* wip: deposit tests
* wip: keeper tests
* wip: tests and module methods
* feat: error when fetching expired price
* feat: conversion factor for external assets
* feat: debt floor for new cdps
* feat: save deposits on export genesis
* feat: ensure messages implement msg
* feat: index deposits by status
* fix: stray comment
* wip: address review comments
* address review comments
* wip: move liquidation to cdp module
* wip: handle liquidations directly
* wip: use new auction interface
* feat: auction collateral in cdp begin block
* feat: update param validation
* feat: surplus and debt auctions
* address review comments
* address review comments
* fix: auction multiple deposits
* clean up netting function
2020-01-15 15:19:33 +01:00
Kevin Davis
d849d690e5
R4R: CDP types and methods ( #275 )
...
* wip: tpyes and keeper methods
* wip: iterators
* wip: types and keeper methods
* wip: add msgs
* wip: client methods
* wip: rebase develop
* wip: types tests
* wip: keeper tests, small fixes
* wip: add cdp tests
* wip: deposit tests
* wip: keeper tests
* wip: tests and module methods
* feat: error when fetching expired price
* feat: conversion factor for external assets
* feat: debt floor for new cdps
* feat: save deposits on export genesis
* feat: ensure messages implement msg
* feat: index deposits by status
* fix: stray comment
* wip: address review comments
* address review comments
2020-01-12 16:35:34 +01:00