@juicedollar/jusd 1.0.0 → 1.0.1

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 CHANGED
@@ -247,26 +247,39 @@ npx hardhat ignition verify $DEPLOYMENT --include-unrelated-contracts
247
247
  ### Package Info
248
248
 
249
249
  - **Name**: `@juicedollar/jusd`
250
- - **Version**: `1.0.16` (see `package.json`)
250
+ - **Version**: `1.0.0` (see `package.json`)
251
251
  - **Registry**: https://registry.npmjs.org
252
252
 
253
- ### Build & Publish
253
+ ### First-Time Publish
254
254
 
255
255
  ```bash
256
- # 1. Update version in package.json
257
- # "version": "1.0.17"
256
+ # 1. Login to NPM
257
+ npm login
258
258
 
259
- # 2. Build TypeScript package
260
- yarn run build
259
+ # 2. Publish (build happens automatically via prepublishOnly)
260
+ yarn run publish
261
+ ```
261
262
 
262
- # 3. Login to NPM
263
- npm login
263
+ ### Publishing Updates
264
+
265
+ ```bash
266
+ # 1. Update contracts (if changed)
267
+ # Edit contracts, then export ABIs:
268
+ yarn run ts:export:abis
269
+
270
+ # 2. Update version in package.json (semantic versioning)
271
+ # Patch: 1.0.0 → 1.0.1 (bug fixes)
272
+ # Minor: 1.0.0 → 1.1.0 (new features)
273
+ # Major: 1.0.0 → 2.0.0 (breaking changes)
274
+
275
+ # 3. Commit changes
276
+ git add . && git commit -m "Release v1.0.1: Description"
264
277
 
265
- # 4. Publish package
278
+ # 4. Publish (build happens automatically)
266
279
  yarn run publish
267
280
  ```
268
281
 
269
- **Note:** The publish command may execute twice; the second will fail with a version conflict (expected behavior).
282
+ **Note:** The `prepublishOnly` script automatically runs `yarn run build` before publishing.
270
283
 
271
284
  ### Package Exports
272
285
 
