@agoric/inter-protocol 0.13.2-dev-4e866ab.0 → 0.13.2-dev-2354e8d.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 +8 -7
- package/bundles/bundle-auctioneer-js-meta.json +115 -115
- package/bundles/bundle-auctioneer.js +1 -1
- package/bundles/bundle-econCommitteeCharter-js-meta.json +71 -71
- package/bundles/bundle-econCommitteeCharter.js +1 -1
- package/bundles/bundle-feeDistributor-js-meta.json +57 -57
- package/bundles/bundle-feeDistributor.js +1 -1
- package/bundles/bundle-fluxAggregatorKit-js-meta.json +110 -110
- package/bundles/bundle-fluxAggregatorKit.js +1 -1
- package/bundles/bundle-psm-js-meta.json +108 -108
- package/bundles/bundle-psm.js +1 -1
- package/bundles/bundle-reserve-js-meta.json +106 -106
- package/bundles/bundle-reserve.js +1 -1
- package/bundles/bundle-scaledPriceAuthority-js-meta.json +77 -77
- package/bundles/bundle-scaledPriceAuthority.js +1 -1
- package/bundles/bundle-stakeFactory-js-meta.json +114 -114
- package/bundles/bundle-stakeFactory.js +1 -1
- package/bundles/bundle-vaultFactory-js-meta.json +131 -131
- package/bundles/bundle-vaultFactory.js +1 -1
- package/package.json +17 -17
- package/scripts/init-core.js +0 -2
- package/src/auction/auctionBook.js +0 -1
- package/src/auction/params.js +4 -4
- package/src/auction/scheduleMath.js +1 -1
- package/src/auction/scheduler.js +3 -3
- package/src/auction/sortedOffers.js +0 -1
- package/src/interest-math.js +0 -3
- package/src/interest.js +0 -1
- package/src/price/roundsManager.js +1 -1
- package/src/proposals/utils.js +0 -1
- package/src/stakeFactory/stakeFactory.js +0 -1
- package/src/stakeFactory/stakeFactoryManager.js +0 -1
- package/src/vaultFactory/liquidation.js +1 -1
- package/src/vaultFactory/prioritizedVaults.js +0 -2
- package/src/vaultFactory/vaultDirector.js +2 -1
- package/src/vaultFactory/vaultHolder.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/inter-protocol",
|
|
3
|
-
"version": "0.13.2-dev-
|
|
3
|
+
"version": "0.13.2-dev-2354e8d.0+2354e8d",
|
|
4
4
|
"description": "Core cryptoeconomy contracts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -29,29 +29,29 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agoric/assert": "0.5.2-dev-
|
|
33
|
-
"@agoric/ertp": "0.15.4-dev-
|
|
34
|
-
"@agoric/governance": "0.9.2-dev-
|
|
35
|
-
"@agoric/internal": "0.2.2-dev-
|
|
36
|
-
"@agoric/notifier": "0.5.2-dev-
|
|
37
|
-
"@agoric/store": "0.8.4-dev-
|
|
38
|
-
"@agoric/time": "0.2.2-dev-
|
|
39
|
-
"@agoric/vat-data": "0.4.4-dev-
|
|
40
|
-
"@agoric/vats": "0.13.1-dev-
|
|
41
|
-
"@agoric/zoe": "0.25.4-dev-
|
|
32
|
+
"@agoric/assert": "0.5.2-dev-2354e8d.0+2354e8d",
|
|
33
|
+
"@agoric/ertp": "0.15.4-dev-2354e8d.0+2354e8d",
|
|
34
|
+
"@agoric/governance": "0.9.2-dev-2354e8d.0+2354e8d",
|
|
35
|
+
"@agoric/internal": "0.2.2-dev-2354e8d.0+2354e8d",
|
|
36
|
+
"@agoric/notifier": "0.5.2-dev-2354e8d.0+2354e8d",
|
|
37
|
+
"@agoric/store": "0.8.4-dev-2354e8d.0+2354e8d",
|
|
38
|
+
"@agoric/time": "0.2.2-dev-2354e8d.0+2354e8d",
|
|
39
|
+
"@agoric/vat-data": "0.4.4-dev-2354e8d.0+2354e8d",
|
|
40
|
+
"@agoric/vats": "0.13.1-dev-2354e8d.0+2354e8d",
|
|
41
|
+
"@agoric/zoe": "0.25.4-dev-2354e8d.0+2354e8d",
|
|
42
42
|
"@endo/captp": "^3.1.1",
|
|
43
43
|
"@endo/eventual-send": "^0.17.2",
|
|
44
44
|
"@endo/far": "^0.2.18",
|
|
45
45
|
"@endo/marshal": "^0.8.5",
|
|
46
46
|
"@endo/nat": "^4.1.27",
|
|
47
|
-
"agoric": "0.18.3-dev-
|
|
47
|
+
"agoric": "0.18.3-dev-2354e8d.0+2354e8d",
|
|
48
48
|
"jessie.js": "^0.3.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@agoric/deploy-script-support": "0.9.5-dev-
|
|
52
|
-
"@agoric/smart-wallet": "0.4.3-dev-
|
|
53
|
-
"@agoric/swingset-liveslots": "0.9.1-dev-
|
|
54
|
-
"@agoric/swingset-vat": "0.30.3-dev-
|
|
51
|
+
"@agoric/deploy-script-support": "0.9.5-dev-2354e8d.0+2354e8d",
|
|
52
|
+
"@agoric/smart-wallet": "0.4.3-dev-2354e8d.0+2354e8d",
|
|
53
|
+
"@agoric/swingset-liveslots": "0.9.1-dev-2354e8d.0+2354e8d",
|
|
54
|
+
"@agoric/swingset-vat": "0.30.3-dev-2354e8d.0+2354e8d",
|
|
55
55
|
"@endo/bundle-source": "^2.5.1",
|
|
56
56
|
"@endo/init": "^0.5.56",
|
|
57
57
|
"@endo/promise-kit": "^0.2.56",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "2354e8d4e23b6a9cc4be67a41d3c5a5119ef7d51"
|
|
81
81
|
}
|
package/scripts/init-core.js
CHANGED
|
@@ -53,7 +53,6 @@ const installKeyGroups = {
|
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
56
|
* @param {object} opts
|
|
58
57
|
* @param {(i: I) => R} opts.publishRef
|
|
59
58
|
* @param {(m: string, b: string, opts?: any) => I} opts.install
|
|
@@ -90,7 +89,6 @@ export const committeeProposalBuilder = async (
|
|
|
90
89
|
};
|
|
91
90
|
|
|
92
91
|
/**
|
|
93
|
-
*
|
|
94
92
|
* @param {object} opts
|
|
95
93
|
* @param {(i: I) => R} opts.publishRef
|
|
96
94
|
* @param {(m: string, b: string, opts?: any) => I} opts.install
|
package/src/auction/params.js
CHANGED
|
@@ -94,19 +94,19 @@ export const makeAuctioneerParams = ({
|
|
|
94
94
|
},
|
|
95
95
|
[START_FREQUENCY]: {
|
|
96
96
|
type: ParamTypes.RELATIVE_TIME,
|
|
97
|
-
value: TimeMath.
|
|
97
|
+
value: TimeMath.coerceRelativeTimeRecord(StartFreq, TimerBrand),
|
|
98
98
|
},
|
|
99
99
|
[CLOCK_STEP]: {
|
|
100
100
|
type: ParamTypes.RELATIVE_TIME,
|
|
101
|
-
value: TimeMath.
|
|
101
|
+
value: TimeMath.coerceRelativeTimeRecord(ClockStep, TimerBrand),
|
|
102
102
|
},
|
|
103
103
|
[AUCTION_START_DELAY]: {
|
|
104
104
|
type: ParamTypes.RELATIVE_TIME,
|
|
105
|
-
value: TimeMath.
|
|
105
|
+
value: TimeMath.coerceRelativeTimeRecord(AuctionStartDelay, TimerBrand),
|
|
106
106
|
},
|
|
107
107
|
[PRICE_LOCK_PERIOD]: {
|
|
108
108
|
type: ParamTypes.RELATIVE_TIME,
|
|
109
|
-
value: TimeMath.
|
|
109
|
+
value: TimeMath.coerceRelativeTimeRecord(PriceLockPeriod, TimerBrand),
|
|
110
110
|
},
|
|
111
111
|
[STARTING_RATE_BP]: { type: ParamTypes.NAT, value: StartingRate },
|
|
112
112
|
[LOWEST_RATE_BP]: { type: ParamTypes.NAT, value: LowestRate },
|
|
@@ -48,7 +48,7 @@ export const computeRoundTiming = (params, baseTime) => {
|
|
|
48
48
|
const targetDuration =
|
|
49
49
|
TimeMath.compareRel(requestedDuration, freq) < 0
|
|
50
50
|
? requestedDuration
|
|
51
|
-
: TimeMath.subtractRelRel(freq,
|
|
51
|
+
: TimeMath.subtractRelRel(freq, 1n);
|
|
52
52
|
const steps = TimeMath.divideRelRel(targetDuration, clockStep);
|
|
53
53
|
const duration = TimeMath.multiplyRelNat(clockStep, steps);
|
|
54
54
|
|
package/src/auction/scheduler.js
CHANGED
|
@@ -79,7 +79,7 @@ export const makeScheduler = async (
|
|
|
79
79
|
now => {
|
|
80
80
|
const nextSchedule = computeRoundTiming(
|
|
81
81
|
params,
|
|
82
|
-
TimeMath.
|
|
82
|
+
TimeMath.coerceTimestampRecord(now, timerBrand),
|
|
83
83
|
);
|
|
84
84
|
return { now, nextSchedule };
|
|
85
85
|
},
|
|
@@ -147,7 +147,7 @@ export const makeScheduler = async (
|
|
|
147
147
|
if (nextLock && TimeMath.compareAbs(now, nextLock) < 0) {
|
|
148
148
|
const afterNow = TimeMath.addAbsRel(
|
|
149
149
|
now,
|
|
150
|
-
TimeMath.
|
|
150
|
+
TimeMath.coerceRelativeTimeRecord(1n, timerBrand),
|
|
151
151
|
);
|
|
152
152
|
nextSchedule = computeRoundTiming(params, afterNow);
|
|
153
153
|
}
|
|
@@ -223,7 +223,7 @@ export const makeScheduler = async (
|
|
|
223
223
|
|
|
224
224
|
const after = TimeMath.addAbsRel(
|
|
225
225
|
liveSchedule.endTime,
|
|
226
|
-
TimeMath.
|
|
226
|
+
TimeMath.coerceRelativeTimeRecord(1n, timerBrand),
|
|
227
227
|
);
|
|
228
228
|
nextSchedule = computeRoundTiming(params, after);
|
|
229
229
|
|
package/src/interest-math.js
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
} from '@agoric/zoe/src/contractSupport/ratio.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
12
|
* @param {Ratio} currentCompoundedInterest as coefficient
|
|
14
13
|
* @param {Ratio} previousCompoundedInterest as coefficient
|
|
15
14
|
* @returns {Ratio} additional compounding since the previous
|
|
@@ -26,7 +25,6 @@ const calculateRelativeCompounding = (
|
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
|
-
*
|
|
30
28
|
* @param {Amount<'nat'>} debtSnapshot
|
|
31
29
|
* @param {Ratio} interestSnapshot as coefficient
|
|
32
30
|
* @param {Ratio} currentCompoundedInterest as coefficient
|
|
@@ -50,7 +48,6 @@ export const calculateCurrentDebt = (
|
|
|
50
48
|
};
|
|
51
49
|
|
|
52
50
|
/**
|
|
53
|
-
*
|
|
54
51
|
* @param {Amount<'nat'>} debt
|
|
55
52
|
* @param {Ratio} interestApplied
|
|
56
53
|
* @returns {Amount<'nat'>}
|
package/src/interest.js
CHANGED
|
@@ -338,7 +338,7 @@ export const prepareRoundsManagerKit = baggage =>
|
|
|
338
338
|
// TODO Better would be to make `roundTimeout` a `RelativeTime`
|
|
339
339
|
// everywhere, and to rename it to a name that does not
|
|
340
340
|
// mistakenly imply that it is an absolute time.
|
|
341
|
-
const roundTimeoutDuration = TimeMath.
|
|
341
|
+
const roundTimeoutDuration = TimeMath.relValue(BigInt(roundTimeout));
|
|
342
342
|
const roundTimedOut =
|
|
343
343
|
TimeMath.absValue(startedAt) > 0n &&
|
|
344
344
|
TimeMath.relValue(roundTimeoutDuration) > 0n &&
|
package/src/proposals/utils.js
CHANGED
|
@@ -91,7 +91,6 @@ const provideWhen = async (store, key, make) => {
|
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
95
94
|
* @param {{ scratch: ERef<import('@agoric/internal/src/scratch.js').ScratchPad> }} homeP
|
|
96
95
|
* @param {object} opts
|
|
97
96
|
* @param {(specifier: string) => Promise<{default: Bundle}>} opts.loadBundle
|
|
@@ -57,7 +57,7 @@ const scheduleLiquidationWakeups = async (
|
|
|
57
57
|
nominalStart,
|
|
58
58
|
priceLockPeriod,
|
|
59
59
|
);
|
|
60
|
-
const afterStart = TimeMath.addAbsRel(startTime,
|
|
60
|
+
const afterStart = TimeMath.addAbsRel(startTime, 1n);
|
|
61
61
|
const a = t => TimeMath.absValue(t);
|
|
62
62
|
trace('scheduling ', a(priceLockWakeTime), a(nominalStart), a(startTime));
|
|
63
63
|
void E(timer).setWakeup(priceLockWakeTime, priceLockWaker);
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
const trace = makeTracer('PVaults', false);
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
22
|
* @param {Amount<'nat'>} debtAmount
|
|
24
23
|
* @param {Amount<'nat'>} collateralAmount
|
|
25
24
|
* @returns {Ratio}
|
|
@@ -35,7 +34,6 @@ const calculateDebtToCollateral = (debtAmount, collateralAmount) => {
|
|
|
35
34
|
};
|
|
36
35
|
|
|
37
36
|
/**
|
|
38
|
-
*
|
|
39
37
|
* @param {Vault} vault
|
|
40
38
|
* @returns {Ratio}
|
|
41
39
|
*/
|
|
@@ -137,6 +137,7 @@ export const prepareVaultDirector = (
|
|
|
137
137
|
wake: timestamp => func(timestamp),
|
|
138
138
|
});
|
|
139
139
|
};
|
|
140
|
+
const managersNode = E(storageNode).makeChildNode('managers');
|
|
140
141
|
|
|
141
142
|
const managerBaggages = provideChildBaggage(baggage, 'Vault Manager baggage');
|
|
142
143
|
|
|
@@ -296,7 +297,7 @@ export const prepareVaultDirector = (
|
|
|
296
297
|
|
|
297
298
|
// counter to be incremented at end of addVaultType
|
|
298
299
|
const managerId = `manager${state.managerCounter}`;
|
|
299
|
-
const managerStorageNode = await E(
|
|
300
|
+
const managerStorageNode = await E(managersNode).makeChildNode(
|
|
300
301
|
managerId,
|
|
301
302
|
);
|
|
302
303
|
|