@mysten/deepbook-v3 2.1.4 → 2.4.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.
Files changed (193) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/PREDICT.md +154 -48
  3. package/README.md +18 -13
  4. package/dist/account.d.mts.map +1 -1
  5. package/dist/account.mjs +3 -1
  6. package/dist/account.mjs.map +1 -1
  7. package/dist/client.d.mts +2 -2
  8. package/dist/contracts/account/account.d.mts +23 -23
  9. package/dist/contracts/account/account.d.mts.map +1 -1
  10. package/dist/contracts/account/account_events.d.mts +20 -20
  11. package/dist/contracts/account/account_registry.d.mts +19 -19
  12. package/dist/contracts/deepbook/account.d.mts +18 -18
  13. package/dist/contracts/deepbook/account.d.mts.map +1 -1
  14. package/dist/contracts/deepbook/balances.d.mts +4 -4
  15. package/dist/contracts/deepbook/balances.d.mts.map +1 -1
  16. package/dist/contracts/deepbook/deep_price.d.mts +3 -3
  17. package/dist/contracts/deepbook/deep_price.d.mts.map +1 -1
  18. package/dist/contracts/deepbook/order.d.mts +12 -12
  19. package/dist/contracts/deepbook_predict/admin.d.mts +27 -0
  20. package/dist/contracts/deepbook_predict/admin.d.mts.map +1 -0
  21. package/dist/contracts/deepbook_predict/admin.mjs +38 -0
  22. package/dist/contracts/deepbook_predict/admin.mjs.map +1 -0
  23. package/dist/contracts/deepbook_predict/builder_code.d.mts +81 -0
  24. package/dist/contracts/deepbook_predict/builder_code.d.mts.map +1 -0
  25. package/dist/contracts/deepbook_predict/builder_code.mjs +103 -0
  26. package/dist/contracts/deepbook_predict/builder_code.mjs.map +1 -0
  27. package/dist/contracts/deepbook_predict/builder_code_events.d.mts +25 -0
  28. package/dist/contracts/deepbook_predict/builder_code_events.d.mts.map +1 -0
  29. package/dist/contracts/deepbook_predict/builder_code_events.mjs +7 -1
  30. package/dist/contracts/deepbook_predict/builder_code_events.mjs.map +1 -1
  31. package/dist/contracts/deepbook_predict/config_events.d.mts +104 -0
  32. package/dist/contracts/deepbook_predict/config_events.d.mts.map +1 -0
  33. package/dist/contracts/deepbook_predict/config_events.mjs +155 -0
  34. package/dist/contracts/deepbook_predict/config_events.mjs.map +1 -0
  35. package/dist/contracts/deepbook_predict/deps/sui/vec_map.mjs +37 -0
  36. package/dist/contracts/deepbook_predict/deps/sui/vec_map.mjs.map +1 -0
  37. package/dist/contracts/deepbook_predict/ewma_config.mjs +28 -0
  38. package/dist/contracts/deepbook_predict/ewma_config.mjs.map +1 -0
  39. package/dist/contracts/deepbook_predict/expiry_cash.mjs +1 -1
  40. package/dist/contracts/deepbook_predict/expiry_cash.mjs.map +1 -1
  41. package/dist/contracts/deepbook_predict/expiry_market.d.mts +859 -0
  42. package/dist/contracts/deepbook_predict/expiry_market.d.mts.map +1 -0
  43. package/dist/contracts/deepbook_predict/expiry_market.mjs +662 -7
  44. package/dist/contracts/deepbook_predict/expiry_market.mjs.map +1 -1
  45. package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts +39 -0
  46. package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts.map +1 -0
  47. package/dist/contracts/deepbook_predict/market_lifecycle_cap.mjs +51 -0
  48. package/dist/contracts/deepbook_predict/market_lifecycle_cap.mjs.map +1 -0
  49. package/dist/contracts/deepbook_predict/market_manager.d.mts +159 -0
  50. package/dist/contracts/deepbook_predict/market_manager.d.mts.map +1 -0
  51. package/dist/contracts/deepbook_predict/market_manager.mjs +88 -2
  52. package/dist/contracts/deepbook_predict/market_manager.mjs.map +1 -1
  53. package/dist/contracts/deepbook_predict/order_events.d.mts +101 -0
  54. package/dist/contracts/deepbook_predict/order_events.d.mts.map +1 -0
  55. package/dist/contracts/deepbook_predict/order_events.mjs +7 -1
  56. package/dist/contracts/deepbook_predict/order_events.mjs.map +1 -1
  57. package/dist/contracts/deepbook_predict/pause_cap.d.mts +39 -0
  58. package/dist/contracts/deepbook_predict/pause_cap.d.mts.map +1 -0
  59. package/dist/contracts/deepbook_predict/pause_cap.mjs +51 -0
  60. package/dist/contracts/deepbook_predict/pause_cap.mjs.map +1 -0
  61. package/dist/contracts/deepbook_predict/plp.d.mts +801 -0
  62. package/dist/contracts/deepbook_predict/plp.d.mts.map +1 -0
  63. package/dist/contracts/deepbook_predict/plp.mjs +511 -32
  64. package/dist/contracts/deepbook_predict/plp.mjs.map +1 -1
  65. package/dist/contracts/deepbook_predict/pool_accounting.mjs +7 -7
  66. package/dist/contracts/deepbook_predict/pool_accounting.mjs.map +1 -1
  67. package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +39 -0
  68. package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts.map +1 -0
  69. package/dist/contracts/deepbook_predict/pool_valuation_cap.mjs +52 -0
  70. package/dist/contracts/deepbook_predict/pool_valuation_cap.mjs.map +1 -0
  71. package/dist/contracts/deepbook_predict/predict_account.d.mts +90 -0
  72. package/dist/contracts/deepbook_predict/predict_account.d.mts.map +1 -0
  73. package/dist/contracts/deepbook_predict/predict_account.mjs +25 -2
  74. package/dist/contracts/deepbook_predict/predict_account.mjs.map +1 -1
  75. package/dist/contracts/deepbook_predict/pricing.d.mts +127 -0
  76. package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -0
  77. package/dist/contracts/deepbook_predict/pricing.mjs +37 -1
  78. package/dist/contracts/deepbook_predict/pricing.mjs.map +1 -1
  79. package/dist/contracts/deepbook_predict/pricing_config.mjs +28 -0
  80. package/dist/contracts/deepbook_predict/pricing_config.mjs.map +1 -0
  81. package/dist/contracts/deepbook_predict/protocol_config.d.mts +665 -0
  82. package/dist/contracts/deepbook_predict/protocol_config.d.mts.map +1 -0
  83. package/dist/contracts/deepbook_predict/protocol_config.mjs +841 -0
  84. package/dist/contracts/deepbook_predict/protocol_config.mjs.map +1 -0
  85. package/dist/contracts/deepbook_predict/range_codec.d.mts +30 -0
  86. package/dist/contracts/deepbook_predict/range_codec.d.mts.map +1 -0
  87. package/dist/contracts/deepbook_predict/range_codec.mjs +6 -1
  88. package/dist/contracts/deepbook_predict/range_codec.mjs.map +1 -1
  89. package/dist/contracts/deepbook_predict/registry.d.mts +382 -0
  90. package/dist/contracts/deepbook_predict/registry.d.mts.map +1 -0
  91. package/dist/contracts/deepbook_predict/registry.mjs +458 -2
  92. package/dist/contracts/deepbook_predict/registry.mjs.map +1 -1
  93. package/dist/contracts/deepbook_predict/strike_exposure.mjs.map +1 -1
  94. package/dist/contracts/deepbook_predict/strike_payout_tree.mjs +13 -1
  95. package/dist/contracts/deepbook_predict/strike_payout_tree.mjs.map +1 -1
  96. package/dist/contracts/deepbook_predict/vault_events.d.mts +199 -0
  97. package/dist/contracts/deepbook_predict/vault_events.d.mts.map +1 -0
  98. package/dist/contracts/deepbook_predict/vault_events.mjs +38 -8
  99. package/dist/contracts/deepbook_predict/vault_events.mjs.map +1 -1
  100. package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
  101. package/dist/contracts/deepbook_sessions/session_config.d.mts.map +1 -1
  102. package/dist/contracts/deepbook_sessions/sessions.d.mts +22 -22
  103. package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
  104. package/dist/deployments/index.d.mts +3 -2
  105. package/dist/deployments/index.d.mts.map +1 -1
  106. package/dist/deployments/index.mjs +4 -1
  107. package/dist/deployments/index.mjs.map +1 -1
  108. package/dist/deployments/mainnet.d.mts +14 -0
  109. package/dist/deployments/mainnet.d.mts.map +1 -0
  110. package/dist/deployments/mainnet.mjs +73 -0
  111. package/dist/deployments/mainnet.mjs.map +1 -0
  112. package/dist/deployments/testnet.mjs +23 -23
  113. package/dist/deployments/testnet.mjs.map +1 -1
  114. package/dist/deployments/types.d.mts +1 -1
  115. package/dist/predict/client.d.mts +28 -6
  116. package/dist/predict/client.d.mts.map +1 -1
  117. package/dist/predict/client.mjs +7 -6
  118. package/dist/predict/client.mjs.map +1 -1
  119. package/dist/predict/config/index.d.mts +2 -0
  120. package/dist/predict/config/index.d.mts.map +1 -1
  121. package/dist/predict/config/index.mjs +4 -1
  122. package/dist/predict/config/index.mjs.map +1 -1
  123. package/dist/predict/config/mainnet.d.mts +17 -0
  124. package/dist/predict/config/mainnet.d.mts.map +1 -0
  125. package/dist/predict/config/mainnet.mjs +26 -0
  126. package/dist/predict/config/mainnet.mjs.map +1 -0
  127. package/dist/predict/config/types.d.mts +6 -0
  128. package/dist/predict/config/types.d.mts.map +1 -1
  129. package/dist/predict/index.d.mts +21 -2
  130. package/dist/predict/index.mjs +20 -1
  131. package/dist/predict/pricing.d.mts +6 -6
  132. package/dist/predict/pricing.d.mts.map +1 -1
  133. package/dist/predict/pricing.mjs +6 -6
  134. package/dist/predict/pricing.mjs.map +1 -1
  135. package/dist/predict/reads/balances.mjs.map +1 -1
  136. package/dist/predict/reads/markets.mjs +1 -1
  137. package/dist/predict/reads/markets.mjs.map +1 -1
  138. package/dist/predict/reads/pricing.d.mts +2 -1
  139. package/dist/predict/reads/pricing.d.mts.map +1 -1
  140. package/dist/predict/reads/pricing.mjs.map +1 -1
  141. package/dist/sessions.d.mts.map +1 -1
  142. package/dist/sessions.mjs +3 -1
  143. package/dist/sessions.mjs.map +1 -1
  144. package/dist/transactions/balanceManager.d.mts +12 -12
  145. package/dist/transactions/balanceManager.d.mts.map +1 -1
  146. package/dist/transactions/deepbook.d.mts +20 -20
  147. package/dist/transactions/deepbook.d.mts.map +1 -1
  148. package/dist/transactions/deepbookAdmin.d.mts +4 -4
  149. package/dist/transactions/deepbookAdmin.d.mts.map +1 -1
  150. package/dist/transactions/marginAdmin.d.mts +7 -7
  151. package/dist/transactions/marginLiquidations.d.mts +3 -3
  152. package/dist/transactions/marginMaintainer.d.mts +5 -5
  153. package/dist/transactions/marginManager.d.mts +32 -32
  154. package/dist/transactions/marginPool.d.mts +18 -18
  155. package/dist/transactions/marginPool.d.mts.map +1 -1
  156. package/dist/transactions/marginRegistry.d.mts +16 -16
  157. package/dist/transactions/marginTPSL.d.mts +10 -10
  158. package/dist/transactions/poolProxy.d.mts +8 -8
  159. package/package.json +3 -3
  160. package/src/account.ts +3 -1
  161. package/src/contracts/deepbook_predict/builder_code.ts +3 -3
  162. package/src/contracts/deepbook_predict/config_events.ts +9 -2
  163. package/src/contracts/deepbook_predict/deps/sui/vec_map.ts +33 -0
  164. package/src/contracts/deepbook_predict/expiry_cash.ts +1 -1
  165. package/src/contracts/deepbook_predict/expiry_market.ts +70 -11
  166. package/src/contracts/deepbook_predict/market_lifecycle_cap.ts +3 -10
  167. package/src/contracts/deepbook_predict/market_manager.ts +2 -2
  168. package/src/contracts/deepbook_predict/order_events.ts +6 -6
  169. package/src/contracts/deepbook_predict/plp.ts +263 -81
  170. package/src/contracts/deepbook_predict/pool_accounting.ts +14 -14
  171. package/src/contracts/deepbook_predict/pool_valuation_cap.ts +69 -0
  172. package/src/contracts/deepbook_predict/predict_account.ts +1 -1
  173. package/src/contracts/deepbook_predict/pricing.ts +16 -4
  174. package/src/contracts/deepbook_predict/protocol_config.ts +202 -7
  175. package/src/contracts/deepbook_predict/registry.ts +91 -17
  176. package/src/contracts/deepbook_predict/strike_exposure.ts +1 -1
  177. package/src/contracts/deepbook_predict/strike_payout_tree.ts +27 -0
  178. package/src/contracts/deepbook_predict/vault_events.ts +45 -14
  179. package/src/contracts/propbook/block_scholes_store.ts +8 -42
  180. package/src/deployments/index.ts +13 -3
  181. package/src/deployments/mainnet.ts +107 -0
  182. package/src/deployments/testnet.ts +25 -25
  183. package/src/deployments/types.ts +1 -1
  184. package/src/predict/client.ts +48 -17
  185. package/src/predict/config/index.ts +7 -2
  186. package/src/predict/config/mainnet.ts +27 -0
  187. package/src/predict/config/types.ts +7 -1
  188. package/src/predict/index.ts +31 -2
  189. package/src/predict/pricing.ts +11 -9
  190. package/src/predict/reads/balances.ts +1 -1
  191. package/src/predict/reads/markets.ts +1 -1
  192. package/src/predict/reads/pricing.ts +2 -1
  193. package/src/sessions.ts +4 -1
