Skip to content

Commit 3d710cb

Browse files
committed
improve ganache test loanproducts for tests (nicer numbers for collateral ratios, increase interest rates for short term prods)
1 parent 0c5c97a commit 3d710cb

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

contracts/SB_scripts/localTest/localTest_initialSetup.sol

+9-9
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,17 @@ contract localTest_initialSetup {
105105

106106
// add test loan Products
107107
// term (in sec), discountRate, initialCollateralRatio (ppm), minDisbursedAmount (token), defaultingFeePt (ppm), isActive, minCollateralRatio (ppm)
108-
_loanManager.addLoanProduct(365 days, 854701, 1818182, 1000, 50000, true, 1500000); // 17% p.a., (collateral ratio: initial = ~181%, minimum = 150%)
109-
_loanManager.addLoanProduct(180 days, 924753, 1818182, 1000, 50000, true, 1500000); // 16.5% p.a., (collateral ratio: initial = ~181%, minimum = 150%)
108+
_loanManager.addLoanProduct(365 days, 854701, 1850000, 1000, 50000, true, 1500000); // 17% p.a., (collateral ratio: initial = 185%, minimum = 150%)
109+
_loanManager.addLoanProduct(180 days, 924753, 1850000, 1000, 50000, true, 1500000); // 16.5% p.a., (collateral ratio: initial = 185%, minimum = 150%)
110110

111-
_loanManager.addLoanProduct(90 days, 962046, 1666667, 1000, 50000, true, 1200000); // 16%. p.a., (collateral ratio: initial = ~166%, minimum = 120%)
112-
_loanManager.addLoanProduct(60 days, 975154, 1666667, 1000, 50000, true, 1200000); // 15.5% p.a., (collateral ratio: initial = ~166%, minimum = 120%)
113-
_loanManager.addLoanProduct(30 days, 987822, 1666667, 1000, 50000, true, 1200000); // 15% p.a., (collateral ratio: initial = ~166%, minimum = 120%)
114-
_loanManager.addLoanProduct(14 days, 994280, 1666667, 1000, 50000, true, 1200000); // 15% p.a., (collateral ratio: initial = ~166%, minimum = 120%)
115-
_loanManager.addLoanProduct(7 days, 997132, 1666667, 1000, 50000, true, 1200000); // 15% p.a., (collateral ratio: initial = ~166%, minimum = 120%)
111+
_loanManager.addLoanProduct(90 days, 962046, 1600000, 1000, 50000, true, 1200000); // 16%. p.a., (collateral ratio: initial = 160%, minimum = 120%)
112+
_loanManager.addLoanProduct(60 days, 975154, 1600000, 1000, 50000, true, 1200000); // 15.5% p.a., (collateral ratio: initial = 160%, minimum = 120%)
113+
_loanManager.addLoanProduct(30 days, 987822, 1600000, 1000, 50000, true, 1200000); // 15% p.a., (collateral ratio: initial = 160%, minimum = 120%)
114+
_loanManager.addLoanProduct(14 days, 994280, 1600000, 1000, 50000, true, 1200000); // 15% p.a., (collateral ratio: initial = 160%, minimum = 120%)
115+
_loanManager.addLoanProduct(7 days, 997132, 1600000, 1000, 50000, true, 1200000); // 15% p.a., (collateral ratio: initial = 160%, minimum = 120%)
116116

117-
_loanManager.addLoanProduct(1 hours, 999998, 1020408, 2000, 50000, true, 1010000); // due in 1hr for testing repayments ~1.75% p.a., (collateral ratio: initial = ~102%, minimum = 101%)
118-
_loanManager.addLoanProduct(1 seconds, 999999, 1010101, 3000, 50000, true, 1010000); // defaults in 1 secs for testing ~3153.6% p.a., (collateral ratio: initial = ~101.01%, minimum = 101%)
117+
_loanManager.addLoanProduct(1 hours, 999000, 1230000, 2000, 50000, true, 1050000); // due in 1hr for testing repayments ~877% p.a., (collateral ratio: initial = 123%, minimum = 105%)
118+
_loanManager.addLoanProduct(1 seconds, 999000, 1110000, 3000, 50000, true, 1020000); // defaults in 1 secs for testing ~3156757% p.a., (collateral ratio: initial = 111%, minimum = 102%)
119119

120120
// add test lock products
121121
// (perTermInterest, durationInSecs, minimumLockAmount, isActive)

migrations/1001_topup_interestEarnedAccount.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = function(deployer) {
88
const tokenAEur = TokenAEur.at(TokenAEur.address);
99
const loanManager = LoanManager.at(LoanManager.address);
1010

11-
await loanManager.newEthBackedLoan(0, 0, { value: web3.toWei(0.1066) }); // = 50 A-EUR
11+
await loanManager.newEthBackedLoan(0, 0, { value: web3.toWei(0.10845) }); // = 50 A-EUR
1212

1313
await tokenAEur.transferWithNarrative(
1414
InterestEarnedAccount.address,

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@augmint/contracts",
3-
"version": "1.1.0-pre6",
3+
"version": "1.1.0-pre7",
44
"description": "Augmint Stable Tokens - Solidity contract's abi and deployment descriptors",
55
"author": "“Augmint”",
66
"homepage": "https://github.com/Augmint/augmint-contracts#readme",

0 commit comments

Comments
 (0)