@omnipair/dusk-sdk 2.24.1-next.20261114 → 3.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 +166 -108
- package/dist/constants.d.ts +10 -14
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +18 -28
- package/dist/constants.js.map +1 -1
- package/dist/delegate.d.ts +3 -1
- package/dist/delegate.d.ts.map +1 -1
- package/dist/delegate.js +8 -5
- package/dist/delegate.js.map +1 -1
- package/dist/dusk.d.ts.map +1 -1
- package/dist/dusk.js +1 -1
- package/dist/dusk.js.map +1 -1
- package/dist/get.d.ts +130 -373
- package/dist/get.d.ts.map +1 -1
- package/dist/get.js +31 -19
- package/dist/get.js.map +1 -1
- package/dist/hlp-liquidation-client.d.ts +30 -5
- package/dist/hlp-liquidation-client.d.ts.map +1 -1
- package/dist/hlp-liquidation-client.js +39 -9
- package/dist/hlp-liquidation-client.js.map +1 -1
- package/dist/idl_delegate.json +490 -619
- package/dist/idl_v2.json +357 -1126
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/indexer.d.ts +1 -1
- package/dist/indexer.d.ts.map +1 -1
- package/dist/interest-accounting.d.ts +84 -31
- package/dist/interest-accounting.d.ts.map +1 -1
- package/dist/interest-accounting.js +120 -31
- package/dist/interest-accounting.js.map +1 -1
- package/dist/leverage-preview.d.ts +26 -86
- package/dist/leverage-preview.d.ts.map +1 -1
- package/dist/liquidation-client.d.ts +30 -6
- package/dist/liquidation-client.d.ts.map +1 -1
- package/dist/liquidation-client.js +16 -5
- package/dist/liquidation-client.js.map +1 -1
- package/dist/market-bootstrap.d.ts +30 -3
- package/dist/market-bootstrap.d.ts.map +1 -1
- package/dist/market-bootstrap.js +42 -3
- package/dist/market-bootstrap.js.map +1 -1
- package/dist/operator-client.d.ts.map +1 -1
- package/dist/operator-client.js +11 -12
- package/dist/operator-client.js.map +1 -1
- package/dist/protection.d.ts +12 -1
- package/dist/protection.d.ts.map +1 -1
- package/dist/protection.js +20 -5
- package/dist/protection.js.map +1 -1
- package/dist/referral.d.ts +8 -3
- package/dist/referral.d.ts.map +1 -1
- package/dist/referral.js +11 -9
- package/dist/referral.js.map +1 -1
- package/dist/tranche-client.d.ts +0 -47
- package/dist/tranche-client.d.ts.map +1 -1
- package/dist/tranche-client.js +2 -84
- package/dist/tranche-client.js.map +1 -1
- package/dist/transfer-fees.d.ts +6 -0
- package/dist/transfer-fees.d.ts.map +1 -1
- package/dist/transfer-fees.js +19 -0
- package/dist/transfer-fees.js.map +1 -1
- package/dist/type-aliases.d.ts +5 -15
- package/dist/type-aliases.d.ts.map +1 -1
- package/dist/types_delegate.d.ts +490 -619
- package/dist/types_delegate.d.ts.map +1 -1
- package/dist/types_v2.d.ts +357 -1126
- package/dist/types_v2.d.ts.map +1 -1
- package/dist/virtual-book/market.d.ts +26 -86
- package/dist/virtual-book/market.d.ts.map +1 -1
- package/dist/virtual-book/quotes.d.ts +65 -173
- package/dist/virtual-book/quotes.d.ts.map +1 -1
- package/dist/virtual-book/quotes.js +55 -6
- package/dist/virtual-book/quotes.js.map +1 -1
- package/dist/write.d.ts +37 -5
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +165 -96
- package/dist/write.js.map +1 -1
- package/dist/yield-client.d.ts +7 -20
- package/dist/yield-client.d.ts.map +1 -1
- package/dist/yield-client.js +6 -37
- package/dist/yield-client.js.map +1 -1
- package/package.json +2 -2
- package/src/constants.ts +27 -40
- package/src/delegate.ts +7 -5
- package/src/dusk.ts +2 -1
- package/src/get.ts +50 -20
- package/src/hlp-liquidation-client.ts +59 -13
- package/src/idl_delegate.json +490 -619
- package/src/idl_v2.json +357 -1126
- package/src/index.ts +0 -1
- package/src/indexer.ts +1 -1
- package/src/interest-accounting.ts +169 -40
- package/src/liquidation-client.ts +32 -9
- package/src/market-bootstrap.ts +58 -3
- package/src/operator-client.ts +11 -12
- package/src/protection.ts +21 -5
- package/src/referral.ts +15 -16
- package/src/tranche-client.ts +2 -80
- package/src/transfer-fees.ts +18 -0
- package/src/type-aliases.ts +5 -15
- package/src/types_delegate.ts +490 -619
- package/src/types_v2.ts +357 -1126
- package/src/virtual-book/quotes.ts +70 -6
- package/src/write.ts +194 -121
- package/src/yield-client.ts +9 -48
- package/dist/income-receivable.d.ts +0 -77
- package/dist/income-receivable.d.ts.map +0 -1
- package/dist/income-receivable.js +0 -135
- package/dist/income-receivable.js.map +0 -1
- package/src/income-receivable.ts +0 -145
package/README.md
CHANGED
|
@@ -36,6 +36,14 @@ creation and the treasury creation charge.
|
|
|
36
36
|
|
|
37
37
|
Guided creation has no independent opening price: omit `bootstrapPriceNad` or
|
|
38
38
|
pass zero. The SDK and program reject a nonzero value when λ is positive.
|
|
39
|
+
Add and remove liquidity first apply a due, funded recenter on concentrated
|
|
40
|
+
markets, which costs about as much as a recentering swap (about 327k compute
|
|
41
|
+
units measured). `addLiquidityTransaction` and `removeLiquidityTransaction`
|
|
42
|
+
lead with a `LIQUIDITY_RECENTER_COMPUTE_UNIT_LIMIT` compute limit there; raw
|
|
43
|
+
instruction callers should size the limit by simulation. New shares are priced
|
|
44
|
+
including any retained recenter surcharge the controller could not yet deploy,
|
|
45
|
+
and `previewAddLiquidity` returns the same amount.
|
|
46
|
+
|
|
39
47
|
`addLiquidityInstruction` takes two maximum gross spends. On the first guided
|
|
40
48
|
deposit the validated execution-time report sets their usable ratio; base is
|
|
41
49
|
rounded down and quote up to token atoms, and unused tokens stay in the owner's
|
|
@@ -62,6 +70,17 @@ bytes. The launch scripts accept optional `DUSK_ORACLE_POLICY_JSON` using
|
|
|
62
70
|
string values for large integers); omission selects native pricing. They resolve
|
|
63
71
|
the stored policy's feeds and compute budget when seeding liquidity.
|
|
64
72
|
|
|
73
|
+
The market address seed `paramsHash` is bound to the creator (the payer) and
|
|
74
|
+
the economic creation arguments: `initialize_market` rejects any value other
|
|
75
|
+
than SHA-256 over `dusk:market-params:v1`, the payer, and the Borsh-encoded
|
|
76
|
+
config, operator interest share, oracle policy, bootstrap price and launch fee
|
|
77
|
+
offset. `initializeMarketInstruction` derives it, and a supplied `paramsHash`
|
|
78
|
+
must match. To create LP mints for the market address first, call
|
|
79
|
+
`dusk.write.marketParamsHashFor({ payer, config, oracle, ... })`, or
|
|
80
|
+
`marketParamsHash(program.coder, ...)` with Anchor-shaped arguments.
|
|
81
|
+
`deriveMarketParamsHash` (the label hash) only finds markets created before
|
|
82
|
+
this binding.
|
|
83
|
+
|
|
65
84
|
Raw Anchor callers must include `oracle: null` or a serialized policy. The
|
|
66
85
|
`initializeMarket` argument layout now starts with `paramsHash`, followed by
|
|
67
86
|
`config` and `oracle`; rebuild instruction encoders and event decoders using the
|
|
@@ -177,8 +196,9 @@ const plan = await dusk.liquidations.buildFlash({
|
|
|
177
196
|
...position, buyer, maxRepayment: 1_000_000n,
|
|
178
197
|
route: async (ctx) => {
|
|
179
198
|
// Return instructions that sell collateral or pay from buyer inventory.
|
|
180
|
-
//
|
|
181
|
-
//
|
|
199
|
+
// Settlement needs ctx.requiredPaymentCredit NET in ctx.repaymentVault;
|
|
200
|
+
// transferring ctx.requiredPaymentGross credits that much after the debt
|
|
201
|
+
// mint's current transfer fee.
|
|
182
202
|
return buildPaymentRoute(ctx);
|
|
183
203
|
},
|
|
184
204
|
});
|
|
@@ -186,13 +206,25 @@ const plan = await dusk.liquidations.buildFlash({
|
|
|
186
206
|
// with the necessary address lookup tables, then simulate, sign and submit.
|
|
187
207
|
```
|
|
188
208
|
|
|
209
|
+
Settlement compares the repayment vault's balance increase with
|
|
210
|
+
`quote.payment`, so a Token-2022 debt mint's inbound transfer fee comes out of
|
|
211
|
+
whatever the route sends. The route context and the returned plan carry
|
|
212
|
+
`requiredPaymentGross`, the transfer that credits `requiredPaymentCredit` under
|
|
213
|
+
the fee in effect at `paymentTransferFee.epoch`. It equals
|
|
214
|
+
`requiredPaymentCredit` for a mint without a transfer fee and is zero for
|
|
215
|
+
`duskAmm` settlement. A fee announced for a later epoch is not included:
|
|
216
|
+
rebuild the plan if the epoch changes before execution. Settlement refunds any
|
|
217
|
+
excess to the buyer, less the refund's own transfer fee.
|
|
218
|
+
|
|
189
219
|
`settlement: "duskAmm"` instead sells the flashed collateral in the paired settle,
|
|
190
220
|
with debt principal netted internally and no escrow-payment instruction. The
|
|
191
221
|
buyer must retain the flashed collateral until settle. Its return transfer can
|
|
192
222
|
incur another collateral token fee. Settlement rejects an AMM quote that cannot
|
|
193
223
|
fund the fixed obligation; it never silently debits the owner's wallet.
|
|
194
|
-
|
|
195
|
-
|
|
224
|
+
Either venue settles fresh public interest into an active hLP, so the settle
|
|
225
|
+
instruction defaults to the current market's hLP accounts (none while no hLP is
|
|
226
|
+
active). If the route changes active hLP accounts, pass the complete final-state
|
|
227
|
+
account list through `settleRemainingAccounts`.
|
|
196
228
|
|
|
197
229
|
`previewEmergency()` and `buildEmergency()` accept `collateralDebit` and `full`.
|
|
198
230
|
|
|
@@ -234,8 +266,8 @@ invalidates the bound settle index. Helpers include ATA setup, a 256 KiB heap,
|
|
|
234
266
|
a 1.4M compute-unit limit and required hLP accounts. A compute-unit limit supplied
|
|
235
267
|
in the prefix overrides the default; set the priority price there as needed.
|
|
236
268
|
The session closes at settle. Its payment token account persists for reuse,
|
|
237
|
-
including withheld Token-2022 fees
|
|
238
|
-
payment
|
|
269
|
+
including withheld Token-2022 fees. Preexisting token donations do not count as
|
|
270
|
+
payment; settlement refunds the account's whole balance to the buyer.
|
|
239
271
|
|
|
240
272
|
The 0.5%–5% ramp sets a maximum buyer discount. Partial quotes choose the highest
|
|
241
273
|
whole-basis-point discount within that range that improves health after the
|
|
@@ -309,6 +341,15 @@ The client is intentionally split by source of truth:
|
|
|
309
341
|
- `dusk.get`: PDA helpers, direct RPC account fetches, and typed simulation previews.
|
|
310
342
|
- `dusk.fetch`: historical/indexed HTTP API methods.
|
|
311
343
|
|
|
344
|
+
For a deployment other than `DUSK_PROGRAM_ID`, pass `programId` (and
|
|
345
|
+
`leverageDelegateProgramId` for its delegate build). Every builder and reader
|
|
346
|
+
derives Dusk PDAs under its own program's ID, `dusk.get.pda` included, and
|
|
347
|
+
`dusk.orders` acts on that deployment's leverage positions. Standalone
|
|
348
|
+
`DuskLeverageOrders` and `DuskProtectionOrders` take the Dusk program ID as
|
|
349
|
+
their second constructor argument. The exported `derive*Address` helpers and
|
|
350
|
+
the module-level `pda` default to `DUSK_PROGRAM_ID`; pass the program ID as
|
|
351
|
+
their last argument for another deployment.
|
|
352
|
+
|
|
312
353
|
## Write Instructions
|
|
313
354
|
|
|
314
355
|
```typescript
|
|
@@ -339,9 +380,8 @@ const ix = await dusk.write.swapInstruction(
|
|
|
339
380
|
`swapRpc(...)` fetch the market before building the swap and fill in the
|
|
340
381
|
account map's `market` from the `market` option. Whenever either hLP
|
|
341
382
|
side has nonzero supply or residual exposure, they prepend the canonical
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
accounts remain after that prefix.
|
|
383
|
+
three-account prefix exactly once: `[srLP mint, base hLP srLP vault, quote hLP
|
|
384
|
+
srLP vault]`. Caller-provided remaining accounts remain after that prefix.
|
|
345
385
|
|
|
346
386
|
The write client supplies the canonical event-CPI authority and Dusk program
|
|
347
387
|
accounts for instructions that emit CPI events.
|
|
@@ -420,7 +460,10 @@ sending a zero fee deposit. Anchor fills in PDAs whose seeds it can compute,
|
|
|
420
460
|
the signer and fixed program accounts; transfer-hook and oracle accounts go in
|
|
421
461
|
`remainingAccounts`. A new order's PDA comes from the arguments, but an
|
|
422
462
|
existing order's is seeded by its own data, so every instruction that acts on
|
|
423
|
-
one takes `order`. `DuskProtectionOrders` checks its inputs the same way.
|
|
463
|
+
one takes `order`. `DuskProtectionOrders` checks its inputs the same way. Its
|
|
464
|
+
`closeInstruction` closes a cancelled protection order whose yield has been
|
|
465
|
+
harvested and returns the rent of the order and its custody accounts to the
|
|
466
|
+
sponsor.
|
|
424
467
|
|
|
425
468
|
Both programs' aliases apply IDL-generic types that accept any Anchor IDL
|
|
426
469
|
type, such as `DuskIdl` or `LeverageDelegateIdl`:
|
|
@@ -570,16 +613,18 @@ const claim = await dusk.operator.claim({market, assetMint, payer});
|
|
|
570
613
|
// For an earlier recipient, pass its sealed revenueEpoch.
|
|
571
614
|
```
|
|
572
615
|
|
|
573
|
-
|
|
574
|
-
|
|
616
|
+
Operator interest is credited when it accrues (`fees.ledger.operatorClaimable`)
|
|
617
|
+
and claimed from reserve cash as it allows; the rest stays claimable. A handoff
|
|
618
|
+
seals the interest already credited to the previous recipient in its revenue
|
|
619
|
+
archive; later accruals belong to the new one. `execute` returns
|
|
575
620
|
`setupInstructions` for a recipient archive when needed. Its `transaction`
|
|
576
621
|
already includes them; PDA forwarding must prepend them before forwarding
|
|
577
622
|
`instruction`. Neither claims nor swaps call the external governance program.
|
|
578
623
|
|
|
579
624
|
Virtual-reserve fields and signed debt/collateral event deltas use 128-bit
|
|
580
625
|
values. Keep decoded balances as `BN` or `bigint`; token transfer amounts still
|
|
581
|
-
use the unsigned 64-bit SPL domain. Extreme accrual saturates
|
|
582
|
-
debt
|
|
626
|
+
use the unsigned 64-bit SPL domain. Extreme accrual saturates at the per-bucket
|
|
627
|
+
64-bit debt limit and advances its checkpoint without deferring excess
|
|
583
628
|
interest. This introduces no configurable APR cap.
|
|
584
629
|
|
|
585
630
|
See [operator policy and protection details](../../docs/MARKET_OPERATOR.md).
|
|
@@ -629,7 +674,8 @@ const { transaction, referralPartner, referralAccrual } =
|
|
|
629
674
|
);
|
|
630
675
|
```
|
|
631
676
|
|
|
632
|
-
`referredOpenLeverage(...)` provides the equivalent leverage-opening flow
|
|
677
|
+
`referredOpenLeverage(...)` provides the equivalent leverage-opening flow and,
|
|
678
|
+
like `buildOpenLeverageInstruction`, puts the hLP accounts first while an hLP is active.
|
|
633
679
|
Existing borrow debt sides and leverage positions retain their bound partner on
|
|
634
680
|
later debt increases. The program snapshots the partner share, capped by the
|
|
635
681
|
current runtime maximum, when the binding is created. Deactivation or later
|
|
@@ -650,8 +696,10 @@ const claimTx = await dusk.write.claimReferralInterestTransaction({
|
|
|
650
696
|
```
|
|
651
697
|
|
|
652
698
|
`referralBindingInterestShareBps(...)` computes the admission-time capped share.
|
|
653
|
-
Pass that stored share
|
|
654
|
-
|
|
699
|
+
Pass that stored share and the payment's protocol share
|
|
700
|
+
(`quoteProtocolInterestShare(...)`) to `quoteReferralInterestShare(...)` to
|
|
701
|
+
mirror the on-chain floor rounding for realized interest. Referral claims are
|
|
702
|
+
paid from the asset's reserve vault.
|
|
655
703
|
|
|
656
704
|
## Get On-Chain State
|
|
657
705
|
|
|
@@ -784,7 +832,12 @@ const program = createDuskProgram({ provider });
|
|
|
784
832
|
```
|
|
785
833
|
|
|
786
834
|
`DUSK_PROGRAM_ID` is exported for integrations that prefer an explicit program
|
|
787
|
-
name over the generic `PROGRAM_ID` constant.
|
|
835
|
+
name over the generic `PROGRAM_ID` constant. Each `derive*Address` helper
|
|
836
|
+
takes an optional trailing `programId` that defaults to it, such as
|
|
837
|
+
`deriveMarketReserveVaultAddress(market, mint, program.programId)`.
|
|
838
|
+
`deriveLeveragePositionAddress` takes `namespaceAuthority` before the program
|
|
839
|
+
ID; pass the owner there for an owner-funded position. `duskPdas(programId)`
|
|
840
|
+
returns the `pda` helper set bound to another deployment.
|
|
788
841
|
|
|
789
842
|
### TypeScript and the IDL size
|
|
790
843
|
|
|
@@ -913,9 +966,14 @@ These display previews use confirmed banks. Supported groupings are 5, 10, 25,
|
|
|
913
966
|
50, and 100 bps. `levels` sets the price levels a side, 1 to 50 (12 by default).
|
|
914
967
|
A capture uses one market preview and one swap preview per level, in batches of
|
|
915
968
|
four (one per batch on oracle-guided markets): six batches at the default. Batches
|
|
916
|
-
must agree on market, mint, authority,
|
|
917
|
-
|
|
918
|
-
|
|
969
|
+
must agree byte for byte on market, mint, authority, and oracle account state,
|
|
970
|
+
and on the epoch. Parallel simulations can reach confirmed banks a few slots
|
|
971
|
+
apart, so their Clocks may differ by up to eight slots, provided nothing the Clock
|
|
972
|
+
drives moves the quotes: no concentration ramp is active, launch fee windows are
|
|
973
|
+
over unless the Unix timestamps match, the centre is unchanged, and start prices
|
|
974
|
+
and volatility surcharges agree within one part per million. A capture that
|
|
975
|
+
fails these checks throws `Market depth changed during native previews` or
|
|
976
|
+
`Market depth price changed during native previews`; refresh the capture to retry.
|
|
919
977
|
Output amounts include
|
|
920
978
|
Token-2022 transfer fees at the simulated epoch and the program's size-dependent
|
|
921
979
|
fees. Depth is display data; use a fresh preview for a user's exact transaction.
|
|
@@ -987,11 +1045,12 @@ market in a read-only simulation and settles the existing hedge in memory
|
|
|
987
1045
|
before reporting remaining funding capacity. Deposits use the same canonical
|
|
988
1046
|
srLP ownership and indexed-debt reconstruction as swaps, settling both vaults
|
|
989
1047
|
atomically with the entry. Existing hLP shares are priced at their current
|
|
990
|
-
NAV
|
|
991
|
-
|
|
1048
|
+
NAV. Public interest credited to a vault is netted against the funding it owes
|
|
1049
|
+
in the same asset at accrual and the rest is published to its holders, so hLP
|
|
1050
|
+
NAV carries no unpaid coupon.
|
|
992
1051
|
|
|
993
|
-
`dusk.write.depositSingleSided` supplies the canonical backing-vault
|
|
994
|
-
|
|
1052
|
+
`dusk.write.depositSingleSided` supplies the canonical backing-vault settlement
|
|
1053
|
+
prefix, including on the first deposit. Pass
|
|
995
1054
|
`marketSnapshot` with the same coherent market snapshot used for the other
|
|
996
1055
|
accounts to avoid another market read. Its returned transaction includes a
|
|
997
1056
|
256 KiB heap and a 1.4M compute-unit limit for settlement. When composing a
|
|
@@ -999,53 +1058,73 @@ transaction with your own budget, use `setupInstructions` and `actionInstruction
|
|
|
999
1058
|
instead. Low-level instruction builders must supply the settlement prefix
|
|
1000
1059
|
themselves, before token-hook and oracle accounts.
|
|
1001
1060
|
|
|
1061
|
+
The first deposit into a side with no receipts must borrow at least one atom
|
|
1062
|
+
of the opposite asset, or it fails `HlpFirstDepositTooSmall`. On such a side the
|
|
1063
|
+
preview also reports `minFirstDepositNet` and `minFirstDepositGross`: two
|
|
1064
|
+
opposite atoms' worth at the reserve ratio behind the funding ceiling, after the
|
|
1065
|
+
recenter-bucket premium. Both are zero once the side has receipts. The exact
|
|
1066
|
+
boundary can be lower, so simulate the deposit for amounts below the quote.
|
|
1067
|
+
|
|
1002
1068
|
`Ready` and the capacity ceiling do not guarantee execution for every amount.
|
|
1003
1069
|
Simulate the completed deposit transaction to check rounding, cash custody,
|
|
1004
1070
|
transfer fees and slippage. Under concentration, an opposite-token-neutral
|
|
1005
1071
|
hLP need not have a literal 2x gross-value/equity ratio.
|
|
1006
1072
|
|
|
1007
|
-
###
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
are
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1073
|
+
### Interest accounting and claims
|
|
1074
|
+
|
|
1075
|
+
Borrower interest is credited to holders when it accrues, through per-lane
|
|
1076
|
+
growth indexes: ordinary srLP `fees.interestGrowthIndexQ64`, junior
|
|
1077
|
+
`fees.junior.interestGrowthQ64`, and each hLP vault's per-asset interest index.
|
|
1078
|
+
Claims are paid from the asset's reserve vault, limited by its reserve cash;
|
|
1079
|
+
whatever cash cannot cover stays claimable. There is no interest vault, no
|
|
1080
|
+
funding step and no catch-up transaction.
|
|
1081
|
+
|
|
1082
|
+
`marketInterestLedger(market, asset)` reads one asset's `fees.ledger` as
|
|
1083
|
+
bigints: recognized public and hLP-funding interest, `credited` (unclaimed
|
|
1084
|
+
holder, seed and operator interest), `protocolUnpaid`, `operatorClaimable`,
|
|
1085
|
+
`protocolPending` and `deficit`. `credited` can exceed reserve cash. A nonzero
|
|
1086
|
+
`deficit` is a loss beyond LP capital; while either asset has one,
|
|
1087
|
+
`addLiquidity` and `depositSingleSided` fail with `InterestDeficit`.
|
|
1088
|
+
|
|
1089
|
+
`interestGrowthIndexQ64({ market, kind, asset })` returns the index a holder
|
|
1090
|
+
checkpoints against (pass the decoded cohort for a retired junior generation
|
|
1091
|
+
or hLP cohort). `claimableInterest({ yieldAccount, lpBalance, growthIndexQ64 })`
|
|
1092
|
+
mirrors `YieldAccount::accrue`, including junior escrow receipts, and
|
|
1093
|
+
`harvestableInterest` caps it by reserve cash. The index covers interest up to
|
|
1094
|
+
the market's last accrual; harvest accrues first, so the paid amount can be
|
|
1095
|
+
slightly higher. `accrueGrowthQ64` is the underlying fixed-point step.
|
|
1096
|
+
|
|
1097
|
+
The protocol share is paid only from interest borrowers pay:
|
|
1098
|
+
`quoteProtocolInterestShare` returns `floor(paid · protocolUnpaid / interest)`
|
|
1099
|
+
for a payment against the same accrued ledger. `hlpFundingInterest(market,
|
|
1100
|
+
asset)` is the opposite vault's indexed funding debt less its principal.
|
|
1101
|
+
A direct `repay` or `addLeverageMargin` on a transfer-fee debt mint charges the
|
|
1102
|
+
fee on the repayment only; interest cash stays in the reserve vault.
|
|
1103
|
+
|
|
1104
|
+
For transaction composition, use the yield client:
|
|
1018
1105
|
|
|
1019
1106
|
```ts
|
|
1020
|
-
const quote = await dusk.yield.previewFunding({ market, caller });
|
|
1021
1107
|
const plan = await dusk.yield.buildHarvest({
|
|
1022
1108
|
market, owner, caller, kind: "baseHlp", asset: "quote",
|
|
1023
|
-
// Optional per-asset gross advance caps, in raw atoms:
|
|
1024
|
-
maxBaseGross: 0n, maxQuoteGross: 1_000_000n,
|
|
1025
1109
|
});
|
|
1026
1110
|
// Simulate the complete plan.transaction before signing and sending.
|
|
1027
1111
|
```
|
|
1028
1112
|
|
|
1029
|
-
`kind` accepts `srlp`, `baseHlp` and `quoteHlp`. The builder reads
|
|
1030
|
-
YieldAccount, respects its configured recipient and creates that
|
|
1031
|
-
ATA if needed. Existing yield accounts are required.
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
mints and reserve vaults when fresh public interest is settled with active hLP.
|
|
1045
|
-
The Market layout is version 11 with `fees.publicInterestAdvance` on both sides,
|
|
1046
|
-
per-vault flash locks, and non-cash `reserves.flashReceivable`;
|
|
1047
|
-
use the regenerated IDL. It also records a frozen hLP mask and per-vault
|
|
1048
|
-
curve offsets; older snapshots are incompatible.
|
|
1113
|
+
`kind` accepts `srlp`, `junior`, `baseHlp` and `quoteHlp`. The builder reads
|
|
1114
|
+
the owner's YieldAccount, respects its configured recipient and creates that
|
|
1115
|
+
recipient's ATA if needed. Existing yield accounts are required. A harvest pays
|
|
1116
|
+
swap fees in full and credited interest as reserve cash allows;
|
|
1117
|
+
`YieldClaimed.interestRemaining` reports what stays claimable. Builders never
|
|
1118
|
+
sign or send.
|
|
1119
|
+
|
|
1120
|
+
Leverage builders supply the canonical hLP settlement prefix while hLP is
|
|
1121
|
+
active: `[srLP mint, base hLP srLP vault, quote hLP srLP vault, base asset mint,
|
|
1122
|
+
quote asset mint, base reserve vault, quote reserve vault]`. The program reads
|
|
1123
|
+
the first three; the leverage delegate recognizes all seven. Everything after
|
|
1124
|
+
the first three is read as hook or callback accounts, so a raw
|
|
1125
|
+
`delegatedCloseLeverage` must place only the three-account prefix before its
|
|
1126
|
+
callback accounts. The Market layout is version 19; use the regenerated IDL.
|
|
1127
|
+
Older snapshots are incompatible.
|
|
1049
1128
|
|
|
1050
1129
|
### Vault-wide hLP flash recovery
|
|
1051
1130
|
|
|
@@ -1063,6 +1142,7 @@ const quote = await dusk.hlpLiquidations.preview({ market, targetAsset: "base" }
|
|
|
1063
1142
|
const plan = await dusk.hlpLiquidations.buildFlash({
|
|
1064
1143
|
market, targetAsset: "base", buyer,
|
|
1065
1144
|
allowFull: false, // explicit opt-in is required for an insolvent full closure
|
|
1145
|
+
quote, // the reviewed quote bounds payment, collateral and principal write-off
|
|
1066
1146
|
route: async ({ buyerCollateralAccount, repaymentVault, requiredPaymentCredit,
|
|
1067
1147
|
collateralMint, debtMint, collateralTokenProgram, debtTokenProgram }) => {
|
|
1068
1148
|
// Return an external route, a Dusk swap, or explicit inventory payment.
|
|
@@ -1078,8 +1158,14 @@ const plan = await dusk.hlpLiquidations.buildFlash({
|
|
|
1078
1158
|
|
|
1079
1159
|
The helpers never sign, submit, or silently top up from the keeper's wallet.
|
|
1080
1160
|
The quote is current-bank only. `maxPayment`, collateral limits and
|
|
1081
|
-
principal-loss caps protect the submitted plan against state drift.
|
|
1082
|
-
|
|
1161
|
+
principal-loss caps protect the submitted plan against state drift. Neither
|
|
1162
|
+
builder defaults the principal-loss cap. `buildFlash` takes `maxSocializedLoss`,
|
|
1163
|
+
or the reviewed `quote`, which then also supplies the payment and collateral
|
|
1164
|
+
bounds in place of a new preview. A quote caps the write-off at its own: zero
|
|
1165
|
+
for a partial rescue, otherwise the vault's debt principal less
|
|
1166
|
+
`borrowedClaim + reserveCredit`. `buildNativeCloseAndExit` requires
|
|
1167
|
+
`maxSocializedLoss`. Prefix instructions must be supplied through
|
|
1168
|
+
`prefixInstructions` before building.
|
|
1083
1169
|
An affected hLP cohort cannot mint/redeem between begin and settle; swaps and
|
|
1084
1170
|
independent market operations remain composable subject to cash and accounting
|
|
1085
1171
|
checks. The SDK's complete-plan simulator preserves bound instruction indices.
|
|
@@ -1098,12 +1184,14 @@ recovery is then valued on the EMA-price, smoothed-depth concentrated reference
|
|
|
1098
1184
|
curve with the configured fees; it does not use live spot reserves.
|
|
1099
1185
|
|
|
1100
1186
|
An eligible holder can build `hlpLiquidations.buildNativeCloseAndExit({ market,
|
|
1101
|
-
targetAsset, exit: { hlpAmount, options } })`.
|
|
1102
|
-
native close before `withdrawSingleSided`
|
|
1187
|
+
targetAsset, maxSocializedLoss, exit: { hlpAmount, minTargetAmountOut: 0n, options } })`.
|
|
1188
|
+
The helper places the permissionless native close before `withdrawSingleSided`
|
|
1189
|
+
in one transaction; `options` are the
|
|
1103
1190
|
normal hLP withdrawal accounts and the owner signs. It burns the closed vault's
|
|
1104
1191
|
receipts for zero principal payout. The flash builder also accepts `exit`,
|
|
1105
|
-
appending an owner-signed withdrawal after settlement.
|
|
1106
|
-
|
|
1192
|
+
appending an owner-signed withdrawal after settlement. `exit.minTargetAmountOut`
|
|
1193
|
+
is required: a solvent rescue's exit must set a positive floor, and zero is
|
|
1194
|
+
accepted only after a full flash or native terminal close. A terminal quote
|
|
1107
1195
|
still requires `allowFull` and pays zero principal. A vault with only a
|
|
1108
1196
|
transient spot deficit must recover or receive funded rescue before its holders
|
|
1109
1197
|
can withdraw. Once its executable value recovers, a frozen vault can quote a
|
|
@@ -1143,8 +1231,9 @@ already checkpointed in the holder's yield accounts.
|
|
|
1143
1231
|
|
|
1144
1232
|
`srLP` is the default senior claim. `jrLP` owns productive first-loss capital;
|
|
1145
1233
|
entering junior burns srLP and mints jrLP at their current values. `hLP` remains
|
|
1146
|
-
a hedged position backed by senior liquidity and cannot enter junior.
|
|
1147
|
-
|
|
1234
|
+
a hedged position backed by senior liquidity and cannot enter junior. Public
|
|
1235
|
+
interest credited to a vault first nets against the funding it owes; the rest
|
|
1236
|
+
is credited to its holders.
|
|
1148
1237
|
|
|
1149
1238
|
```ts
|
|
1150
1239
|
const setup = await dusk.tranches.initialize({ market, payer });
|
|
@@ -1172,35 +1261,18 @@ the new request can be instructions in one atomic transaction. Conversion can
|
|
|
1172
1261
|
also be blocked by an unsettled insolvent
|
|
1173
1262
|
liquidation. A failed transaction does not silently extend a window.
|
|
1174
1263
|
|
|
1175
|
-
|
|
1176
|
-
holder
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
2. For an existing srLP/jrLP holder, call
|
|
1184
|
-
`prepareHolderIncome({ market, owner, kind: "senior" | "junior" })`.
|
|
1185
|
-
Submit its transactions and repeat while `hasMore` is true. Each instruction
|
|
1186
|
-
processes at most eight archived epochs for one source.
|
|
1187
|
-
3. Fetch again and build the transfer, conversion or harvest. A competing
|
|
1188
|
-
maintenance transaction can require another catch-up; builders do not
|
|
1189
|
-
guarantee that the market stays unchanged between fetch and submission.
|
|
1190
|
-
|
|
1191
|
-
Archived history has no fixed lifetime limit. A caller that pays archival rent
|
|
1192
|
-
can roll after settlement, so repayment/roll churn can increase other holders'
|
|
1193
|
-
catch-up work. Eight epochs per instruction bounds transaction work, not total
|
|
1194
|
-
history. Integrators should maintain active holders, retry stale plans and expose
|
|
1195
|
-
maintenance transactions in their UX; this mechanism does not guarantee a
|
|
1196
|
-
single-transaction exit for an inactive holder.
|
|
1197
|
-
|
|
1198
|
-
`checkpointIncome` also supports one asset/source batch and retired junior
|
|
1199
|
-
mints. Wiped receipts have no principal but may still own historical earnings.
|
|
1200
|
-
`burnRetired` removes those receipts without giving them new-generation capital.
|
|
1264
|
+
Interest credited before an ordinary LP transfers or converts remains with that
|
|
1265
|
+
holder: the transfer hook, deposits, withdrawals, conversions and harvest
|
|
1266
|
+
checkpoint every party against the lane's growth index, so no catch-up
|
|
1267
|
+
transaction exists. Interest credited to a junior generation before a wipe stays
|
|
1268
|
+
claimable from its retired cohort's frozen index; harvest it with
|
|
1269
|
+
`retiredJuniorMint`. Wiped receipts have no principal but may still own
|
|
1270
|
+
earnings. `burnRetired` removes those receipts without giving them
|
|
1271
|
+
new-generation capital.
|
|
1201
1272
|
|
|
1202
1273
|
The permanent junior seed receives income even without external jrLP holders.
|
|
1203
|
-
`fundSeed` moves its
|
|
1274
|
+
`fundSeed` moves its credited interest, as reserve cash allows, into seed-owned
|
|
1275
|
+
custody. `compoundSeed`
|
|
1204
1276
|
reinvests balanced asset amounts without issuing senior tokens; unmatched assets
|
|
1205
1277
|
remain seed-owned custody until a matching amount is available. These custody
|
|
1206
1278
|
balances do not count as productive junior coverage until reinvested.
|
|
@@ -1217,17 +1289,3 @@ the manager immediately and invalidates its pending bundle. Operator-authored
|
|
|
1217
1289
|
bundles are preserved. Every ownership transfer clears the manager; it cannot
|
|
1218
1290
|
be retained or replaced in the handoff bundle. The successor appoints a manager
|
|
1219
1291
|
through a separate full-notice announcement.
|
|
1220
|
-
|
|
1221
|
-
### LP income projection
|
|
1222
|
-
|
|
1223
|
-
`projectHolderIncome` projects funded interest belonging to a senior or junior
|
|
1224
|
-
receipt holder, including income retained after an exit. Supply the updated
|
|
1225
|
-
market's four income books, the decoded yield account, its wallet balance, and
|
|
1226
|
-
retired junior exposure ends when applicable. `readIncomeArchives` retrieves
|
|
1227
|
-
and authenticates the immutable historical denominations required by that
|
|
1228
|
-
projection, using the snapshot's minimum bank slot. Missing or excessive history
|
|
1229
|
-
raises `IncomeHistoryRequired`; it must not be displayed as zero income.
|
|
1230
|
-
|
|
1231
|
-
These helpers never send a transaction. `dusk.tranches.prepareHolderIncome`
|
|
1232
|
-
prepares bounded checkpoint transactions when a holder needs to catch up before
|
|
1233
|
-
harvesting, transferring, or converting receipts.
|
package/dist/constants.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ export declare const SEEDS: {
|
|
|
30
30
|
readonly MARKET_V2: Buffer<ArrayBuffer>;
|
|
31
31
|
readonly MARKET_RESERVE_VAULT: Buffer<ArrayBuffer>;
|
|
32
32
|
readonly MARKET_COLLATERAL_VAULT: Buffer<ArrayBuffer>;
|
|
33
|
-
readonly MARKET_INTEREST_VAULT: Buffer<ArrayBuffer>;
|
|
34
33
|
readonly BORROW_POSITION: Buffer<ArrayBuffer>;
|
|
35
34
|
readonly LEVERAGE_POSITION: Buffer<ArrayBuffer>;
|
|
36
35
|
readonly LEVERAGE_COLLATERAL_VAULT: Buffer<ArrayBuffer>;
|
|
@@ -51,7 +50,7 @@ export declare function deriveEventAuthorityAddress(programId?: PublicKey): [Pub
|
|
|
51
50
|
*/
|
|
52
51
|
export declare function deriveFutarchyAuthorityAddress(programId?: PublicKey): [PublicKey, number];
|
|
53
52
|
/** Derive the protocol-wide referral partner for a referrer authority. */
|
|
54
|
-
export declare function deriveReferralPartnerAddress(authority: PublicKey): [PublicKey, number];
|
|
53
|
+
export declare function deriveReferralPartnerAddress(authority: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
55
54
|
/** Derive claimable referral interest for one partner, market, and debt mint. */
|
|
56
55
|
export declare function deriveReferralAccrualAddress(referralPartner: PublicKey, market: PublicKey, assetMint: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
57
56
|
export type U64SeedLike = bigint | number | string | {
|
|
@@ -70,27 +69,25 @@ export declare function deriveTokenMetadataAddress(mint: PublicKey): [PublicKey,
|
|
|
70
69
|
/**
|
|
71
70
|
* Derive market reserve vault PDA address
|
|
72
71
|
*/
|
|
73
|
-
export declare function deriveMarketReserveVaultAddress(market: PublicKey, reserveMint: PublicKey): [PublicKey, number];
|
|
72
|
+
export declare function deriveMarketReserveVaultAddress(market: PublicKey, reserveMint: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
74
73
|
/**
|
|
75
74
|
* Derive market collateral vault PDA address
|
|
76
75
|
*/
|
|
77
76
|
/** Per-market collateral custody for leverage positions. */
|
|
78
77
|
export declare function deriveLeverageCollateralVaultAddress(market: PublicKey, collateralMint: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
79
|
-
export declare function deriveMarketCollateralVaultAddress(market: PublicKey, collateralMint: PublicKey): [PublicKey, number];
|
|
80
|
-
/**
|
|
81
|
-
* Derive market interest vault PDA address
|
|
82
|
-
*/
|
|
83
|
-
export declare function deriveMarketInterestVaultAddress(market: PublicKey, interestMint: PublicKey): [PublicKey, number];
|
|
78
|
+
export declare function deriveMarketCollateralVaultAddress(market: PublicKey, collateralMint: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
84
79
|
/**
|
|
85
80
|
* Derive borrow position PDA address
|
|
86
81
|
*/
|
|
87
|
-
export declare function deriveBorrowPositionAddress(market: PublicKey, owner: PublicKey, positionId: PublicKey): [PublicKey, number];
|
|
82
|
+
export declare function deriveBorrowPositionAddress(market: PublicKey, owner: PublicKey, positionId: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
88
83
|
/**
|
|
89
84
|
* Derive leverage position PDA address
|
|
90
85
|
*/
|
|
91
86
|
/** Delegation is keyed by the position it delegates, not by the owner. */
|
|
92
|
-
export declare function deriveLeverageDelegationAddress(leveragePosition: PublicKey): [PublicKey, number];
|
|
93
|
-
|
|
87
|
+
export declare function deriveLeverageDelegationAddress(leveragePosition: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
88
|
+
/** `namespaceAuthority` defaults to the position owner; pass it explicitly
|
|
89
|
+
* (or `undefined`) before `programId` for another deployment. */
|
|
90
|
+
export declare function deriveLeveragePositionAddress(market: PublicKey, positionOwner: PublicKey, positionId: PublicKey, namespaceAuthority?: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
94
91
|
export type YieldTokenKind = "srlp" | "hlp" | "junior" | 0 | 1 | 2;
|
|
95
92
|
/** The `YieldTokenKind` enum value an instruction argument takes, such as `{ hlp: {} }`. */
|
|
96
93
|
export declare function yieldTokenKindArg(tokenKind: YieldTokenKind): DuskDefinedInput<"yieldTokenKind">;
|
|
@@ -154,17 +151,16 @@ export declare function buildLpTransferHookAccountMetas({ lpMint, market, source
|
|
|
154
151
|
/**
|
|
155
152
|
* Derive canonical aggregate hLP vault srLP token-account PDA.
|
|
156
153
|
*/
|
|
157
|
-
export declare function deriveHlpSrlpVaultAddress(market: PublicKey, targetHlpMint: PublicKey, srlpMint: PublicKey): [PublicKey, number];
|
|
154
|
+
export declare function deriveHlpSrlpVaultAddress(market: PublicKey, targetHlpMint: PublicKey, srlpMint: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
158
155
|
export declare function deriveJuniorMintAddress(market: PublicKey, generation: U64SeedLike, programId?: PublicKey): [PublicKey, number];
|
|
159
156
|
export declare function deriveJuniorCohortAddress(market: PublicKey, mint: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
160
157
|
export declare function deriveJuniorExitAddress(market: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey): [PublicKey, number];
|
|
161
|
-
export declare function deriveIncomeEpochAddress(market: PublicKey, bookIndex: number, epoch: U64SeedLike, programId?: PublicKey): [PublicKey, number];
|
|
162
158
|
export declare const OPERATOR_POLICY_VERSION = 2;
|
|
163
159
|
export declare const OPERATOR_PENDING_LIMIT = 1;
|
|
164
160
|
export declare const JUNIOR_MAX_NOTICE_SLOTS = 4320000;
|
|
165
161
|
export declare const OPERATOR_NOTICE_SLOTS = 4752000;
|
|
166
162
|
export declare const OPERATOR_EXECUTION_WINDOW_SLOTS = 3024000;
|
|
167
|
-
export declare const MAX_OPERATOR_INTEREST_SHARE_BPS =
|
|
163
|
+
export declare const MAX_OPERATOR_INTEREST_SHARE_BPS = 10000;
|
|
168
164
|
export declare function deriveOperatorProposalAddress(market: PublicKey, nonce: U64SeedLike, programId?: PublicKey): [PublicKey, number];
|
|
169
165
|
export declare function deriveOperatorRevenueAddress(market: PublicKey, revenueEpoch: U64SeedLike, programId?: PublicKey): [PublicKey, number];
|
|
170
166
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,wFAAwF;AACxF,eAAO,MAAM,kCAAkC,QAE9C,CAAC;AAUF;;;GAGG;AACH,eAAO,MAAM,eAAe,WAAyD,CAAC;AAEtF,eAAO,MAAM,UAAU,WAAkB,CAAC;AAC1C;8EAC8E;AAC9E,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AACF;yEACyE;AACzE,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,yBAAyB,WAA+C,CAAC;AAEtF,mDAAmD;AACnD,eAAO,MAAM,uCAAuC,OAAQ,C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