@@ -36,14 +36,14 @@ export const OrderMinted = new MoveStruct({
36
36
  /** 1e9-scaled range probability quoted at entry. */
37
37
  entry_probability: U64,
38
38
  quantity: U64,
39
- /** Premium the user paid into LP backing, in DUSDC base units. */
39
+ /** Premium the user paid into LP backing, in USDC base units. */
40
40
  premium: U64,
41
41
  /** Full trading fee assessed for the mint, including any sponsor-paid subsidy. */
42
42
  trading_fee: U64,
43
43
  /** Portion of `trading_fee` paid from expiry-local fee incentives. */
44
44
  fee_incentive_subsidy: U64,
45
45
  builder_fee: U64,
46
- /** EWMA gas-price congestion surcharge assessed for the mint, in DUSDC base units. */
46
+ /** EWMA gas-price congestion surcharge assessed for the mint, in USDC base units. */
47
47
  penalty_fee: U64,
48
48
  /**
49
49
  * Portion of the trader-paid trading fee and congestion surcharge delivered to the
@@ -62,8 +62,8 @@ export const OrderMinted = new MoveStruct({
62
62
  onchain_timestamp_ms: U64,
63
63
  /**
64
64
  * Oracle source timestamps present when this mint was priced: Pyth's canonical
65
- * source time and the Block Scholes batch-envelope times used for freshness. The
66
- * SVI one is also the roll-down anchor. Pyth is `0` only when unusable.
65
+ * source time and the Block Scholes per-update source times used for freshness.
66
+ * The SVI one is also the roll-down anchor. Pyth is `0` only when unusable.
67
67
  */
68
68
  pyth_spot_source_timestamp_ms: U64,
69
69
  block_scholes_spot_source_timestamp_ms: U64,
@@ -92,7 +92,7 @@ export const LiveOrderRedeemed = new MoveStruct({
92
92
  redeem_amount: U64,
93
93
  trading_fee: U64,
94
94
  builder_fee: U64,
95
- /** EWMA gas-price congestion surcharge retained by the pool, in DUSDC base units. */
95
+ /** EWMA gas-price congestion surcharge retained by the pool, in USDC base units. */
96
96
  penalty_fee: U64,
97
97
  /** Separate inventory-impact rebate paid from its isolated escrow. */
98
98
  inventory_impact_rebate: U64,
@@ -104,7 +104,7 @@ export const LiveOrderRedeemed = new MoveStruct({
104
104
  onchain_timestamp_ms: U64,
105
105
  /**
106
106
  * Oracle source timestamps present when this redemption was priced: Pyth's
107
- * canonical source time and the Block Scholes batch-envelope times used for
107
+ * canonical source time and the Block Scholes per-update source times used for
108
108
  * freshness. The SVI one is also the roll-down anchor. Pyth is `0` only when
109
109
  * unusable.
110
110
  */
@@ -5,15 +5,16 @@
5
5
  /**
6
6
  * PLP token and pool vault.
7
7
  *
8
- * PoolVault owns the PLP treasury cap, idle DUSDC, the protocol reserve,
8
+ * PoolVault owns the PLP treasury cap, idle USDC, the protocol reserve,
9
9
  * sponsor-funded fee incentives, per-expiry cash accounting, and the queued LP
10
- * supply/withdraw requests. It coordinates the full-pool NAV valuation (a
11
- * hot-potato aggregation over every active market) and the unified per-market cash
10
+ * supply/withdraw requests. It coordinates the full-pool NAV valuation — an atomic
11
+ * oracle snapshot followed by resumable per-market valuation transactions, with
12
+ * trading live throughout (see `PoolValuation`) — and the unified per-market cash
12
13
  * flow (initial funding, live rebalance/sweep, and settled-market sweep with
13
14
  * terminal profit materialization). LPs queue supply/withdraw requests routed
14
- * through a loaded Account; each flush (`finish_flush`) drains them at the frozen
15
- * pool NAV, minting/burning PLP and delivering fills to each account via the
16
- * balance accumulator.
15
+ * through a loaded Account; each flush (`finish_flush`) drains the requests that
16
+ * predate its snapshot at the frozen pool NAV, minting/burning PLP and delivering
17
+ * fills to each account via the balance accumulator.
17
18
  */
18
19
 
19
20
  import {
@@ -25,6 +26,8 @@ import {
25
26
  import { bcs } from '@mysten/sui/bcs';
26
27
  import { U64 } from '../../bcs/integers.js';
27
28
  import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
29
+ import * as vec_map from './deps/sui/vec_map.js';
30
+ import * as pricing from './pricing.js';
28
31
  import * as balance from './deps/sui/balance.js';
29
32
  import * as lp_book from './lp_book.js';
30
33
  import * as pool_accounting from './pool_accounting.js';
@@ -35,33 +38,93 @@ export const PLP = new MoveStruct({
35
38
  dummy_field: bcs.bool(),
36
39
  },
37
40
  });
41
+ export const PoolValuationProof = new MoveStruct({
42
+ name: `${$moduleName}::PoolValuationProof`,
43
+ fields: {
44
+ dummy_field: bcs.bool(),
45
+ },
46
+ });
47
+ export const SnapshotStage = new MoveStruct({
48
+ name: `${$moduleName}::SnapshotStage`,
49
+ fields: {
50
+ dummy_field: bcs.bool(),
51
+ },
52
+ });
53
+ export const PoolValuation = new MoveStruct({
54
+ name: `${$moduleName}::PoolValuation`,
55
+ fields: {
56
+ /** Active expiry markets snapshotted at start; every one must be valued. */
57
+ expected_expiry_markets: bcs.vector(bcs.Address),
58
+ /** Markets valued so far this flush; folded against `expected` at finish. */
59
+ valued_expiry_markets: bcs.vector(bcs.Address),
60
+ /** Running Σ of each valued market's snapshot NAV (settled markets contribute 0). */
61
+ total_nav: U64,
62
+ /**
63
+ * Oracle state frozen during the snapshot stage, one entry per expected market.
64
+ * Keyed by market id so a `Pricer` can never be applied to the wrong market.
65
+ * `none` marks a market that was already settled at snapshot time and therefore
66
+ * contributes 0. This map is what makes the valuation stage deterministic: it
67
+ * decides both the mark AND the sweep-vs-value branch, so no later transaction's
68
+ * clock or oracle state can change a market's contribution.
69
+ */
70
+ frozen_pricers: vec_map.VecMap(bcs.Address, bcs.option(pricing.FrozenPricer)),
71
+ /**
72
+ * Set by `seal_valuation_snapshot`; no market may be valued before it. Nothing may
73
+ * be snapshotted after it because sealing consumes the `SnapshotStage`.
74
+ */
75
+ sealed: bcs.bool(),
76
+ /** Clock time the flush was started, for the stuck-flush deadline. */
77
+ started_at_ms: U64,
78
+ /**
79
+ * Drain budgets committed at start (the cap owner's choice), bounding how many
80
+ * requests each queue processes at finish. Committing them here — not at finish —
81
+ * is what lets `finish_flush` run permissionless: a stranger may complete a flush
82
+ * but only ever drains at these budgets, so completion can help LPs, never starve
83
+ * them by finishing with a zero budget.
84
+ */
85
+ supply_budget: bcs.option(U64),
86
+ withdraw_budget: bcs.option(U64),
87
+ /**
88
+ * Each LP queue's `next_index` at the snapshot instant: the drain fills only
89
+ * requests indexed strictly below these, so nobody can watch the frozen mark form
90
+ * and then submit against a price they already know is stale.
91
+ */
92
+ supply_request_cutoff: U64,
93
+ withdraw_request_cutoff: U64,
94
+ /**
95
+ * Vault-side figures captured by `seal_valuation_snapshot`. With every market's
96
+ * cash frozen in its stamp and these frozen here, the mark is a pure function of
97
+ * the snapshot instant: no in-window cash move — maintenance, settled sweep,
98
+ * market funding, reserve realization — can reach it. Settled members are swept
99
+ * during the snapshot stage, so their recoverable cash sits inside
100
+ * `frozen_idle_balance`.
101
+ */
102
+ frozen_idle_balance: U64,
103
+ frozen_profit_basis_credits: U64,
104
+ frozen_profit_basis_debits: U64,
105
+ frozen_pending_protocol_profit: U64,
106
+ },
107
+ });
38
108
  export const PoolVault = new MoveStruct({
39
109
  name: `${$moduleName}::PoolVault`,
40
110
  fields: {
41
111
  id: bcs.Address,
42
112
  /**
43
- * Protocol-owned DUSDC excluded from PLP redemption. No package entrypoint
113
+ * Protocol-owned USDC excluded from PLP redemption. No package entrypoint
44
114
  * withdraws this balance.
45
115
  */
46
116
  protocol_reserve_balance: balance.Balance,
47
- /** Sponsor-funded DUSDC reserved for taker fee sponsorship, excluded from PLP NAV. */
117
+ /** Sponsor-funded USDC reserved for taker fee sponsorship, excluded from PLP NAV. */
48
118
  fee_incentive_reserve: balance.Balance,
49
119
  /** PLP share issuance plus queued supply/withdraw escrow. */
50
120
  lp: lp_book.LpBook,
51
- /** Idle DUSDC custody, registered expiries, and per-expiry cash-flow rows. */
121
+ /** Idle USDC custody, registered expiries, and per-expiry cash-flow rows. */
52
122
  expiry_accounting: pool_accounting.Ledger,
53
- },
54
- });
55
- export const PoolValuation = new MoveStruct({
56
- name: `${$moduleName}::PoolValuation`,
57
- fields: {
58
- pool_vault_id: bcs.Address,
59
- /** Active expiry markets snapshotted at start; every one must be valued. */
60
- expected_expiry_markets: bcs.vector(bcs.Address),
61
- /** Markets valued so far this flow; folded against `expected` at finish. */
62
- valued_expiry_markets: bcs.vector(bcs.Address),
63
- /** Running Σ of each valued market's NAV (settled markets contribute 0). */
64
- total_nav: U64,
123
+ /**
124
+ * In-flight full-pool valuation, held across transactions. `Some` exactly while
125
+ * the `ProtocolConfig` valuation flag is engaged.
126
+ */
127
+ valuation: bcs.option(PoolValuation),
65
128
  },
66
129
  });
67
130
  export interface IdArguments {
@@ -107,7 +170,7 @@ export interface IdleBalanceOptions {
107
170
  predictPackageId?: string;
108
171
  };
109
172
  }
110
- /** Return idle DUSDC for SDK and devInspect state reads. */
173
+ /** Return idle USDC for SDK and devInspect state reads. */
111
174
  export function idleBalance(options: IdleBalanceOptions) {
112
175
  const packageAddress =
113
176
  options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
@@ -139,7 +202,7 @@ export interface ProtocolReserveBalanceOptions {
139
202
  predictPackageId?: string;
140
203
  };
141
204
  }
142
- /** Return protocol-owned DUSDC for SDK and devInspect state reads. */
205
+ /** Return protocol-owned USDC for SDK and devInspect state reads. */
143
206
  export function protocolReserveBalance(options: ProtocolReserveBalanceOptions) {
144
207
  const packageAddress =
145
208
  options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
@@ -451,7 +514,9 @@ export function pendingProtocolProfit(options: PendingProtocolProfitOptions) {
451
514
  export interface StartPoolValuationArguments {
452
515
  config?: RawTransactionArgument<string>;
453
516
  vault?: RawTransactionArgument<string>;
454
- lifecycleProof: TransactionArgument;
517
+ valuationProof: TransactionArgument;
518
+ supplyBudget: RawTransactionArgument<number | bigint | null>;
519
+ withdrawBudget: RawTransactionArgument<number | bigint | null>;
455
520
  }
456
521
  export interface StartPoolValuationOptions {
457
522
  package?: string;
@@ -463,16 +528,25 @@ export interface StartPoolValuationOptions {
463
528
  };
464
529
  }
465
530
  /**
466
- * Begin a full-pool valuation using a registry-issued lifecycle proof. The proof
467
- * grants control over when current oracle state is frozen for queued LP fills.
468
- * Starting engages the transaction-local valuation lock and snapshots every active
469
- * expiry that must be included before the queues can drain.
531
+ * Begin a full-pool valuation using a registry-issued pool-valuation proof. The
532
+ * proof grants control over when current oracle state is frozen for queued LP
533
+ * fills. Starting engages the cross-transaction valuation flag, snapshots the
534
+ * active expiry set and each LP queue's eligibility cutoff, and opens the atomic
535
+ * snapshot stage: freeze every active market's pricer under the returned
536
+ * `SnapshotStage`, then seal it in the same transaction.
470
537
  */
471
538
  export function startPoolValuation(options: StartPoolValuationOptions) {
472
539
  const packageAddress =
473
540
  options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
474
- const argumentsTypes = [null, null, null] satisfies (string | null)[];
475
- const parameterNames = ['config', 'vault', 'lifecycleProof'];
541
+ const argumentsTypes = [
542
+ null,
543
+ null,
544
+ null,
545
+ '0x1::option::Option<u64>',
546
+ '0x1::option::Option<u64>',
547
+ '0x2::clock::Clock',
548
+ ] satisfies (string | null)[];
549
+ const parameterNames = ['config', 'vault', 'valuationProof', 'supplyBudget', 'withdrawBudget'];
476
550
  return (tx: Transaction) =>
477
551
  tx.moveCall({
478
552
  package: packageAddress,
@@ -489,9 +563,9 @@ export function startPoolValuation(options: StartPoolValuationOptions) {
489
563
  ),
490
564
  });
491
565
  }
492
- export interface ValueExpiryArguments {
493
- valuation: TransactionArgument;
566
+ export interface SnapshotExpiryPricerArguments {
494
567
  vault?: RawTransactionArgument<string>;
568
+ Stage: TransactionArgument;
495
569
  market: RawTransactionArgument<string>;
496
570
  config?: RawTransactionArgument<string>;
497
571
  propbookRegistry?: RawTransactionArgument<string>;
@@ -499,9 +573,9 @@ export interface ValueExpiryArguments {
499
573
  bsValues: RawTransactionArgument<string>;
500
574
  bsSvi: RawTransactionArgument<string>;
501
575
  }
502
- export interface ValueExpiryOptions {
576
+ export interface SnapshotExpiryPricerOptions {
503
577
  package?: string;
504
- arguments: ValueExpiryArguments;
578
+ arguments: SnapshotExpiryPricerArguments;
505
579
  config?: {
506
580
  poolVault: ConfigValue;
507
581
  protocolConfig: ConfigValue;
@@ -510,16 +584,28 @@ export interface ValueExpiryOptions {
510
584
  };
511
585
  }
512
586
  /**
513
- * Run the per-market cash flow for one snapshotted market, then fold its NAV into
514
- * the running total. The market must be in the snapshot and not already valued. A
515
- * settled market is swept (deactivated, cash returned, profit materialized) and
516
- * contributes 0; a live market is rebalanced to target and valued on its current
517
- * cash.
587
+ * Freeze one snapshotted market's oracle state for this flush and stamp the
588
+ * market, capturing its cash rows and activating its payout-tree snapshot at this
589
+ * instant.
590
+ *
591
+ * Holding `SnapshotStage` is what admits this call, and that potato cannot leave
592
+ * the transaction `start_pool_valuation` minted it in — so every `Pricer` here is
593
+ * loaded at one instant, which is what lets the valuation stage span transactions
594
+ * without mixing marks (audit L10). This stage reads oracles only — it never walks
595
+ * a payout tree — so all markets fit one PTB regardless of book size.
596
+ *
597
+ * The oracle feeding this stage must have been written in an EARLIER transaction:
598
+ * `pricing::resolve_live_pricer` refuses a read stamped with the current
599
+ * transaction digest (RP-24), so a keeper cannot refresh and snapshot in one PTB.
518
600
  *
519
- * Settlement is a separate PTB step through `expiry_market::try_settle`. An
520
- * expired unsettled market cannot produce the live pricer required here.
601
+ * A market already settled at snapshot time is recorded with no pricer, gets no
602
+ * stamp (settled flows never touch live NAV), and contributes 0. An
603
+ * expired-but-unsettled market aborts: it has no well-defined mark, and because
604
+ * this stage is atomic the abort reverts the whole snapshot transaction, so the
605
+ * flag is never left engaged. Settle it first, then start the flush; settlement is
606
+ * never blocked by a flush, so that ordering is always available.
521
607
  */
522
- export function valueExpiry(options: ValueExpiryOptions) {
608
+ export function snapshotExpiryPricer(options: SnapshotExpiryPricerOptions) {
523
609
  const packageAddress =
524
610
  options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
525
611
  const argumentsTypes = [
@@ -534,8 +620,8 @@ export function valueExpiry(options: ValueExpiryOptions) {
534
620
  '0x2::clock::Clock',
535
621
  ] satisfies (string | null)[];
536
622
  const parameterNames = [
537
- 'valuation',
538
623
  'vault',
624
+ 'Stage',
539
625
  'market',
540
626
  'config',
541
627
  'propbookRegistry',
@@ -547,7 +633,7 @@ export function valueExpiry(options: ValueExpiryOptions) {
547
633
  tx.moveCall({
548
634
  package: packageAddress,
549
635
  module: 'plp',
550
- function: 'value_expiry',
636
+ function: 'snapshot_expiry_pricer',
551
637
  arguments: normalizeMoveArguments(
552
638
  {
553
639
  ...options.arguments,
@@ -560,16 +646,111 @@ export function valueExpiry(options: ValueExpiryOptions) {
560
646
  ),
561
647
  });
562
648
  }
649
+ export interface SealValuationSnapshotArguments {
650
+ vault?: RawTransactionArgument<string>;
651
+ stage: TransactionArgument;
652
+ config?: RawTransactionArgument<string>;
653
+ }
654
+ export interface SealValuationSnapshotOptions {
655
+ package?: string;
656
+ arguments: SealValuationSnapshotArguments;
657
+ config?: {
658
+ poolVault: ConfigValue;
659
+ protocolConfig: ConfigValue;
660
+ predictPackageId?: string;
661
+ };
662
+ }
663
+ /**
664
+ * Close the snapshot stage once every expected market has a frozen pricer, and
665
+ * freeze the vault-side figures — idle, the profit basis, the pending protocol cut
666
+ * — completing the snapshot.
667
+ *
668
+ * Consuming `SnapshotStage` is the simultaneity proof: the potato dies here, so no
669
+ * later transaction can add oracle state to this flush, and every market is marked
670
+ * at the instant the snapshot transaction executed. The vault capture is
671
+ * consistent with the per-market stamps because `rebalance_expiry_cash` refuses to
672
+ * run while the stage is open (`ESnapshotStageOpen`), so no idle↔market move can
673
+ * land between a stamp and this capture. Valuation may then resume across as many
674
+ * transactions as it needs.
675
+ */
676
+ export function sealValuationSnapshot(options: SealValuationSnapshotOptions) {
677
+ const packageAddress =
678
+ options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
679
+ const argumentsTypes = [null, null, null] satisfies (string | null)[];
680
+ const parameterNames = ['vault', 'stage', 'config'];
681
+ return (tx: Transaction) =>
682
+ tx.moveCall({
683
+ package: packageAddress,
684
+ module: 'plp',
685
+ function: 'seal_valuation_snapshot',
686
+ arguments: normalizeMoveArguments(
687
+ {
688
+ ...options.arguments,
689
+ vault: options.arguments?.vault ?? options.config?.poolVault,
690
+ config: options.arguments?.config ?? options.config?.protocolConfig,
691
+ },
692
+ argumentsTypes,
693
+ parameterNames,
694
+ ),
695
+ });
696
+ }
697
+ export interface ValueExpiryArguments {
698
+ vault?: RawTransactionArgument<string>;
699
+ market: RawTransactionArgument<string>;
700
+ config?: RawTransactionArgument<string>;
701
+ }
702
+ export interface ValueExpiryOptions {
703
+ package?: string;
704
+ arguments: ValueExpiryArguments;
705
+ config?: {
706
+ poolVault: ConfigValue;
707
+ protocolConfig: ConfigValue;
708
+ predictPackageId?: string;
709
+ };
710
+ }
711
+ /**
712
+ * Fold one snapshotted market's SNAPSHOT-INSTANT NAV into the running total. A
713
+ * market frozen as settled is swept and contributes 0; one frozen with a pricer is
714
+ * valued via `expiry_market::snapshot_nav` over its captured cash and tree
715
+ * shadows, then has its stamp cleared (releasing the tree snapshot), so later
716
+ * trades and the next flush start clean.
717
+ *
718
+ * The resumable stage: any transaction after the seal, one market per transaction
719
+ * (`constants::max_payout_tree_nodes`), reading no oracle and no clock.
720
+ * MEASUREMENT-ONLY for every member — settled members were swept during the
721
+ * snapshot stage and every frozen figure was captured there, so this call moves no
722
+ * cash and `rebalance_expiry_cash` runs at any time. A market that expired
723
+ * mid-window is valued at its frozen pre-expiry mark; its settlement does not wait
724
+ * for this call, because settlement is never blocked by a flush.
725
+ */
726
+ export function valueExpiry(options: ValueExpiryOptions) {
727
+ const packageAddress =
728
+ options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
729
+ const argumentsTypes = [null, null, null] satisfies (string | null)[];
730
+ const parameterNames = ['vault', 'market', 'config'];
731
+ return (tx: Transaction) =>
732
+ tx.moveCall({
733
+ package: packageAddress,
734
+ module: 'plp',
735
+ function: 'value_expiry',
736
+ arguments: normalizeMoveArguments(
737
+ {
738
+ ...options.arguments,
739
+ vault: options.arguments?.vault ?? options.config?.poolVault,
740
+ config: options.arguments?.config ?? options.config?.protocolConfig,
741
+ },
742
+ argumentsTypes,
743
+ parameterNames,
744
+ ),
745
+ });
746
+ }
563
747
  export interface FinishFlushArguments {
564
- valuation: TransactionArgument;
565
748
  vault?: RawTransactionArgument<string>;
566
749
  config?: RawTransactionArgument<string>;
567
- supplyBudget: RawTransactionArgument<number | bigint | null>;
568
- withdrawBudget: RawTransactionArgument<number | bigint | null>;
569
750
  }
570
751
  export interface FinishFlushOptions {
571
752
  package?: string;
572
- arguments: FinishFlushArguments;
753
+ arguments?: FinishFlushArguments;
573
754
  config?: {
574
755
  poolVault: ConfigValue;
575
756
  protocolConfig: ConfigValue;
@@ -580,9 +761,12 @@ export interface FinishFlushOptions {
580
761
  * Finish a full-pool valuation and run the LP flush: prove every snapshotted
581
762
  * market was valued exactly once, price the pool NAV, then drain the
582
763
  * supply/withdraw queues at that frozen mark (mint PLP for supplies, burn PLP and
583
- * pay DUSDC for withdrawals), release the valuation lock, consume the potato, and
584
- * return the LP-attributable pool-wide DUSDC NAV (idle + Σ active NAV, net of the
585
- * pending-protocol-profit exclusion priced from the aggregate profit basis).
764
+ * pay USDC for withdrawals), release the valuation flag, retire the in-flight
765
+ * valuation, and return the LP-attributable pool-wide USDC NAV (frozen idle + Σ
766
+ * active NAV, net of the pending-protocol-profit exclusion priced from the frozen
767
+ * profit basis — every term as of the snapshot instant). Each drain fills only
768
+ * requests submitted before the flush's snapshot instant (the recorded queue
769
+ * cutoffs); younger requests wait for the next mark.
586
770
  *
587
771
  * `supply_budget` and `withdraw_budget` bound how many requests each queue may
588
772
  * process this flush (`None` = unbounded). Fills — whole or partial — and
@@ -606,14 +790,8 @@ export interface FinishFlushOptions {
606
790
  export function finishFlush(options: FinishFlushOptions) {
607
791
  const packageAddress =
608
792
  options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
609
- const argumentsTypes = [
610
- null,
611
- null,
612
- null,
613
- '0x1::option::Option<u64>',
614
- '0x1::option::Option<u64>',
615
- ] satisfies (string | null)[];
616
- const parameterNames = ['valuation', 'vault', 'config', 'supplyBudget', 'withdrawBudget'];
793
+ const argumentsTypes = [null, null, '0x2::clock::Clock'] satisfies (string | null)[];
794
+ const parameterNames = ['vault', 'config'];
617
795
  return (tx: Transaction) =>
618
796
  tx.moveCall({
619
797
  package: packageAddress,
@@ -655,8 +833,12 @@ export interface RebalanceExpiryCashOptions {
655
833
  * due. An expired unsettled market is a no-op until that transition succeeds. Mint
656
834
  * asserts backing but never pulls pool cash, so this is what makes a market
657
835
  * mintable. The market must already be registered to this vault
658
- * (`registry::create_and_share_expiry_market`). Blocked while a full-pool
659
- * valuation is in progress.
836
+ * (`registry::create_and_share_expiry_market`). Runs at any time, including while
837
+ * a flush is in flight — every figure the mark reads was frozen at the snapshot
838
+ * instant, so no move here can reach it. The one refusal is the still-open
839
+ * snapshot stage (start → seal, a single transaction): a cross-move landing
840
+ * between a market's stamp and the seal's vault capture would skew the frozen
841
+ * figures, so it is structurally rejected rather than corrected for.
660
842
  */
661
843
  export function rebalanceExpiryCash(options: RebalanceExpiryCashOptions) {
662
844
  const packageAddress =
@@ -694,9 +876,9 @@ export interface SponsorFeeIncentivesOptions {
694
876
  };
695
877
  }
696
878
  /**
697
- * Sponsor taker fee incentives with DUSDC. Anyone may contribute; the payment
698
- * joins a pool-level reserve that is excluded from PLP NAV and later allocated to
699
- * expiry markets by the normal rebalance flow.
879
+ * Sponsor taker fee incentives with USDC. Anyone may contribute; the payment joins
880
+ * a pool-level reserve that is excluded from PLP NAV and later allocated to expiry
881
+ * markets by the normal rebalance flow.
700
882
  */
701
883
  export function sponsorFeeIncentives(options: SponsorFeeIncentivesOptions) {
702
884
  const packageAddress =
@@ -735,9 +917,9 @@ export interface LockCapitalOptions {
735
917
  };
736
918
  }
737
919
  /**
738
- * Bootstrap the pool exactly once: permanently lock `payment` DUSDC of minimum
920
+ * Bootstrap the pool exactly once: permanently lock `payment` USDC of minimum
739
921
  * liquidity. Mints matching PLP (1:1) into the book's locked balance — never
740
- * withdrawable, so the caller receives no shares — and joins the DUSDC into idle.
922
+ * withdrawable, so the caller receives no shares — and joins the USDC into idle.
741
923
  * This keeps `total_supply > 0` while the vault exists and gives rounding dust a
742
924
  * non-withdrawable PLP holder. Requires root authority and zero existing supply.
743
925
  * Supply, withdrawal, and flush flows remain disabled until the locked liquidity
@@ -782,10 +964,10 @@ export interface RequestSupplyOptions {
782
964
  };
783
965
  }
784
966
  /**
785
- * Queue a supply request: pull `amount` DUSDC from account custody into queue
967
+ * Queue a supply request: pull `amount` USDC from account custody into queue
786
968
  * escrow, recording the account's receive address as the fill recipient. The pull
787
- * auto-settles any flush-delivered DUSDC first. The flush charges the protocol's
788
- * supply fee — zero by default — on the DUSDC it takes in and prices shares on the
969
+ * auto-settles any flush-delivered USDC first. The flush charges the protocol's
970
+ * supply fee — zero by default — on the USDC it takes in and prices shares on the
789
971
  * remainder, so `min_plp_out` is measured after that fee. The account receives
790
972
  * minted PLP only at a mark that mints at least `min_plp_out` for the whole
791
973
  * `amount` — a **price floor**, not a promise of that many shares: if the pool cap
@@ -832,7 +1014,7 @@ export interface RequestWithdrawArguments {
832
1014
  auth: TransactionArgument;
833
1015
  config?: RawTransactionArgument<string>;
834
1016
  amount: RawTransactionArgument<number | bigint>;
835
- minDusdcOut: RawTransactionArgument<number | bigint>;
1017
+ minUsdcOut: RawTransactionArgument<number | bigint>;
836
1018
  }
837
1019
  export interface RequestWithdrawOptions {
838
1020
  package?: string;
@@ -847,15 +1029,15 @@ export interface RequestWithdrawOptions {
847
1029
  * Queue a withdraw request: pull `amount` PLP shares from account custody into
848
1030
  * queue escrow, recording the account's receive address as the fill recipient. The
849
1031
  * pull auto-settles any flush-delivered PLP first. The flush withholds the
850
- * protocol's withdraw fee from the marked payout, so `min_dusdc_out` is measured
1032
+ * protocol's withdraw fee from the marked payout, so `min_usdc_out` is measured
851
1033
  * after the fee. The account is paid only at a mark that quotes at least
852
- * `min_dusdc_out` for the whole `amount` — a **price floor**, not a promise of
853
- * that much DUSDC: if idle liquidity covers only part of the payout, only the
854
- * shares idle affords are burned, the fill is proportionally smaller at the same
855
- * price, and the remainder stays queued with its limit rescaled. At the shipped
856
- * attempt count of one, a flush whose mark quotes less cancels and refunds the
857
- * request there and then; a higher configured count lets it rest and retry that
858
- * many flushes first. Returns the queue index used to cancel before the flush.
1034
+ * `min_usdc_out` for the whole `amount` — a **price floor**, not a promise of that
1035
+ * much USDC: if idle liquidity covers only part of the payout, only the shares
1036
+ * idle affords are burned, the fill is proportionally smaller at the same price,
1037
+ * and the remainder stays queued with its limit rescaled. At the shipped attempt
1038
+ * count of one, a flush whose mark quotes less cancels and refunds the request
1039
+ * there and then; a higher configured count lets it rest and retry that many
1040
+ * flushes first. Returns the queue index used to cancel before the flush.
859
1041
  */
860
1042
  export function requestWithdraw(options: RequestWithdrawOptions) {
861
1043
  const packageAddress =
@@ -870,7 +1052,7 @@ export function requestWithdraw(options: RequestWithdrawOptions) {
870
1052
  '0x2::accumulator::AccumulatorRoot',
871
1053
  '0x2::clock::Clock',
872
1054
  ] satisfies (string | null)[];
873
- const parameterNames = ['vault', 'wrapper', 'auth', 'config', 'amount', 'minDusdcOut'];
1055
+ const parameterNames = ['vault', 'wrapper', 'auth', 'config', 'amount', 'minUsdcOut'];
874
1056
  return (tx: Transaction) =>
875
1057
  tx.moveCall({
876
1058
  package: packageAddress,
@@ -904,8 +1086,8 @@ export interface CancelSupplyRequestOptions {
904
1086
  };
905
1087
  }
906
1088
  /**
907
- * Cancel a still-pending supply request, refunding its escrowed DUSDC straight
908
- * into the requesting account. `account` must be the request's recorded recipient.
1089
+ * Cancel a still-pending supply request, refunding its escrowed USDC straight into
1090
+ * the requesting account. `account` must be the request's recorded recipient.
909
1091
  */
910
1092
  export function cancelSupplyRequest(options: CancelSupplyRequestOptions) {
911
1093
  const packageAddress =
@@ -5,13 +5,13 @@
5
5
  /**
6
6
  * Pool-owned expiry registration and cash-flow accounting.
7
7
  *
8
- * This module owns pool idle DUSDC custody, the durable set of expiries registered
9
- * to a pool, the active expiry index used for valuation, DUSDC sent from the main
10
- * pool into each expiry, DUSDC received back from each expiry, snapshotted
11
- * lifetime fee-incentive caps and allocations, terminal cash watermarks, and
12
- * per-expiry cap checks. It does not classify expiry-local liabilities or apply
13
- * PLP reserve policy; PoolVault uses the aggregate profit basis to price PLP and
14
- * decide protocol reserve transfers.
8
+ * This module owns pool idle USDC custody, the durable set of expiries registered
9
+ * to a pool, the active expiry index used for valuation, USDC sent from the main
10
+ * pool into each expiry, USDC received back from each expiry, snapshotted lifetime
11
+ * fee-incentive caps and allocations, terminal cash watermarks, and per-expiry cap
12
+ * checks. It does not classify expiry-local liabilities or apply PLP reserve
13
+ * policy; PoolVault uses the aggregate profit basis to price PLP and decide
14
+ * protocol reserve transfers.
15
15
  */
16
16
 
17
17
  import { MoveStruct } from '../utils/index.js';
@@ -30,7 +30,7 @@ export const ActiveExpiry = new MoveStruct({
30
30
  export const Ledger = new MoveStruct({
31
31
  name: `${$moduleName}::Ledger`,
32
32
  fields: {
33
- /** Idle LP-owned DUSDC available for withdrawals and expiry funding. */
33
+ /** Idle LP-owned USDC available for withdrawals and expiry funding. */
34
34
  idle_balance: balance.Balance,
35
35
  /** Expiry markets that still contribute active pool valuation/risk. */
36
36
  active_expiry_markets: bcs.vector(ActiveExpiry),
@@ -39,9 +39,9 @@ export const Ledger = new MoveStruct({
39
39
  * pool.
40
40
  */
41
41
  registered_expiries: table.Table,
42
- /** Pricing debit basis: DUSDC sent to expiries plus materialized terminal profit. */
42
+ /** Pricing debit basis: USDC sent to expiries plus materialized terminal profit. */
43
43
  profit_basis_debits: U64,
44
- /** Pricing credit basis: all DUSDC received back from expiries. */
44
+ /** Pricing credit basis: all USDC received back from expiries. */
45
45
  profit_basis_credits: U64,
46
46
  /**
47
47
  * Aggregate terminal losses that later terminal profits must recover first; losses
@@ -59,13 +59,13 @@ export const Ledger = new MoveStruct({
59
59
  export const RegisteredExpiry = new MoveStruct({
60
60
  name: `${$moduleName}::RegisteredExpiry`,
61
61
  fields: {
62
- /** DUSDC pool allocation cap snapshotted when this expiry was created. */
62
+ /** USDC pool allocation cap snapshotted when this expiry was created. */
63
63
  max_expiry_allocation: U64,
64
- /** Minimum DUSDC cash target snapshotted when this expiry was created. */
64
+ /** Minimum USDC cash target snapshotted when this expiry was created. */
65
65
  initial_expiry_cash: U64,
66
- /** DUSDC sent from the main pool into this expiry. */
66
+ /** USDC sent from the main pool into this expiry. */
67
67
  sent_to_expiry: U64,
68
- /** DUSDC returned from this expiry to the main pool. */
68
+ /** USDC returned from this expiry to the main pool. */
69
69
  received_from_expiry: U64,
70
70
  /** Absolute lifetime fee-incentive cap snapshotted when this expiry was registered. */
71
71
  fee_incentive_lifetime_cap: U64,