Skip to content

Commit

Permalink
adjust test loan / lock products to initial values
Browse files Browse the repository at this point in the history
  • Loading branch information
szerintedmi committed Apr 20, 2018
1 parent 13968e2 commit b4b4cd1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
18 changes: 10 additions & 8 deletions migrations/10_deploy_Locker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ module.exports = function(deployer) {
monetarySupervisor.grantPermission(Locker.address, "LockerContracts"),

// (perTermInterest, durationInSecs, minimumLockAmount, isActive)
locker.addLockProduct(160000, 31536000, 1000, true), // 365 days, 16% p.a.
locker.addLockProduct(66750, 15552000, 1000, true), // 180 days, 14% p.a.
locker.addLockProduct(23779, 7776000, 1000, true), // 90 days 10% p.a.
locker.addLockProduct(6346, 2592000, 1000, true), // 30 days, 8% p.a.
locker.addLockProduct(2237, 1209600, 1000, true), // 14 days, 6% p.a.
locker.addLockProduct(936, 604800, 1000, true), // 7 days, 5% p.a.
locker.addLockProduct(251, 3600, 1000, true), // 60 minutes for testing, ~801.13% p.a.
locker.addLockProduct(1, 60, 1000, true) // 1 minute for testing, ~69.15% p.a.
locker.addLockProduct(80001, 31536000, 1000, true), // 365 days, 8% p.a.
locker.addLockProduct(33929, 15552000, 1000, true), // 180 days, 7% p.a.

locker.addLockProduct(14472, 7776000, 1000, true), // 90 days 6% p.a.
locker.addLockProduct(4019, 2592000, 1000, true), // 30 days, 5% p.a.
locker.addLockProduct(1506, 1209600, 1000, true), // 14 days, 4% p.a.
locker.addLockProduct(568, 604800, 1000, true), // 7 days, 3% p.a.

locker.addLockProduct(3, 3600, 2000, true), // 60 minutes for testing, ~2.66% p.a.
locker.addLockProduct(1, 60, 3000, true) // 1 minute for testing, ~69.15% p.a.
]);
});
};
17 changes: 10 additions & 7 deletions migrations/9_deploy_LoanManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ module.exports = function(deployer) {
}
console.log(" On a test network. Adding test loanProducts. Network id: ", web3.version.network);
// term (in sec), discountRate, loanCoverageRatio, minDisbursedAmount (w/ 4 decimals), defaultingFeePt, isActive
await lm.addLoanProduct(31536000, 800000, 800000, 3000, 50000, true); // due in 365d
await lm.addLoanProduct(15552000, 850000, 800000, 3000, 50000, true); // due in 180d
await lm.addLoanProduct(7776000, 910000, 800000, 3000, 50000, true); // due in 90d
await lm.addLoanProduct(2592000, 950000, 800000, 3000, 50000, true); // due in 30d
await lm.addLoanProduct(86400, 970000, 850000, 3000, 50000, true); // due in 1 day
await lm.addLoanProduct(3600, 985000, 900000, 2000, 50000, true); // due in 1hr for testing repayments
await lm.addLoanProduct(1, 990000, 950000, 1000, 50000, true); // defaults in 1 secs for testing
await lm.addLoanProduct(31536000, 860000, 550000, 1000, 50000, true); // 365d, 14% p.a.
await lm.addLoanProduct(15552000, 937874, 550000, 1000, 50000, true); // 180d, 13% p.a.

await lm.addLoanProduct(7776000, 971661, 600000, 1000, 50000, true); // 90d, 12%. p.a.
await lm.addLoanProduct(2592000, 990641, 600000, 1000, 50000, true); // 30d, 12% p.a.
await lm.addLoanProduct(1209600, 996337, 600000, 1000, 50000, true); // 14d, 10% p.a.
await lm.addLoanProduct(604800, 998170, 600000, 1000, 50000, true); // 7d, 10% p.a.

await lm.addLoanProduct(3600, 999989, 980000, 2000, 50000, true); // due in 1hr for testing repayments ? p.a.
await lm.addLoanProduct(1, 999999, 990000, 3000, 50000, true); // defaults in 1 secs for testing ? p.a.
});
};

0 comments on commit b4b4cd1

Please sign in to comment.