@@ -29,10 +29,10 @@ contract Equity is ERC20Permit, ERC3009, MathUtil, IReserve, ERC165 {
29
29
  *
30
30
  * In the absence of fees, profits and losses, the variables grow as follows when JUICE tokens are minted:
31
31
  *
32
- * | Reserve | Market Cap | Price | Supply |
33
- * | 1_000 | 10_000 | 0.001 | 10_000_000 |
34
- * | 100_000_000 | 1_000_000_000 | 31.62 | 31_622_777 |
35
- * | 10_000_000_000_000 |100_000_000_000_000 | 1_000_000 | 100_000_000 |
32
+ * | Reserve | Market Cap | Price | Supply |
33
+ * | 1_000 | 10_000 | 0.0001 | 100_000_000 |
34
+ * | 100_000_000 | 1_000_000_000 | 3.162 | 316_227_766 |
35
+ * | 10_000_000_000_000 | 100_000_000_000_000 | 100_000 | 1_000_000_000 |
36
36
  *
37
37
  * i.e., the supply is proportional to the tenth root of the reserve and the price is proportional to
38
38
  * the ninth power of the tenth root (or Reserve^0.9). When profits accumulate or losses materialize,
@@ -122,7 +122,7 @@ contract Equity is ERC20Permit, ERC3009, MathUtil, IReserve, ERC165 {
122
122
  function price() public view returns (uint256) {
123
123
  uint256 equity = JUSD.equity();
124
124
  if (equity == 0 || totalSupply() == 0) {
125
- return 10 ** 14;
125
+ return 10 ** 13;
126
126
  } else {
127
127
  return (VALUATION_FACTOR * JUSD.equity() * ONE_DEC18) / totalSupply();
128
128
  }
@@ -358,9 +358,9 @@ contract Equity is ERC20Permit, ERC3009, MathUtil, IReserve, ERC165 {
358
358
  function _calculateShares(uint256 capitalBefore, uint256 investment) internal view returns (uint256) {
359
359
  uint256 totalShares = totalSupply();
360
360
  uint256 investmentExFees = (investment * 980) / 1_000; // remove 2% fee
361
- // Assign 10_000_000 JUICE for the initial deposit, calculate the amount otherwise
361
+ // Assign 100_000_000 JUICE for the initial deposit, calculate the amount otherwise
362
362
  uint256 newTotalShares = (capitalBefore < MINIMUM_EQUITY || totalShares == 0)
363
- ? totalShares + 10_000_000 * ONE_DEC18
363
+ ? totalShares + 100_000_000 * ONE_DEC18
364
364
  : _mulD18(totalShares, _tenthRoot(_divD18(capitalBefore + investmentExFees, capitalBefore)));
365
365
  return newTotalShares - totalShares;
366
366
  }
package/dist/index.js CHANGED
@@ -61,16 +61,13 @@ var ADDRESS = {
61
61
  positionFactoryV2: import_viem.zeroAddress
62
62
  },
63
63
  5115: {
64
- // Citrea Testnet - Deployed 2025-11-07
65
64
  juiceDollar: "0x1Dd3057888944ff1f914626aB4BD47Dc8b6285Fe",
66
65
  equity: "0xD82010E94737A4E4C3fc26314326Ff606E2Dcdf4",
67
66
  frontendGateway: "0xe8757e121593bBD9f784F196026259085461aB17",
68
67
  savingsGateway: "0x13531a4E00B36Fdb5f9f9A7c8C85cBc08Fd8EbDb",
69
- savingsVaultJUSD: import_viem.zeroAddress,
70
- // Not yet deployed
68
+ savingsVaultJUSD: "0x59b670e9fA9D0A427751Af201D676719a970857b",
71
69
  mintingHubGateway: "0xFfcD888Eb52F0FdD894fef580370A2FF48d82279",
72
- coinLendingGateway: import_viem.zeroAddress,
73
- // Not yet deployed
70
+ coinLendingGateway: "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1",
74
71
  bridgeStartUSD: "0xFf862f932eB215A9C4aC8F3d20dd6dAe69DeC6D8",
75
72
  startUSD: "0xf0229A29172E3541F5578dFC02aa024b3Bdb96A1",
76
73
  roller: "0x851FF9f1F5fb7eEf75257aAa0adD2121D6b1Bd49",
package/dist/index.mjs CHANGED
@@ -16,16 +16,13 @@ var ADDRESS = {
16
16
  positionFactoryV2: zeroAddress
17
17
  },
18
18
  5115: {
19
- // Citrea Testnet - Deployed 2025-11-07
20
19
  juiceDollar: "0x1Dd3057888944ff1f914626aB4BD47Dc8b6285Fe",
21
20
  equity: "0xD82010E94737A4E4C3fc26314326Ff606E2Dcdf4",
22
21
  frontendGateway: "0xe8757e121593bBD9f784F196026259085461aB17",
23
22
  savingsGateway: "0x13531a4E00B36Fdb5f9f9A7c8C85cBc08Fd8EbDb",
24
- savingsVaultJUSD: zeroAddress,
25
- // Not yet deployed
23
+ savingsVaultJUSD: "0x59b670e9fA9D0A427751Af201D676719a970857b",
26
24
  mintingHubGateway: "0xFfcD888Eb52F0FdD894fef580370A2FF48d82279",
27
- coinLendingGateway: zeroAddress,
28
- // Not yet deployed
25
+ coinLendingGateway: "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1",
29
26
  bridgeStartUSD: "0xFf862f932eB215A9C4aC8F3d20dd6dAe69DeC6D8",
30
27
  startUSD: "0xf0229A29172E3541F5578dFC02aa024b3Bdb96A1",
31
28
  roller: "0x851FF9f1F5fb7eEf75257aAa0adD2121D6b1Bd49",
@@ -32,14 +32,13 @@ export const ADDRESS: Record<number, ChainAddress> = {
32
32
  positionFactoryV2: zeroAddress,
33
33
  },
34
34
  5115: {
35
- // Citrea Testnet - Deployed 2025-11-07
36
35
  juiceDollar: "0x1Dd3057888944ff1f914626aB4BD47Dc8b6285Fe",
37
36
  equity: "0xD82010E94737A4E4C3fc26314326Ff606E2Dcdf4",
38
37
  frontendGateway: "0xe8757e121593bBD9f784F196026259085461aB17",
39
38
  savingsGateway: "0x13531a4E00B36Fdb5f9f9A7c8C85cBc08Fd8EbDb",
40
- savingsVaultJUSD: zeroAddress, // Not yet deployed
39
+ savingsVaultJUSD: "0x59b670e9fA9D0A427751Af201D676719a970857b",
41
40
  mintingHubGateway: "0xFfcD888Eb52F0FdD894fef580370A2FF48d82279",
42
- coinLendingGateway: zeroAddress, // Not yet deployed
41
+ coinLendingGateway: "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1",
43
42
  bridgeStartUSD: "0xFf862f932eB215A9C4aC8F3d20dd6dAe69DeC6D8",
44
43
  startUSD: "0xf0229A29172E3541F5578dFC02aa024b3Bdb96A1",
45
44
  roller: "0x851FF9f1F5fb7eEf75257aAa0adD2121D6b1Bd49",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicedollar/jusd",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "JuiceDollar (JUSD) - Oracle-free, Bitcoin-collateralized stablecoin on Citrea. Decentralized minting with democratic governance.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",