Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative interest rates #1386

Merged
merged 54 commits into from
Aug 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
e0ec4c3
Fixes type check on verbose parameter
dcorral Jun 13, 2022
66f2707
Merge branch 'master' of github.com:DeFiCh/ain into fix-getvault-verbose
dcorral Jul 6, 2022
4700496
Add high precission string for getvault verbose
dcorral Jul 7, 2022
35b00eb
Fixes error, return -1 when there are locked tokens
dcorral Jul 7, 2022
5b91dc6
Merge branch 'master' into fix-getvault-verbose
dcorral Jul 13, 2022
f224c4d
Negative Interest
Bushstar Jul 18, 2022
7b6148a
Merge branch 'fix-getvault-verbose' of github.com:DeFiCh/ain into neg…
dcorral Jul 18, 2022
304b7c0
Allows negative interests on loan tokens
dcorral Jul 18, 2022
d3851d8
tests: change error text
Bushstar Jul 18, 2022
bef9c14
Add testing to negative interest
dcorral Jul 28, 2022
e39414b
Remove breakpoint from failing test
dcorral Jul 28, 2022
2a329b1
Allow fallthrough from LoanMintingInterest
Bushstar Aug 2, 2022
14a0857
Update test to fail as expected
Bushstar Aug 2, 2022
ae92630
Apply token interest to all vaults immediately
Bushstar Aug 2, 2022
dc5066c
Partial negative vault interest
Bushstar Aug 4, 2022
6eb99b4
lint: Fix error
Bushstar Aug 4, 2022
3e815b5
Adds tests for negative interests
dcorral Aug 17, 2022
67a92e2
Add failing tests for discussion
dcorral Aug 17, 2022
4ce146a
Fix tests for correct behaviour
dcorral Aug 17, 2022
2425c53
Further negative interest rate updates
Bushstar Aug 18, 2022
79e8847
Check correct height value for incorrect amount. Restores behaviour.
Bushstar Aug 18, 2022
52ef2fc
TotalInterestCalculation use higher precision
Bushstar Aug 18, 2022
3f95ce1
Fix getinterest RPC when token param is passed
Jouzo Aug 18, 2022
cf46254
Add tests for loan paid by negative interest
dcorral Aug 18, 2022
b755727
Do not sub minted token
Bushstar Aug 19, 2022
801789e
Store negative interest the same as positive interest was stored
Bushstar Aug 19, 2022
400582d
Set negative bool in all branches
Bushstar Aug 19, 2022
4c16685
Remove unused variable
Bushstar Aug 19, 2022
da65598
Call EraseInterest on take loan
Bushstar Aug 19, 2022
715366d
Fixes tests to match new implementation
dcorral Aug 19, 2022
acc0e61
Total loan should not wrap around
Bushstar Aug 20, 2022
b20d3f3
Add getstoredinterest
Bushstar Aug 20, 2022
84ac0b1
Simplify interest addition lambda
Bushstar Aug 20, 2022
cd127ea
Add TotalInterestCalculation unit test
Jouzo Aug 20, 2022
439a451
Fix interest cal on tests after new updates
dcorral Aug 22, 2022
2164a44
Add new suite of functional test for getstoredinterest
dcorral Aug 22, 2022
1724978
Introduce helper functions and function template
dcorral Aug 22, 2022
2060940
Add helper functions
dcorral Aug 22, 2022
140a78b
Add stored interest test
Bushstar Aug 22, 2022
3cd816c
Add negative ITH positive IPB cases
Bushstar Aug 22, 2022
2f97316
Combine duplicate interest additions
Bushstar Aug 22, 2022
1a4e140
Update vault failing test
dcorral Aug 22, 2022
1ebf931
Pass new scheme to StoreInterest
Bushstar Aug 22, 2022
b910ffb
Add updatevault complete tests
dcorral Aug 22, 2022
d3da038
Remove subInterest assignation
dcorral Aug 22, 2022
be83d04
Adds test for takeloan
dcorral Aug 22, 2022
9c8a994
Wipe interest on take loan with negative interest
Bushstar Aug 23, 2022
bb3d90d
Test full payback
Bushstar Aug 23, 2022
a4edbd0
On take loan negate existing loan amount only
Bushstar Aug 24, 2022
1c8eeeb
Update negative interest test
Bushstar Aug 24, 2022
2c2c4d6
Do not sub balance on payback if loan negated
Bushstar Aug 24, 2022
0179613
Negative interest pays loan back first
Bushstar Aug 24, 2022
d2c134c
Add payback loan functional tests
Jouzo Aug 24, 2022
896f4e0
Adds remainning tests for takeloan
dcorral Aug 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove breakpoint from failing test
  • Loading branch information
dcorral committed Jul 28, 2022
commit e39414bc0a7dc4ab3cf1be67e7223a785a4d3f1c
1 change: 0 additions & 1 deletion test/functional/feature_negative_interest.py
Original file line number Diff line number Diff line change
@@ -366,7 +366,6 @@ def payback_after_interest_increase(self):
# Check interests
verbose = True
vault = self.nodes[0].getvault(self.vaultId6, verbose)
breakpoint()
# This should be NOT 0 as interest of the total interest should be 1%
assert( vault["interestsPerBlockValue"] != Decimal(0))