mirror of
https://github.com/0glabs/0g-chain.git
synced 2025-11-02 08:37:36 +00:00
* 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> |
||
|---|---|---|
| .. | ||
| borrow_test.go | ||
| borrow.go | ||
| claim_test.go | ||
| claim.go | ||
| deposit_test.go | ||
| deposit.go | ||
| interest_test.go | ||
| interest.go | ||
| keeper_test.go | ||
| keeper.go | ||
| liquidation_test.go | ||
| liquidation.go | ||
| params.go | ||
| querier.go | ||
| repay_test.go | ||
| repay.go | ||
| rewards_test.go | ||
| rewards.go | ||
| timelock_test.go | ||
| timelock.go | ||
| withdraw_test.go | ||
| withdraw.go | ||