Denali Marsh
99fb79a1ae
update spec, add money market deprecation steps ( #841 )
2021-02-22 13:52:17 -07:00
Denali Marsh
1499a89ce5
Query Hard module reserves ( #843 )
...
* implement CLI reserves query
* implement REST reserves query
2021-02-22 13:48:52 -07:00
Denali Marsh
fe43c2bc41
Hard Audit: don't convert directly from sdk.Int to uint64 ( #842 )
...
* refactor away from sdk.Int's .Uint64() method
* refactor cdp module interest calc
2021-02-20 09:42:57 -07:00
Kevin Davis
5cd94047a4
fix: set interest accumulation time and exit when borrows are zero ( #840 )
2021-02-19 16:33:55 -07:00
Kevin Davis
1ab2e9965f
Add committee migrations ( #818 )
...
* fix: collateral param permission
* wip: kava-5 committee updates
* feat: add committee migrations
* rename functions so git recognizes diffs better
* rename
* remove auction_size param
* address review comments
* add check ltv index count to collateral param perms
* fix: update legacy migration
* use function to define collateral param in test
* use go 1.15 in circle
* address review comments
* fix: no nil values for collateral params
2021-02-19 14:05:42 -07:00
Denali Marsh
421f774ec1
sort unique denom list ( #836 )
2021-02-19 14:05:17 -07:00
Denali Marsh
0b6e47ff46
call hooks in export genesis ( #837 )
2021-02-19 13:49:36 -07:00
Denali Marsh
0a51a737cb
fix time elapsed calculation + test ( #838 )
2021-02-19 13:24:00 -07:00
Denali Marsh
6c88c01eb8
validate against money markets in store ( #839 )
2021-02-19 13:23:19 -07:00
Denali Marsh
6045a94b39
Allocate Hard supply/borrow rewards to legacy suppliers/borrowers ( #833 )
...
* initialize hard supply reward for empty rewards
* add god committee to integration test
* organize claim types, add helper methods
* reorder integration test's god committee
* legacy suppliers earn rewards + tests
* update InitializeHardBorrowReward + test
* remove formatting comments from tests
* allocate rewards to legacy borrowers + test
* apply change to update index denom methods
* Update querier to show synced rewards for legacy deposits/borrows (#834 )
* update simulated sync method to show rewards for legacy deposits/borrows
* more explicity debuging logs
* revisions
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
2021-02-19 13:02:51 -07:00
Kevin Davis
c5fc1c6b4f
Add hard and incentive spec updates ( #817 )
...
* wip: update hard spec
* feat: updated hard spec
* feat: updated incentive spec
2021-02-19 17:14:48 +01:00
Nick DeLuca
bdbc9b9c58
remove unused total deposit value -- not needed by ltv range calculation ( #832 )
2021-02-17 10:37:41 -07:00
Denali Marsh
53eab47c07
Hard Audit: don't let users borrow from reserves ( #827 )
...
* don't borrow from reserves
* use safesub and throw error
2021-02-16 07:45:57 -07:00
Kevin Davis
58573e7b26
fix: allow ltv of zero ( #830 )
2021-02-16 07:43:46 -07:00
Kevin Davis
ad6ef76979
fix: set interest last updated to previous accrual time, not block time ( #829 )
2021-02-16 07:43:21 -07:00
Denali Marsh
e8d3d877aa
check borrow err ( #828 )
2021-02-15 08:30:41 -07:00
Denali Marsh
94999b6b02
Incentive module: accounts should only be able to claim their own rewards ( #826 )
...
* make rewards only claimable by sender
* remove 'owner' from cli for incentive claims
2021-02-15 08:29:00 -07:00
Denali Marsh
15da55b451
Hard Audit: refresh borrow/deposit after syncing ( #824 )
...
* refresh borrow/deposit after syncing
* revisions
2021-02-12 21:56:03 +01:00
Denali Marsh
a5b72363d0
Hard Audit: decrement total borrowed on liquidation ( #823 )
...
* decrement total borrow on liquidation
* copy kevin's decrement changes
* check error in liquidation
* extend decrement borrowed changes
* mimic negative check on the supplied coins side
* update liquidation test
2021-02-12 13:07:32 -07:00
Kevin Davis
7e39c1d0a8
fix: account for start time in calculating time elapsed ( #821 )
2021-02-12 08:30:10 -07:00
Denali Marsh
fe2a131b31
Hard Audit: add minimum borrow USD value ( #822 )
...
* add module param MinimumBorrowUSDValue
* borrow/repay min limit restrictions
* add borrow/repay test cases
* update tests with new module params
* update timelock test with param
* update withdraw LTV test
* remove unused GetCurrentBorrowUSDValue method
* commit to prompt CircleCI run
2021-02-12 08:28:05 -07:00
Denali Marsh
cd7a227030
Query Hard module's supply/borrow APYs ( #816 )
...
* calculate estimated apy from internal spy
* implement interest rate query
2021-02-10 10:53:53 -07:00
Denali Marsh
802ed36846
remove auction size param ( #815 )
2021-02-10 07:59:23 -07:00
Denali Marsh
7f43e6336e
permissioned incentive claims ( #814 )
2021-02-10 07:58:05 -07:00
Kevin Davis
bc1fab7836
fix: renumber error messages ( #812 )
2021-02-10 07:57:28 -07:00
Kevin Davis
e351e20727
fix: collateral param permission ( #813 )
2021-02-10 07:57:02 -07:00
Kevin Davis
04b65e1d4e
fix: export synced deposits/borrows ( #811 )
...
* fix: export synced deposits/borrows
* fix: epxort synced cdps
2021-02-10 07:56:38 -07:00
Denali Marsh
b620275165
Hard Audit: remove liquidation account from Hard module ( #810 )
...
* remove liquidator macc
* remove legacy if statement
2021-02-09 13:33:58 -07:00
Denali Marsh
7465c643b8
decrement/increment coin counters on auctions ( #809 )
2021-02-09 13:32:28 -07:00
Kevin Davis
7d4235ca87
fix: don't accumulate if borrow interest rounds to zero ( #808 )
2021-02-09 10:11:12 -07:00
Kevin Davis
58db05f8e2
fix: set reward indexes in init genesis and zero them out on export genesis ( #807 )
2021-02-08 17:32:54 -07:00
Kevin Davis
e9eb5ea20c
genesis updates for incentive migration ( #806 )
2021-02-08 13:47:29 -07:00
Kevin Davis
176c1973d3
fix: valid default genesis state ( #805 )
2021-02-08 08:00:37 -07:00
Denali Marsh
44d4d19565
fix incentive rewards query REST res ( #802 )
2021-02-08 07:14:25 -07:00
Denali Marsh
c60365f12e
call both incentive hooks ( #804 )
2021-02-08 07:13:30 -07:00
Denali Marsh
0edbdf968e
hotfix ( #803 )
2021-02-08 13:57:02 +01:00
Denali Marsh
5af50e1a2d
Hard Audit: enable users to repay another account's borrows ( #801 )
...
* add owner to repay msg
* pass owner and sender to repay function
* make owner arg an optional flag
* make owner optional for REST
2021-02-08 13:51:42 +01:00
Denali Marsh
1b2cfa6d1a
Hard Audit: remove LTV index from Hard module ( #800 )
...
* remove LTV index
* remove LTV param
* remove LTV param from tests
* remove LTV index from tests
* fix incentive hook not called before sync
2021-02-08 13:23:37 +01:00
Denali Marsh
c8d4c02fb7
Remove unused Hard module accounts ( #796 )
...
* remove unused hard module accs
* update tests
* update migration for compile
* maintain migration
2021-02-05 12:45:37 +01:00
Denali Marsh
0343edf0d0
Hard Audit: fix duplicate supply/borrow index factors ( #794 )
...
* types: set/get interest factor
* delete 0 balance index factors from deposit
* types: set/get borrow interest factor
* delete 0 balance index factors from borrow
* delete index factor directly
2021-02-05 12:31:38 +01:00
Kevin Davis
3d6e730368
address issues from audit ( #793 )
2021-02-04 11:35:24 -07:00
Denali Marsh
be498c72f5
sync supply interest before ValidateBorrow ( #798 )
2021-02-04 17:54:13 +01:00
Denali Marsh
9fa83f0a1e
remove GetPreviousBlockTime/SetPreviousBlockTime ( #797 )
2021-02-04 17:54:01 +01:00
Denali Marsh
facb357fe9
return err in ValidateBorrow ( #799 )
2021-02-04 17:53:50 +01:00
Denali Marsh
754c018f04
Incentive module multiple reward denom tests ( #788 )
...
* types: multiple rewards
* supply-side reward keeper methods
* remove legacy comments
* update hard claim reward to coins type
* borrow-side reward keeper methods
* update claim payout to sdk.Coins
* make tests compile
* fix genesis validation for compile
* comment out failing tests
* fix ! found logic
* accumulate hard supply rewards (single)
* sync hard supply rewards (single)
* update hard borrow/supply index denoms
* accumulate hard borrow rewards (single)
* sync hard borrow rewards (single)
* sync hard delegator rewards
* payout hard claim (single)
* accumulate hard supply rewards (multiple)
* sync hard supply rewards (multiple)
* update hard supply index denoms (multiple)
* update hard borrow index denoms (multiple)
* accumulate hard borrow rewards (multiple)
* sync hard borrow rewards (multiple)
* fix denom
* remove comment
* fix merge
* payout hard reward (multiple)
Co-authored-by: karzak <kjydavis3@gmail.com>
2021-02-03 23:23:53 +01:00
Denali Marsh
0c1fa5d27b
emit hard liquidation event ( #790 )
2021-02-03 23:23:17 +01:00
Denali Marsh
7be0c8b48e
decrement supplied coins ( #791 )
2021-02-03 23:23:03 +01:00
Denali Marsh
cfb9e0cb76
add liquidate msg to codec ( #792 )
2021-02-03 23:22:51 +01:00
Kevin Davis
dd3470260d
add v0.13 legacy types for kava-5 ( #784 )
2021-02-02 15:10:57 -07:00
Kevin Davis
6118876074
[R4R] fix: match reward payouts to current harvest v1 payouts ( #786 )
...
* fix: payout rewards on 1st or 15th of month
* backport payout test
* fix: add default case
2021-02-02 15:10:32 -07:00