@agoric/inter-protocol 0.16.2-dev-8bcf6af.0 → 0.16.2-dev-8baf0aa.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bundles/bundle-auctioneer-js-meta.json +193 -181
- package/bundles/bundle-auctioneer.js +1 -1
- package/bundles/bundle-econCommitteeCharter-js-meta.json +141 -129
- package/bundles/bundle-econCommitteeCharter.js +1 -1
- package/bundles/bundle-feeDistributor-js-meta.json +127 -115
- package/bundles/bundle-feeDistributor.js +1 -1
- package/bundles/bundle-fluxAggregatorKit-js-meta.json +181 -169
- package/bundles/bundle-fluxAggregatorKit.js +1 -1
- package/bundles/bundle-psm-js-meta.json +179 -167
- package/bundles/bundle-psm.js +1 -1
- package/bundles/bundle-reserve-js-meta.json +178 -166
- package/bundles/bundle-reserve.js +1 -1
- package/bundles/bundle-scaledPriceAuthority-js-meta.json +148 -136
- package/bundles/bundle-scaledPriceAuthority.js +1 -1
- package/bundles/bundle-vaultFactory-js-meta.json +210 -198
- package/bundles/bundle-vaultFactory.js +1 -1
- package/package.json +17 -17
- package/scripts/add-collateral-core.js +2 -2
- package/src/interest-math.d.ts +1 -1
- package/src/interest-math.d.ts.map +1 -1
- package/src/interest-math.js +13 -13
- package/src/interest.d.ts +6 -6
- package/src/interest.d.ts.map +1 -1
- package/src/interest.js +25 -26
- package/src/proposals/addAssetToVault.d.ts +5 -5
- package/src/proposals/addAssetToVault.js +5 -5
- package/src/vaultFactory/params.d.ts +5 -5
- package/src/vaultFactory/params.js +4 -4
- package/src/vaultFactory/storeUtils.d.ts +2 -2
- package/src/vaultFactory/storeUtils.d.ts.map +1 -1
- package/src/vaultFactory/storeUtils.js +7 -11
- package/src/vaultFactory/types.d.ts +4 -4
- package/src/vaultFactory/types.d.ts.map +1 -1
- package/src/vaultFactory/types.js +4 -4
- package/src/vaultFactory/vault.d.ts +11 -11
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vault.js +14 -19
- package/src/vaultFactory/vaultDirector.d.ts +10 -10
- package/src/vaultFactory/vaultFactory.d.ts +4 -4
- package/src/vaultFactory/vaultManager.d.ts +38 -38
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +35 -34
- package/CHANGELOG.md +0 -1033
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/inter-protocol",
|
|
3
|
-
"version": "0.16.2-dev-
|
|
3
|
+
"version": "0.16.2-dev-8baf0aa.0+8baf0aa",
|
|
4
4
|
"description": "Core cryptoeconomy contracts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@agoric/assert": "0.6.1-dev-
|
|
36
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
37
|
-
"@agoric/governance": "0.10.4-dev-
|
|
38
|
-
"@agoric/internal": "0.3.3-dev-
|
|
39
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
40
|
-
"@agoric/store": "0.9.3-dev-
|
|
41
|
-
"@agoric/time": "0.3.3-dev-
|
|
42
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
43
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
35
|
+
"@agoric/assert": "0.6.1-dev-8baf0aa.0+8baf0aa",
|
|
36
|
+
"@agoric/ertp": "0.16.3-dev-8baf0aa.0+8baf0aa",
|
|
37
|
+
"@agoric/governance": "0.10.4-dev-8baf0aa.0+8baf0aa",
|
|
38
|
+
"@agoric/internal": "0.3.3-dev-8baf0aa.0+8baf0aa",
|
|
39
|
+
"@agoric/notifier": "0.6.3-dev-8baf0aa.0+8baf0aa",
|
|
40
|
+
"@agoric/store": "0.9.3-dev-8baf0aa.0+8baf0aa",
|
|
41
|
+
"@agoric/time": "0.3.3-dev-8baf0aa.0+8baf0aa",
|
|
42
|
+
"@agoric/vat-data": "0.5.3-dev-8baf0aa.0+8baf0aa",
|
|
43
|
+
"@agoric/zoe": "0.26.3-dev-8baf0aa.0+8baf0aa",
|
|
44
44
|
"@endo/captp": "^3.1.2",
|
|
45
45
|
"@endo/eventual-send": "^0.17.3",
|
|
46
46
|
"@endo/far": "^0.2.19",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"jessie.js": "^0.3.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
53
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
54
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
55
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
56
|
-
"@agoric/vats": "0.15.2-dev-
|
|
57
|
-
"@agoric/zone": "0.2.3-dev-
|
|
52
|
+
"@agoric/deploy-script-support": "0.10.4-dev-8baf0aa.0+8baf0aa",
|
|
53
|
+
"@agoric/smart-wallet": "0.5.4-dev-8baf0aa.0+8baf0aa",
|
|
54
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-8baf0aa.0+8baf0aa",
|
|
55
|
+
"@agoric/swingset-vat": "0.32.3-dev-8baf0aa.0+8baf0aa",
|
|
56
|
+
"@agoric/vats": "0.15.2-dev-8baf0aa.0+8baf0aa",
|
|
57
|
+
"@agoric/zone": "0.2.3-dev-8baf0aa.0+8baf0aa",
|
|
58
58
|
"@endo/bundle-source": "^2.5.2",
|
|
59
59
|
"@endo/init": "^0.5.57",
|
|
60
60
|
"@endo/promise-kit": "^0.2.57",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "8baf0aabe3cadeb1cd07fd30641d11baf3e68eaf"
|
|
85
85
|
}
|
|
@@ -10,7 +10,7 @@ export const defaultProposalBuilder = async (
|
|
|
10
10
|
{ publishRef, install: install0, wrapInstall },
|
|
11
11
|
{
|
|
12
12
|
debtLimitValue = undefined,
|
|
13
|
-
|
|
13
|
+
interestRateValue = undefined,
|
|
14
14
|
interchainAssetOptions = /** @type {object} */ ({}),
|
|
15
15
|
} = {},
|
|
16
16
|
{ env = process.env } = {},
|
|
@@ -38,7 +38,7 @@ export const defaultProposalBuilder = async (
|
|
|
38
38
|
getManifestForAddAssetToVault.name,
|
|
39
39
|
{
|
|
40
40
|
debtLimitValue: debtLimitValue && BigInt(debtLimitValue),
|
|
41
|
-
|
|
41
|
+
interestRateValue: interestRateValue && BigInt(interestRateValue),
|
|
42
42
|
interchainAssetOptions: {
|
|
43
43
|
denom,
|
|
44
44
|
issuerBoardId,
|
package/src/interest-math.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function calculateCurrentDebt(debtSnapshot: Amount<'nat'>,
|
|
1
|
+
export function calculateCurrentDebt(debtSnapshot: Amount<'nat'>, interestSnapshot: Ratio, currentCompoundedInterest: Ratio): Amount<'nat'>;
|
|
2
2
|
export function reverseInterest(debt: Amount<'nat'>, interestApplied: Ratio): Amount<'nat'>;
|
|
3
3
|
//# sourceMappingURL=interest-math.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interest-math.d.ts","sourceRoot":"","sources":["interest-math.js"],"names":[],"mappings":"AAgCO,mDALI,OAAO,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"interest-math.d.ts","sourceRoot":"","sources":["interest-math.js"],"names":[],"mappings":"AAgCO,mDALI,OAAO,KAAK,CAAC,oBACb,KAAK,6BACL,KAAK,GACH,OAAO,KAAK,CAAC,CAiBzB;AAOM,sCAJI,OAAO,KAAK,CAAC,mBACb,KAAK,GACH,OAAO,KAAK,CAAC,CAIzB"}
|
package/src/interest-math.js
CHANGED
|
@@ -9,39 +9,39 @@ import {
|
|
|
9
9
|
} from '@agoric/zoe/src/contractSupport/ratio.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* @param {Ratio}
|
|
13
|
-
* @param {Ratio}
|
|
12
|
+
* @param {Ratio} currentCompoundedInterest as coefficient
|
|
13
|
+
* @param {Ratio} previousCompoundedInterest as coefficient
|
|
14
14
|
* @returns {Ratio} additional compounding since the previous
|
|
15
15
|
*/
|
|
16
16
|
const calculateRelativeCompounding = (
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
currentCompoundedInterest,
|
|
18
|
+
previousCompoundedInterest,
|
|
19
19
|
) => {
|
|
20
20
|
// divide compounded interest by the snapshot
|
|
21
21
|
return multiplyRatios(
|
|
22
|
-
|
|
23
|
-
invertRatio(
|
|
22
|
+
currentCompoundedInterest,
|
|
23
|
+
invertRatio(previousCompoundedInterest),
|
|
24
24
|
);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @param {Amount<'nat'>} debtSnapshot
|
|
29
|
-
* @param {Ratio}
|
|
30
|
-
* @param {Ratio}
|
|
29
|
+
* @param {Ratio} interestSnapshot as coefficient
|
|
30
|
+
* @param {Ratio} currentCompoundedInterest as coefficient
|
|
31
31
|
* @returns {Amount<'nat'>}
|
|
32
32
|
*/
|
|
33
33
|
export const calculateCurrentDebt = (
|
|
34
34
|
debtSnapshot,
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
interestSnapshot,
|
|
36
|
+
currentCompoundedInterest,
|
|
37
37
|
) => {
|
|
38
|
-
if (ratiosSame(
|
|
38
|
+
if (ratiosSame(interestSnapshot, currentCompoundedInterest)) {
|
|
39
39
|
return debtSnapshot;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
const interestSinceSnapshot = calculateRelativeCompounding(
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
currentCompoundedInterest,
|
|
44
|
+
interestSnapshot,
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
return multiplyBy(debtSnapshot, interestSinceSnapshot);
|
package/src/interest.d.ts
CHANGED
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export const SECONDS_PER_YEAR: bigint;
|
|
7
7
|
export function makeInterestCalculator(annualRate: Ratio, chargingPeriod: RelativeTime, recordingPeriod: RelativeTime): CalculatorKit;
|
|
8
|
-
export function
|
|
8
|
+
export function calculateCompoundedInterest(priorCompoundedInterest: Ratio, priorDebt: NatValue, newDebt: NatValue): Ratio;
|
|
9
9
|
export function chargeInterest(powers: {
|
|
10
10
|
mint: ZCFMint<'nat'>;
|
|
11
11
|
mintAndTransferWithFee: MintAndTransfer;
|
|
12
12
|
poolIncrementSeat: ZCFSeat;
|
|
13
13
|
seatAllocationKeyword: Keyword;
|
|
14
14
|
}, params: {
|
|
15
|
-
|
|
15
|
+
interestRate: Ratio;
|
|
16
16
|
chargingPeriod: RelativeTime;
|
|
17
17
|
recordingPeriod: RelativeTime;
|
|
18
18
|
}, prior: {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
latestInterestUpdate: Timestamp;
|
|
20
|
+
compoundedInterest: Ratio;
|
|
21
21
|
totalDebt: Amount<'nat'>;
|
|
22
22
|
}, accruedUntil: Timestamp): {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
compoundedInterest: Ratio;
|
|
24
|
+
latestInterestUpdate: Timestamp;
|
|
25
25
|
totalDebt: Amount<'nat'>;
|
|
26
26
|
};
|
|
27
27
|
export type Timestamp = import('@agoric/time/src/types').Timestamp;
|
package/src/interest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interest.d.ts","sourceRoot":"","sources":["interest.js"],"names":[],"mappings":"AAYA;;;;GAIG;AAEH,sCAAuD;AAchD,mDALI,KAAK,kBACL,YAAY,mBACZ,YAAY,GACV,aAAa,CA+EzB;AASM,
|
|
1
|
+
{"version":3,"file":"interest.d.ts","sourceRoot":"","sources":["interest.js"],"names":[],"mappings":"AAYA;;;;GAIG;AAEH,sCAAuD;AAchD,mDALI,KAAK,kBACL,YAAY,mBACZ,YAAY,GACV,aAAa,CA+EzB;AASM,qEAJI,KAAK,aACL,QAAQ,WACR,QAAQ,SAalB;AAyCM,uCAvBI;IACV,IAAQ,EAAE,QAAQ,KAAK,CAAC,CAAC;IACzB,sBAA0B,EAAE,eAAe,CAAC;IAC5C,iBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAyB,EAAE,OAAO,CAAC;CAChC,UACO;IACV,YAAgB,EAAE,KAAK,CAAC;IACxB,cAAkB,EAAE,YAAY,CAAC;IACjC,eAAmB,EAAE,YAAY,CAAC;CAC/B;0BAEuB,SAAS;wBACX,KAAK;eACd,OAAO,KAAK,CAAC;iBAElB,SAAS;wBAEK,KAAK;0BACH,SAAS;eACpB,OAAO,KAAK,CAAC;EA+D5B;wBAzNY,OAAO,wBAAwB,EAAE,SAAS;2BAE1C,OAAO,wBAAwB,EAAE,YAAY"}
|
package/src/interest.js
CHANGED
|
@@ -56,8 +56,8 @@ export const makeInterestCalculator = (
|
|
|
56
56
|
* @type {Calculate}
|
|
57
57
|
*/
|
|
58
58
|
const calculate = (debtStatus, currentTime) => {
|
|
59
|
-
const { newDebt,
|
|
60
|
-
let newRecent =
|
|
59
|
+
const { newDebt, latestInterestUpdate } = debtStatus;
|
|
60
|
+
let newRecent = latestInterestUpdate;
|
|
61
61
|
let growingInterest = debtStatus.interest;
|
|
62
62
|
let growingDebt = newDebt;
|
|
63
63
|
while (
|
|
@@ -77,7 +77,7 @@ export const makeInterestCalculator = (
|
|
|
77
77
|
growingDebt += newInterest;
|
|
78
78
|
}
|
|
79
79
|
return {
|
|
80
|
-
|
|
80
|
+
latestInterestUpdate: newRecent,
|
|
81
81
|
interest: growingInterest,
|
|
82
82
|
newDebt: growingDebt,
|
|
83
83
|
};
|
|
@@ -92,9 +92,9 @@ export const makeInterestCalculator = (
|
|
|
92
92
|
* @type {Calculate}
|
|
93
93
|
*/
|
|
94
94
|
const calculateReportingPeriod = (debtStatus, currentTime) => {
|
|
95
|
-
const {
|
|
95
|
+
const { latestInterestUpdate } = debtStatus;
|
|
96
96
|
const overshoot = TimeMath.modRelRel(
|
|
97
|
-
TimeMath.subtractAbsAbs(currentTime,
|
|
97
|
+
TimeMath.subtractAbsAbs(currentTime, latestInterestUpdate),
|
|
98
98
|
recordingPeriod,
|
|
99
99
|
);
|
|
100
100
|
return calculate(
|
|
@@ -110,20 +110,20 @@ export const makeInterestCalculator = (
|
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* compoundedInterest *= (new debt) / (prior total debt)
|
|
114
114
|
*
|
|
115
|
-
* @param {Ratio}
|
|
115
|
+
* @param {Ratio} priorCompoundedInterest
|
|
116
116
|
* @param {NatValue} priorDebt
|
|
117
117
|
* @param {NatValue} newDebt
|
|
118
118
|
*/
|
|
119
|
-
export const
|
|
120
|
-
|
|
119
|
+
export const calculateCompoundedInterest = (
|
|
120
|
+
priorCompoundedInterest,
|
|
121
121
|
priorDebt,
|
|
122
122
|
newDebt,
|
|
123
123
|
) => {
|
|
124
|
-
const brand =
|
|
124
|
+
const brand = priorCompoundedInterest.numerator.brand;
|
|
125
125
|
const compounded = multiplyRatios(
|
|
126
|
-
|
|
126
|
+
priorCompoundedInterest,
|
|
127
127
|
makeRatio(newDebt, brand, priorDebt, brand),
|
|
128
128
|
);
|
|
129
129
|
return quantize(compounded, COMPOUNDED_INTEREST_DENOMINATOR);
|
|
@@ -143,8 +143,7 @@ const validatedBrand = (mint, debt) => {
|
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* Charge interest accrued between `
|
|
147
|
-
* `accruedUntil`.
|
|
146
|
+
* Charge interest accrued between `latestInterestUpdate` and `accruedUntil`.
|
|
148
147
|
*
|
|
149
148
|
* @param {{
|
|
150
149
|
* mint: ZCFMint<'nat'>;
|
|
@@ -153,19 +152,19 @@ const validatedBrand = (mint, debt) => {
|
|
|
153
152
|
* seatAllocationKeyword: Keyword;
|
|
154
153
|
* }} powers
|
|
155
154
|
* @param {{
|
|
156
|
-
*
|
|
155
|
+
* interestRate: Ratio;
|
|
157
156
|
* chargingPeriod: RelativeTime;
|
|
158
157
|
* recordingPeriod: RelativeTime;
|
|
159
158
|
* }} params
|
|
160
159
|
* @param {{
|
|
161
|
-
*
|
|
162
|
-
*
|
|
160
|
+
* latestInterestUpdate: Timestamp;
|
|
161
|
+
* compoundedInterest: Ratio;
|
|
163
162
|
* totalDebt: Amount<'nat'>;
|
|
164
163
|
* }} prior
|
|
165
164
|
* @param {Timestamp} accruedUntil
|
|
166
165
|
* @returns {{
|
|
167
|
-
*
|
|
168
|
-
*
|
|
166
|
+
* compoundedInterest: Ratio;
|
|
167
|
+
* latestInterestUpdate: Timestamp;
|
|
169
168
|
* totalDebt: Amount<'nat'>;
|
|
170
169
|
* }}
|
|
171
170
|
*/
|
|
@@ -173,7 +172,7 @@ export const chargeInterest = (powers, params, prior, accruedUntil) => {
|
|
|
173
172
|
const brand = validatedBrand(powers.mint, prior.totalDebt);
|
|
174
173
|
|
|
175
174
|
const interestCalculator = makeInterestCalculator(
|
|
176
|
-
params.
|
|
175
|
+
params.interestRate,
|
|
177
176
|
params.chargingPeriod,
|
|
178
177
|
params.recordingPeriod,
|
|
179
178
|
);
|
|
@@ -181,7 +180,7 @@ export const chargeInterest = (powers, params, prior, accruedUntil) => {
|
|
|
181
180
|
// calculate delta of accrued debt
|
|
182
181
|
const debtStatus = interestCalculator.calculateReportingPeriod(
|
|
183
182
|
{
|
|
184
|
-
|
|
183
|
+
latestInterestUpdate: prior.latestInterestUpdate,
|
|
185
184
|
newDebt: prior.totalDebt.value,
|
|
186
185
|
interest: 0n, // XXX this is always zero, doesn't need to be an option
|
|
187
186
|
},
|
|
@@ -192,8 +191,8 @@ export const chargeInterest = (powers, params, prior, accruedUntil) => {
|
|
|
192
191
|
// done if none
|
|
193
192
|
if (interestAccrued === 0n) {
|
|
194
193
|
return {
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
compoundedInterest: prior.compoundedInterest,
|
|
195
|
+
latestInterestUpdate: debtStatus.latestInterestUpdate,
|
|
197
196
|
totalDebt: prior.totalDebt,
|
|
198
197
|
};
|
|
199
198
|
}
|
|
@@ -203,8 +202,8 @@ export const chargeInterest = (powers, params, prior, accruedUntil) => {
|
|
|
203
202
|
// testing with small numbers there's 5 digits of precision, and with large
|
|
204
203
|
// numbers the ratios tend towards ample precision.
|
|
205
204
|
// TODO adopt banker's rounding https://github.com/Agoric/agoric-sdk/issues/4573
|
|
206
|
-
const
|
|
207
|
-
prior.
|
|
205
|
+
const compoundedInterest = calculateCompoundedInterest(
|
|
206
|
+
prior.compoundedInterest,
|
|
208
207
|
prior.totalDebt.value,
|
|
209
208
|
debtStatus.newDebt,
|
|
210
209
|
);
|
|
@@ -225,8 +224,8 @@ export const chargeInterest = (powers, params, prior, accruedUntil) => {
|
|
|
225
224
|
);
|
|
226
225
|
|
|
227
226
|
return {
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
compoundedInterest,
|
|
228
|
+
latestInterestUpdate: debtStatus.latestInterestUpdate,
|
|
230
229
|
totalDebt,
|
|
231
230
|
};
|
|
232
231
|
};
|
|
@@ -14,18 +14,18 @@ export function registerScaledPriceAuthority({ consume: { agoricNamesAdmin, star
|
|
|
14
14
|
interchainAssetOptions: InterchainAssetOptions;
|
|
15
15
|
};
|
|
16
16
|
}): Promise<void>;
|
|
17
|
-
export function addAssetToVault({ consume: { vaultFactoryKit, agoricNamesAdmin, auctioneerKit }, brand: { consume: { [Stable.symbol]: stableP }, }, instance: { consume: consumeInstance }, }: EconomyBootstrapPowers, { options: { debtLimitValue,
|
|
17
|
+
export function addAssetToVault({ consume: { vaultFactoryKit, agoricNamesAdmin, auctioneerKit }, brand: { consume: { [Stable.symbol]: stableP }, }, instance: { consume: consumeInstance }, }: EconomyBootstrapPowers, { options: { debtLimitValue, interestRateValue, interchainAssetOptions, }, }: {
|
|
18
18
|
options: {
|
|
19
19
|
interchainAssetOptions: InterchainAssetOptions;
|
|
20
20
|
debtLimitValue: bigint | number | string;
|
|
21
|
-
|
|
21
|
+
interestRateValue: bigint;
|
|
22
22
|
};
|
|
23
23
|
}): Promise<void>;
|
|
24
24
|
export function getManifestForAddAssetToVault({ restoreRef }: {
|
|
25
25
|
restoreRef: any;
|
|
26
|
-
}, { debtLimitValue,
|
|
26
|
+
}, { debtLimitValue, interestRateValue, interchainAssetOptions, scaledPriceAuthorityRef, }: {
|
|
27
27
|
debtLimitValue: any;
|
|
28
|
-
|
|
28
|
+
interestRateValue: any;
|
|
29
29
|
interchainAssetOptions: any;
|
|
30
30
|
scaledPriceAuthorityRef: any;
|
|
31
31
|
}): {
|
|
@@ -138,7 +138,7 @@ export function getManifestForAddAssetToVault({ restoreRef }: {
|
|
|
138
138
|
options: {
|
|
139
139
|
debtLimitValue: any;
|
|
140
140
|
interchainAssetOptions: any;
|
|
141
|
-
|
|
141
|
+
interestRateValue: any;
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
144
|
export type InterchainAssetOptions = {
|
|
@@ -212,7 +212,7 @@ export const registerScaledPriceAuthority = async (
|
|
|
212
212
|
* @param {object} config.options
|
|
213
213
|
* @param {InterchainAssetOptions} config.options.interchainAssetOptions
|
|
214
214
|
* @param {bigint | number | string} config.options.debtLimitValue
|
|
215
|
-
* @param {bigint} config.options.
|
|
215
|
+
* @param {bigint} config.options.interestRateValue
|
|
216
216
|
*/
|
|
217
217
|
export const addAssetToVault = async (
|
|
218
218
|
{
|
|
@@ -228,7 +228,7 @@ export const addAssetToVault = async (
|
|
|
228
228
|
debtLimitValue = 1_000n * 1_000_000n,
|
|
229
229
|
// Default to a safe value. Production will likely set this through governance.
|
|
230
230
|
// Allow setting through bootstrap to simplify testing.
|
|
231
|
-
|
|
231
|
+
interestRateValue = 1n,
|
|
232
232
|
interchainAssetOptions,
|
|
233
233
|
},
|
|
234
234
|
},
|
|
@@ -250,7 +250,7 @@ export const addAssetToVault = async (
|
|
|
250
250
|
const vaultFactoryCreator = E.get(vaultFactoryKit).creatorFacet;
|
|
251
251
|
await E(vaultFactoryCreator).addVaultType(interchainIssuer, oracleBrand, {
|
|
252
252
|
debtLimit: AmountMath.make(stable, BigInt(debtLimitValue)),
|
|
253
|
-
|
|
253
|
+
interestRate: makeRatio(interestRateValue, stable),
|
|
254
254
|
// The rest of these we use safe defaults.
|
|
255
255
|
// In production they will be governed by the Econ Committee.
|
|
256
256
|
// Product deployments are also expected to have a low debtLimitValue at the outset,
|
|
@@ -268,7 +268,7 @@ export const getManifestForAddAssetToVault = (
|
|
|
268
268
|
{ restoreRef },
|
|
269
269
|
{
|
|
270
270
|
debtLimitValue,
|
|
271
|
-
|
|
271
|
+
interestRateValue,
|
|
272
272
|
interchainAssetOptions,
|
|
273
273
|
scaledPriceAuthorityRef,
|
|
274
274
|
},
|
|
@@ -341,7 +341,7 @@ export const getManifestForAddAssetToVault = (
|
|
|
341
341
|
options: {
|
|
342
342
|
debtLimitValue,
|
|
343
343
|
interchainAssetOptions,
|
|
344
|
-
|
|
344
|
+
interestRateValue,
|
|
345
345
|
},
|
|
346
346
|
};
|
|
347
347
|
};
|
|
@@ -4,7 +4,7 @@ export const DEBT_LIMIT_KEY: "DebtLimit";
|
|
|
4
4
|
export const LIQUIDATION_MARGIN_KEY: "LiquidationMargin";
|
|
5
5
|
export const LIQUIDATION_PADDING_KEY: "LiquidationPadding";
|
|
6
6
|
export const LIQUIDATION_PENALTY_KEY: "LiquidationPenalty";
|
|
7
|
-
export const
|
|
7
|
+
export const INTEREST_RATE_KEY: "InterestRate";
|
|
8
8
|
export const MINT_FEE_KEY: "MintFee";
|
|
9
9
|
export const MIN_INITIAL_DEBT_KEY: "MinInitialDebt";
|
|
10
10
|
export const SHORTFALL_INVITATION_KEY: "ShortfallInvitation";
|
|
@@ -15,9 +15,9 @@ export namespace vaultDirectorParamTypes {
|
|
|
15
15
|
let RecordingPeriod: "nat";
|
|
16
16
|
let ReferencedUI: "string";
|
|
17
17
|
}
|
|
18
|
-
export function makeVaultParamManager(publisherKit: import('@agoric/notifier').StoredPublisherKit<GovernanceSubscriptionState>, { debtLimit,
|
|
18
|
+
export function makeVaultParamManager(publisherKit: import('@agoric/notifier').StoredPublisherKit<GovernanceSubscriptionState>, { debtLimit, interestRate, liquidationMargin, liquidationPadding, liquidationPenalty, mintFee, }: VaultManagerParamValues): import("@agoric/governance/src/contractGovernance/typedParamManager").TypedParamManager<{
|
|
19
19
|
DebtLimit: "amount";
|
|
20
|
-
|
|
20
|
+
InterestRate: "ratio";
|
|
21
21
|
LiquidationPadding: "ratio";
|
|
22
22
|
LiquidationMargin: "ratio";
|
|
23
23
|
LiquidationPenalty: "ratio";
|
|
@@ -104,7 +104,7 @@ export function provideVaultParamManagers(baggage: MapStore<string, unknown>, ma
|
|
|
104
104
|
*/
|
|
105
105
|
addParamManager(brand: Brand, storageNode: StorageNode, initialParamValues: VaultManagerParamValues): import("@agoric/governance/src/contractGovernance/typedParamManager").TypedParamManager<{
|
|
106
106
|
DebtLimit: "amount";
|
|
107
|
-
|
|
107
|
+
InterestRate: "ratio";
|
|
108
108
|
LiquidationPadding: "ratio";
|
|
109
109
|
LiquidationMargin: "ratio";
|
|
110
110
|
LiquidationPenalty: "ratio";
|
|
@@ -113,7 +113,7 @@ export function provideVaultParamManagers(baggage: MapStore<string, unknown>, ma
|
|
|
113
113
|
/** @param {Brand} brand */
|
|
114
114
|
get(brand: Brand): import("@agoric/governance/src/contractGovernance/typedParamManager").TypedParamManager<{
|
|
115
115
|
DebtLimit: "amount";
|
|
116
|
-
|
|
116
|
+
InterestRate: "ratio";
|
|
117
117
|
LiquidationPadding: "ratio";
|
|
118
118
|
LiquidationMargin: "ratio";
|
|
119
119
|
LiquidationPenalty: "ratio";
|
|
@@ -21,7 +21,7 @@ export const DEBT_LIMIT_KEY = 'DebtLimit';
|
|
|
21
21
|
export const LIQUIDATION_MARGIN_KEY = 'LiquidationMargin';
|
|
22
22
|
export const LIQUIDATION_PADDING_KEY = 'LiquidationPadding';
|
|
23
23
|
export const LIQUIDATION_PENALTY_KEY = 'LiquidationPenalty';
|
|
24
|
-
export const
|
|
24
|
+
export const INTEREST_RATE_KEY = 'InterestRate';
|
|
25
25
|
export const MINT_FEE_KEY = 'MintFee';
|
|
26
26
|
export const MIN_INITIAL_DEBT_KEY = 'MinInitialDebt';
|
|
27
27
|
export const SHORTFALL_INVITATION_KEY = 'ShortfallInvitation';
|
|
@@ -93,7 +93,7 @@ export const makeVaultParamManager = (
|
|
|
93
93
|
publisherKit,
|
|
94
94
|
{
|
|
95
95
|
debtLimit,
|
|
96
|
-
|
|
96
|
+
interestRate,
|
|
97
97
|
liquidationMargin,
|
|
98
98
|
liquidationPadding = zeroRatio(liquidationMargin),
|
|
99
99
|
liquidationPenalty,
|
|
@@ -102,7 +102,7 @@ export const makeVaultParamManager = (
|
|
|
102
102
|
) =>
|
|
103
103
|
makeParamManagerSync(publisherKit, {
|
|
104
104
|
[DEBT_LIMIT_KEY]: [ParamTypes.AMOUNT, debtLimit],
|
|
105
|
-
[
|
|
105
|
+
[INTEREST_RATE_KEY]: [ParamTypes.RATIO, interestRate],
|
|
106
106
|
[LIQUIDATION_PADDING_KEY]: [ParamTypes.RATIO, liquidationPadding],
|
|
107
107
|
[LIQUIDATION_MARGIN_KEY]: [ParamTypes.RATIO, liquidationMargin],
|
|
108
108
|
[LIQUIDATION_PENALTY_KEY]: [ParamTypes.RATIO, liquidationPenalty],
|
|
@@ -114,7 +114,7 @@ export const vaultParamPattern = M.splitRecord(
|
|
|
114
114
|
{
|
|
115
115
|
liquidationMargin: ratioPattern,
|
|
116
116
|
liquidationPenalty: ratioPattern,
|
|
117
|
-
|
|
117
|
+
interestRate: ratioPattern,
|
|
118
118
|
mintFee: ratioPattern,
|
|
119
119
|
debtLimit: amountPattern,
|
|
120
120
|
},
|
|
@@ -12,8 +12,8 @@ export const encodeData: (passable: any) => string;
|
|
|
12
12
|
export const decodeData: (encoded: string) => any;
|
|
13
13
|
export function toVaultKey(normalizedDebt: NormalizedDebt, collateral: Amount<'nat'>, vaultId: VaultId): string;
|
|
14
14
|
export function fromVaultKey(key: string): [normalizedCollateralization: number, vaultId: VaultId];
|
|
15
|
-
export function normalizedCollRatio(quote: PriceQuote,
|
|
16
|
-
export function normalizedCollRatioKey(quote: PriceQuote,
|
|
15
|
+
export function normalizedCollRatio(quote: PriceQuote, compoundedInterest: Ratio, margin: Ratio): number;
|
|
16
|
+
export function normalizedCollRatioKey(quote: PriceQuote, compoundedInterest: Ratio, margin: Ratio): string;
|
|
17
17
|
export type PureData = import('@endo/marshal').PureData;
|
|
18
18
|
export type CompositeKey = [normalizedCollateralization: number, vaultId: VaultId];
|
|
19
19
|
export type NormalizedDebt = Amount<'nat'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storeUtils.d.ts","sourceRoot":"","sources":["storeUtils.js"],"names":[],"mappings":"AAqBA,2DAA2D;AAE3D,sFAAsF;AAOtF;;;GAGG;AACH,mDAA+C;AAO/C;;;GAGG;AACH,kDAA+C;AAkDxC,2CANI,cAAc,cACd,OAAO,KAAK,CAAC,WACb,OAAO,GACL,MAAM,CAelB;AAOM,kCAHI,MAAM,GACJ,CAAC,2BAA2B,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAKnE;AAgBM,2CALI,UAAU,
|
|
1
|
+
{"version":3,"file":"storeUtils.d.ts","sourceRoot":"","sources":["storeUtils.js"],"names":[],"mappings":"AAqBA,2DAA2D;AAE3D,sFAAsF;AAOtF;;;GAGG;AACH,mDAA+C;AAO/C;;;GAGG;AACH,kDAA+C;AAkDxC,2CANI,cAAc,cACd,OAAO,KAAK,CAAC,WACb,OAAO,GACL,MAAM,CAelB;AAOM,kCAHI,MAAM,GACJ,CAAC,2BAA2B,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAKnE;AAgBM,2CALI,UAAU,sBACV,KAAK,UACL,KAAK,GACH,MAAM,CAiBlB;AAcM,8CANI,UAAU,sBACV,KAAK,UACL,KAAK,GACH,MAAM,CAMlB;uBAhJa,OAAO,eAAe,EAAE,QAAQ;2BAEhC,CAAC,2BAA2B,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;6BA4CvD,OAAO,KAAK,CAAC,GAAG;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE;yBACpC,OAAO,KAAK,CAAC,GAAG;IAAE,UAAU,EAAE,KAAK,CAAA;CAAE"}
|
|
@@ -127,15 +127,15 @@ harden(fromVaultKey);
|
|
|
127
127
|
* For use by `normalizedCollRatioKey` and tests.
|
|
128
128
|
*
|
|
129
129
|
* @param {PriceQuote} quote
|
|
130
|
-
* @param {Ratio}
|
|
130
|
+
* @param {Ratio} compoundedInterest
|
|
131
131
|
* @param {Ratio} margin
|
|
132
132
|
* @returns {number}
|
|
133
133
|
*/
|
|
134
|
-
export const normalizedCollRatio = (quote,
|
|
134
|
+
export const normalizedCollRatio = (quote, compoundedInterest, margin) => {
|
|
135
135
|
const amountIn = getAmountIn(quote).value;
|
|
136
136
|
const amountOut = getAmountOut(quote).value;
|
|
137
|
-
const interestNumerator =
|
|
138
|
-
const interestBase =
|
|
137
|
+
const interestNumerator = compoundedInterest.numerator.value;
|
|
138
|
+
const interestBase = compoundedInterest.denominator.value;
|
|
139
139
|
const numerator = multiply(
|
|
140
140
|
margin.numerator.value,
|
|
141
141
|
multiply(amountIn, interestNumerator),
|
|
@@ -155,17 +155,13 @@ harden(normalizedCollRatio);
|
|
|
155
155
|
* out the numerator and the denominator, and divide only once.
|
|
156
156
|
*
|
|
157
157
|
* @param {PriceQuote} quote
|
|
158
|
-
* @param {Ratio}
|
|
158
|
+
* @param {Ratio} compoundedInterest
|
|
159
159
|
* @param {Ratio} margin
|
|
160
160
|
* @returns {string} lexically sortable string in which highest
|
|
161
161
|
* debt-to-collateral is earliest
|
|
162
162
|
*/
|
|
163
|
-
export const normalizedCollRatioKey = (
|
|
164
|
-
quote,
|
|
165
|
-
compoundedStabilityFee,
|
|
166
|
-
margin,
|
|
167
|
-
) => {
|
|
168
|
-
const collRatio = normalizedCollRatio(quote, compoundedStabilityFee, margin);
|
|
163
|
+
export const normalizedCollRatioKey = (quote, compoundedInterest, margin) => {
|
|
164
|
+
const collRatio = normalizedCollRatio(quote, compoundedInterest, margin);
|
|
169
165
|
return `${encodeNumber(collRatio)}:`;
|
|
170
166
|
};
|
|
171
167
|
harden(normalizedCollRatioKey);
|
|
@@ -28,7 +28,7 @@ type VaultManagerParamValues = {
|
|
|
28
28
|
* - annual interest rate charged on debt
|
|
29
29
|
* positions
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
interestRate: Ratio;
|
|
32
32
|
/**
|
|
33
33
|
* - The fee (in BasisPoints) charged when creating or
|
|
34
34
|
* increasing a debt position.
|
|
@@ -69,7 +69,7 @@ type GetVaultParams = {
|
|
|
69
69
|
* - The annual interest rate on a debt
|
|
70
70
|
* position
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
getInterestRate: () => Ratio;
|
|
73
73
|
/**
|
|
74
74
|
* - The period (in seconds) at
|
|
75
75
|
* which interest is charged to the debt position.
|
|
@@ -104,9 +104,9 @@ type Liquidator = {
|
|
|
104
104
|
}>>;
|
|
105
105
|
};
|
|
106
106
|
type DebtStatus = {
|
|
107
|
-
|
|
107
|
+
latestInterestUpdate: Timestamp;
|
|
108
108
|
/**
|
|
109
|
-
* interest accrued since
|
|
109
|
+
* interest accrued since latestInterestUpdate
|
|
110
110
|
*/
|
|
111
111
|
interest: NatValue;
|
|
112
112
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":"yBAGa,OAAO,SAAS,EAAE,iBAAiB;aAEnC,OAAO,SAAS,EAAE,KAAK;gBAEvB,OAAO,YAAY,EAAE,QAAQ;oBAE7B,OAAO,gBAAgB,EAAE,YAAY;yBAErC,OAAO,gBAAgB,EAAE,iBAAiB;gCAE1C,OAAO,4BAA4B,EAAE,+BAA+B;+BAEpE,OAAO,4BAA4B,EAAE,uBAAuB;6BAE5D,OAAO,0BAA0B,EAAE,qBAAqB;+BAExD,OAAO,mBAAmB,EAAE,oBAAoB,CAAC,aAAa,CAAC;iBAE/D,OAAO,wBAAwB,EAAE,SAAS;oBAE1C,OAAO,wBAAwB,EAAE,YAAY;;4BAKnC,MAAM,SAAS,KAAK,KAAK,MAAM;wBACxC,MAAM,UAAU;;;;;;;uBAKhB,KAAK;;;;;wBAEL,KAAK;;;;;kBAEL,KAAK;;;;;aAEL,KAAK;eAEL,OAAO,KAAK,CAAC;;;;;;;uCAOhB,MAAM,qBACN,OAAO,UACP,uBAAuB,KACrB,QAAQ,YAAY,CAAC;;kBAKpB,YAAY;yBACZ,MAAM,UAAU;+BAChB,MAAM,QAAQ,WAAW,MAAM,EAAE,KAAK,CAAC,CAAC;0BACxC,MAAM,OAAO,wBAAwB,EAAE,UAAU;wBACjD,MAAM,OAAO,wBAAwB,EAAE,UAAU;;;;;;;;sCAQpD,OAAO,UACP,OAAO,KAAK,CAAC,OACb,OAAO,KAAK,CAAC,aACb,OAAO,mDAAmD,EAAE,YAAY,EAAE,KACxE,IAAI;;;;;yBAMN,MAAM,YACN,OAAO,KACL,IAAI;;0BAKH,MAAM,KAAK;gBACX,MAAM,KAAK;wBACX,MAAM,QAAQ,UAAU,CAAC;;;;;qBACzB,MAAM,KAAK;;;;;uBAEX,MAAM,YAAY;;;;;wBAElB,MAAM,YAAY;;eAIlB,MAAM;;;;;oBAIN,YAAY;;;;qBACZ,YAAY;;;oBAKZ,MAAM,oBAAoB;+BACb,MAAM,OAAO,MAAM,KAAK,QAAQ;2BACtC,MAAM,KAAK,QAAQ,UAAU,CAAC;;;6BAKrC,MAAM,QACnB,WAAe,IAAI,EAAE;QAAE,IAAI,EAAE,OAAO,KAAK,CAAC,CAAC;QAAC,WAAW,EAAE,KAAK,CAAA;KAAE,CAAC,CAC9D;;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":"yBAGa,OAAO,SAAS,EAAE,iBAAiB;aAEnC,OAAO,SAAS,EAAE,KAAK;gBAEvB,OAAO,YAAY,EAAE,QAAQ;oBAE7B,OAAO,gBAAgB,EAAE,YAAY;yBAErC,OAAO,gBAAgB,EAAE,iBAAiB;gCAE1C,OAAO,4BAA4B,EAAE,+BAA+B;+BAEpE,OAAO,4BAA4B,EAAE,uBAAuB;6BAE5D,OAAO,0BAA0B,EAAE,qBAAqB;+BAExD,OAAO,mBAAmB,EAAE,oBAAoB,CAAC,aAAa,CAAC;iBAE/D,OAAO,wBAAwB,EAAE,SAAS;oBAE1C,OAAO,wBAAwB,EAAE,YAAY;;4BAKnC,MAAM,SAAS,KAAK,KAAK,MAAM;wBACxC,MAAM,UAAU;;;;;;;uBAKhB,KAAK;;;;;wBAEL,KAAK;;;;;kBAEL,KAAK;;;;;aAEL,KAAK;eAEL,OAAO,KAAK,CAAC;;;;;;;uCAOhB,MAAM,qBACN,OAAO,UACP,uBAAuB,KACrB,QAAQ,YAAY,CAAC;;kBAKpB,YAAY;yBACZ,MAAM,UAAU;+BAChB,MAAM,QAAQ,WAAW,MAAM,EAAE,KAAK,CAAC,CAAC;0BACxC,MAAM,OAAO,wBAAwB,EAAE,UAAU;wBACjD,MAAM,OAAO,wBAAwB,EAAE,UAAU;;;;;;;;sCAQpD,OAAO,UACP,OAAO,KAAK,CAAC,OACb,OAAO,KAAK,CAAC,aACb,OAAO,mDAAmD,EAAE,YAAY,EAAE,KACxE,IAAI;;;;;yBAMN,MAAM,YACN,OAAO,KACL,IAAI;;0BAKH,MAAM,KAAK;gBACX,MAAM,KAAK;wBACX,MAAM,QAAQ,UAAU,CAAC;;;;;qBACzB,MAAM,KAAK;;;;;uBAEX,MAAM,YAAY;;;;;wBAElB,MAAM,YAAY;;eAIlB,MAAM;;;;;oBAIN,YAAY;;;;qBACZ,YAAY;;;oBAKZ,MAAM,oBAAoB;+BACb,MAAM,OAAO,MAAM,KAAK,QAAQ;2BACtC,MAAM,KAAK,QAAQ,UAAU,CAAC;;;6BAKrC,MAAM,QACnB,WAAe,IAAI,EAAE;QAAE,IAAI,EAAE,OAAO,KAAK,CAAC,CAAC;QAAC,WAAW,EAAE,KAAK,CAAA;KAAE,CAAC,CAC9D;;;0BAKU,SAAS;;;;cACT,QAAQ;;;;aACR,QAAQ;;8BAKX,UAAU,eACV,SAAS,KACP,UAAU;;;;;;eAKT,SAAS;;;;;;;8BAET,SAAS;;6BAMT;IAAE,GAAG,EAAE,gBAAgB,GAAG;QAAE,eAAe,EAAE,KAAK,CAAA;KAAE,CAAA;CAAE"}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* liquidated to satisfy the debt.
|
|
37
37
|
* @property {Ratio} liquidationPenalty - penalty charged upon liquidation as
|
|
38
38
|
* proportion of debt
|
|
39
|
-
* @property {Ratio}
|
|
39
|
+
* @property {Ratio} interestRate - annual interest rate charged on debt
|
|
40
40
|
* positions
|
|
41
41
|
* @property {Ratio} mintFee - The fee (in BasisPoints) charged when creating or
|
|
42
42
|
* increasing a debt position.
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
* @property {() => Ratio} getLiquidationMargin
|
|
88
88
|
* @property {() => Ratio} getMintFee
|
|
89
89
|
* @property {() => Promise<PriceQuote>} getCollateralQuote
|
|
90
|
-
* @property {() => Ratio}
|
|
90
|
+
* @property {() => Ratio} getInterestRate - The annual interest rate on a debt
|
|
91
91
|
* position
|
|
92
92
|
* @property {() => RelativeTime} getChargingPeriod - The period (in seconds) at
|
|
93
93
|
* which interest is charged to the debt position.
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* @typedef {object} DebtStatus
|
|
122
|
-
* @property {Timestamp}
|
|
123
|
-
* @property {NatValue} interest interest accrued since
|
|
122
|
+
* @property {Timestamp} latestInterestUpdate
|
|
123
|
+
* @property {NatValue} interest interest accrued since latestInterestUpdate
|
|
124
124
|
* @property {NatValue} newDebt total including principal and interest
|
|
125
125
|
*/
|
|
126
126
|
|