0g-chain/x
Denali Marsh f7a73c9245
Hard: suppliers earn interest ()
* update to borrow interest factor

* add supply interest factor to accrue interest

* supply interest factor keeper methods

* fix potential bug with user borrow indexing

* sync supply interest on deposit/withdraw

* separate withdraw/deposit

* relocate interest sync methods

* update comment

* simplify supply interest statement

* check truncated int not zero

* add .sub(storedAmount) back

* add store key suppliedcoins

* increment/decrement supplied coins

* update withdraw with new accounting

* update withdraw test

* catch repay edge case

* unit tests

* TestSupplyInterest scaffolding

* test notes

* temp: interest test

* example test

* changes, test checks more state

* fix: calculate supply interest directly

* fix: catch divide by zero

* add state checks back into interest test

* add snapshot test cases

* test owed supplied interest paid at correct ratio

* test user supply syncs user's borrow interest

* remove print statements and clean up

* refactor indented logic

* test supply/borrow multiple coins

* update decoder test

Co-authored-by: karzak <kjydavis3@gmail.com>
2021-01-07 11:23:05 +01:00
..
auction [R4R] fix: don't panic on expired auctions in init genesis () 2020-10-02 12:50:56 -04:00
bep3 merge release v0.12.1 updates () 2020-12-02 10:37:11 -07:00
cdp cdp withdraw takes 3 args () 2020-10-19 10:57:42 -04:00
committee kava-3 to kava-4 migration () 2020-10-03 13:48:57 -04:00
hard Hard: suppliers earn interest () 2021-01-07 11:23:05 +01:00
incentive fix go 1.15 build warning () 2020-12-03 16:07:47 -07:00
issuance fix: use correct committee params () 2020-08-30 10:47:07 -04:00
kavadist Simulation fixes () 2020-09-01 11:33:12 -04:00
pricefeed merge release v0.12.1 updates () 2020-12-02 10:37:11 -07:00
validator-vesting Add custom HARD, USDX circulating supply endpoints () 2020-11-12 22:48:20 +01:00