@varla/sdk 1.10.0 → 1.10.2

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
@@ -106,15 +106,20 @@ These are convenience helpers built on top of the contract bindings.
106
106
  <!-- BEGIN GENERATED:VIEW_HELPERS -->
107
107
  - `getInterestRateStrategyFromPool`
108
108
  - `hydrateOraclePositionIds`
109
+ - `previewBorrow`
110
+ - `previewRepay`
109
111
  - `readAccessManagerBasics`
110
112
  - `readAccountPositions`
111
113
  - `readAccountPositionsFull`
112
114
  - `readAccountSnapshot`
113
115
  - `readAdapterInfo`
116
+ - `readBadDebtStatus`
114
117
  - `readBorrowLimits`
115
118
  - `readBorrowerState`
116
119
  - `readBorrowers`
117
120
  - `readBorrowersPage`
121
+ - `readCalculateLiquidationBonus`
122
+ - `readCanLiquidate`
118
123
  - `readConfiguredPositionIds`
119
124
  - `readConvertLiquidatorBasics`
120
125
  - `readCoreAddresses`
@@ -160,6 +165,7 @@ These are convenience helpers built on top of the contract bindings.
160
165
  - `readPositionLiquidationConfigOverride`
161
166
  - `readPositionLtvOverride`
162
167
  - `readPositionSnapshot`
168
+ - `readPreviewLiquidation`
163
169
  - `readPrice`
164
170
  - `readProxyAdminPaused`
165
171
  - `readRiskTier`
@@ -1107,6 +1107,28 @@ export declare const VARLACORE_ABI: readonly [{
1107
1107
  }];
1108
1108
  readonly stateMutability: "view";
1109
1109
  readonly type: "function";
1110
+ }, {
1111
+ readonly inputs: readonly [{
1112
+ readonly internalType: "address";
1113
+ readonly name: "user";
1114
+ readonly type: "address";
1115
+ }];
1116
+ readonly name: "getOracleGuardsStatus";
1117
+ readonly outputs: readonly [{
1118
+ readonly internalType: "bool";
1119
+ readonly name: "ok";
1120
+ readonly type: "bool";
1121
+ }, {
1122
+ readonly internalType: "uint256";
1123
+ readonly name: "badPid";
1124
+ readonly type: "uint256";
1125
+ }, {
1126
+ readonly internalType: "uint256";
1127
+ readonly name: "until";
1128
+ readonly type: "uint256";
1129
+ }];
1130
+ readonly stateMutability: "view";
1131
+ readonly type: "function";
1110
1132
  }, {
1111
1133
  readonly inputs: readonly [{
1112
1134
  readonly internalType: "address";
@@ -1157,6 +1179,20 @@ export declare const VARLACORE_ABI: readonly [{
1157
1179
  }];
1158
1180
  readonly stateMutability: "view";
1159
1181
  readonly type: "function";
1182
+ }, {
1183
+ readonly inputs: readonly [{
1184
+ readonly internalType: "address";
1185
+ readonly name: "user";
1186
+ readonly type: "address";
1187
+ }];
1188
+ readonly name: "getPositionCount";
1189
+ readonly outputs: readonly [{
1190
+ readonly internalType: "uint256";
1191
+ readonly name: "";
1192
+ readonly type: "uint256";
1193
+ }];
1194
+ readonly stateMutability: "view";
1195
+ readonly type: "function";
1160
1196
  }, {
1161
1197
  readonly inputs: readonly [{
1162
1198
  readonly internalType: "address";
@@ -1229,6 +1265,28 @@ export declare const VARLACORE_ABI: readonly [{
1229
1265
  }];
1230
1266
  readonly stateMutability: "view";
1231
1267
  readonly type: "function";
1268
+ }, {
1269
+ readonly inputs: readonly [{
1270
+ readonly internalType: "address";
1271
+ readonly name: "user";
1272
+ readonly type: "address";
1273
+ }];
1274
+ readonly name: "getRepayTiming";
1275
+ readonly outputs: readonly [{
1276
+ readonly internalType: "uint256";
1277
+ readonly name: "borrowedAt";
1278
+ readonly type: "uint256";
1279
+ }, {
1280
+ readonly internalType: "uint256";
1281
+ readonly name: "canRepayAt";
1282
+ readonly type: "uint256";
1283
+ }, {
1284
+ readonly internalType: "bool";
1285
+ readonly name: "isRepayAllowed";
1286
+ readonly type: "bool";
1287
+ }];
1288
+ readonly stateMutability: "view";
1289
+ readonly type: "function";
1232
1290
  }, {
1233
1291
  readonly inputs: readonly [{
1234
1292
  readonly internalType: "address";
@@ -1 +1 @@
1
- {"version":3,"file":"VarlaCore.d.ts","sourceRoot":"","sources":["../../../src/abi/full/VarlaCore.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+tEF,CAAC"}
@@ -1438,6 +1438,35 @@ export const VARLACORE_ABI = [
1438
1438
  "stateMutability": "view",
1439
1439
  "type": "function"
1440
1440
  },
1441
+ {
1442
+ "inputs": [
1443
+ {
1444
+ "internalType": "address",
1445
+ "name": "user",
1446
+ "type": "address"
1447
+ }
1448
+ ],
1449
+ "name": "getOracleGuardsStatus",
1450
+ "outputs": [
1451
+ {
1452
+ "internalType": "bool",
1453
+ "name": "ok",
1454
+ "type": "bool"
1455
+ },
1456
+ {
1457
+ "internalType": "uint256",
1458
+ "name": "badPid",
1459
+ "type": "uint256"
1460
+ },
1461
+ {
1462
+ "internalType": "uint256",
1463
+ "name": "until",
1464
+ "type": "uint256"
1465
+ }
1466
+ ],
1467
+ "stateMutability": "view",
1468
+ "type": "function"
1469
+ },
1441
1470
  {
1442
1471
  "inputs": [
1443
1472
  {
@@ -1505,6 +1534,25 @@ export const VARLACORE_ABI = [
1505
1534
  "stateMutability": "view",
1506
1535
  "type": "function"
1507
1536
  },
1537
+ {
1538
+ "inputs": [
1539
+ {
1540
+ "internalType": "address",
1541
+ "name": "user",
1542
+ "type": "address"
1543
+ }
1544
+ ],
1545
+ "name": "getPositionCount",
1546
+ "outputs": [
1547
+ {
1548
+ "internalType": "uint256",
1549
+ "name": "",
1550
+ "type": "uint256"
1551
+ }
1552
+ ],
1553
+ "stateMutability": "view",
1554
+ "type": "function"
1555
+ },
1508
1556
  {
1509
1557
  "inputs": [
1510
1558
  {
@@ -1601,6 +1649,35 @@ export const VARLACORE_ABI = [
1601
1649
  "stateMutability": "view",
1602
1650
  "type": "function"
1603
1651
  },
1652
+ {
1653
+ "inputs": [
1654
+ {
1655
+ "internalType": "address",
1656
+ "name": "user",
1657
+ "type": "address"
1658
+ }
1659
+ ],
1660
+ "name": "getRepayTiming",
1661
+ "outputs": [
1662
+ {
1663
+ "internalType": "uint256",
1664
+ "name": "borrowedAt",
1665
+ "type": "uint256"
1666
+ },
1667
+ {
1668
+ "internalType": "uint256",
1669
+ "name": "canRepayAt",
1670
+ "type": "uint256"
1671
+ },
1672
+ {
1673
+ "internalType": "bool",
1674
+ "name": "isRepayAllowed",
1675
+ "type": "bool"
1676
+ }
1677
+ ],
1678
+ "stateMutability": "view",
1679
+ "type": "function"
1680
+ },
1604
1681
  {
1605
1682
  "inputs": [
1606
1683
  {
@@ -1,10 +1,10 @@
1
1
  export const bsc = {
2
- accessManager: "0xcCb26D35E978B91AD44ced6245A395170cC0FEBf",
3
- oracle: "0x67bf9fD26ED7F00debEF84eA52C2D71c2377b60F",
4
- core: "0xA8aDEf862a1053177c201315DaCC07c97F97A140",
5
- pool: "0xD1C5fdCdbcE721402F613ad29BFE314aB4Aab218",
6
- liquidator: "0xE4D3E4aC5f748d9347Fd4Ac7281800A6E3858a97",
7
- mergeLiquidator: "0xAd7AF445d3b2bD594E3858CC25F3131dBF780ECe",
8
- convertLiquidator: "0xBF3CF4c40F445Fdef1189cD50130cB6d1726bf7a",
9
- opinionCtfExecutionEngineAdapter: "0x82A1d50DF865BcF2C9bf57c8B9e4cb984Dfd037D",
2
+ accessManager: "0xc8398f9dD425deBB4E6F849331914C6612D72189",
3
+ oracle: "0x757b410cA23D10d46e2C05F7437A2D2faF221E13",
4
+ core: "0x8162326CbDC080b7eaf1b66873DBc5FFe7e52f9e",
5
+ pool: "0xF4f2c5b143Dea92B3Deb19f365bFDA7C6DE598ED",
6
+ liquidator: "0xFFe8c97355d9c2eb802CADD42b8a91ad79838c69",
7
+ mergeLiquidator: "0x99e63a21387adf329EF343B7AcF337238773e837",
8
+ convertLiquidator: "0xA1B45F9E999e095351a2b82d8c759B5Ac5e50106",
9
+ opinionCtfExecutionEngineAdapter: "0x2f66490BdDEEbE2438c37A0A965E9525A5fB072e",
10
10
  };
@@ -1,10 +1,10 @@
1
1
  export const polygon = {
2
- accessManager: "0xA365C3bdeE909d296fE82b09c7E5484207231d2c",
3
- oracle: "0xba643523C455986429B8Aac79e15A798C54b587c",
4
- core: "0x3A4e1ED056d2613c1b68f148690883C67045A87e",
5
- pool: "0x4002A711A5d53be433B71a4b5416c4CCAa80aAE7",
6
- liquidator: "0x42F20720d8c56B2352186cBee30aA37516aF1A0a",
7
- mergeLiquidator: "0xA39F45e4DA022cE59cbAA38f01D83D37351e234b",
8
- convertLiquidator: "0x1DA1C34f72dD19E7610FcA4316531fC4cC6A6034",
9
- polymarketCtfAdapter: "0x75c90332eF198357b9d6a066a199fF786ba28Fc4",
2
+ accessManager: "0x93bd834a075c8f81d3dA5c2e4225Fb7FA7f78b9a",
3
+ oracle: "0x05d846564Ae2153ec92f0a71028013150f90958b",
4
+ core: "0xF5Ce34807366EAC4Cb59ddd8d31cbD959fc835f9",
5
+ pool: "0x9852040B8fDe452F30EC2377a01276d8671A7A8A",
6
+ liquidator: "0x0b389f9e26D38949AbA847d8A335628B57019170",
7
+ mergeLiquidator: "0xD015beb05A907688f3610EB0850173DDdFF84fdC",
8
+ convertLiquidator: "0x1Be2D2306B08B59ee8f7FB453b5F4242dbFb4D20",
9
+ polymarketCtfAdapter: "0x750F1e4b630B40E1bB0988fB25e330d937DAFF4f",
10
10
  };
@@ -3280,6 +3280,28 @@ export declare const abis: {
3280
3280
  }];
3281
3281
  readonly stateMutability: "view";
3282
3282
  readonly type: "function";
3283
+ }, {
3284
+ readonly inputs: readonly [{
3285
+ readonly internalType: "address";
3286
+ readonly name: "user";
3287
+ readonly type: "address";
3288
+ }];
3289
+ readonly name: "getOracleGuardsStatus";
3290
+ readonly outputs: readonly [{
3291
+ readonly internalType: "bool";
3292
+ readonly name: "ok";
3293
+ readonly type: "bool";
3294
+ }, {
3295
+ readonly internalType: "uint256";
3296
+ readonly name: "badPid";
3297
+ readonly type: "uint256";
3298
+ }, {
3299
+ readonly internalType: "uint256";
3300
+ readonly name: "until";
3301
+ readonly type: "uint256";
3302
+ }];
3303
+ readonly stateMutability: "view";
3304
+ readonly type: "function";
3283
3305
  }, {
3284
3306
  readonly inputs: readonly [{
3285
3307
  readonly internalType: "address";
@@ -3330,6 +3352,20 @@ export declare const abis: {
3330
3352
  }];
3331
3353
  readonly stateMutability: "view";
3332
3354
  readonly type: "function";
3355
+ }, {
3356
+ readonly inputs: readonly [{
3357
+ readonly internalType: "address";
3358
+ readonly name: "user";
3359
+ readonly type: "address";
3360
+ }];
3361
+ readonly name: "getPositionCount";
3362
+ readonly outputs: readonly [{
3363
+ readonly internalType: "uint256";
3364
+ readonly name: "";
3365
+ readonly type: "uint256";
3366
+ }];
3367
+ readonly stateMutability: "view";
3368
+ readonly type: "function";
3333
3369
  }, {
3334
3370
  readonly inputs: readonly [{
3335
3371
  readonly internalType: "address";
@@ -3402,6 +3438,28 @@ export declare const abis: {
3402
3438
  }];
3403
3439
  readonly stateMutability: "view";
3404
3440
  readonly type: "function";
3441
+ }, {
3442
+ readonly inputs: readonly [{
3443
+ readonly internalType: "address";
3444
+ readonly name: "user";
3445
+ readonly type: "address";
3446
+ }];
3447
+ readonly name: "getRepayTiming";
3448
+ readonly outputs: readonly [{
3449
+ readonly internalType: "uint256";
3450
+ readonly name: "borrowedAt";
3451
+ readonly type: "uint256";
3452
+ }, {
3453
+ readonly internalType: "uint256";
3454
+ readonly name: "canRepayAt";
3455
+ readonly type: "uint256";
3456
+ }, {
3457
+ readonly internalType: "bool";
3458
+ readonly name: "isRepayAllowed";
3459
+ readonly type: "bool";
3460
+ }];
3461
+ readonly stateMutability: "view";
3462
+ readonly type: "function";
3405
3463
  }, {
3406
3464
  readonly inputs: readonly [{
3407
3465
  readonly internalType: "address";
@@ -1 +1 @@
1
- {"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../src/generated.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaP,CAAC;AAEX,eAAO,MAAM,SAAS;;;CAGZ,CAAC"}
@@ -379,6 +379,69 @@ export type ReadBorrowLimits = {
379
379
  healthFactor: bigint;
380
380
  canBeLiquidated: boolean;
381
381
  };
382
+ export type PreviewBorrow = {
383
+ user: Address;
384
+ borrowAmount: bigint;
385
+ maxBorrowByCollateral: bigint;
386
+ maxBorrowByPool?: bigint;
387
+ canBorrowByCollateral: boolean;
388
+ canBorrowByPool?: boolean;
389
+ currentDebt: bigint;
390
+ newDebt: bigint;
391
+ currentHealthFactor: bigint;
392
+ newHealthFactor: bigint;
393
+ };
394
+ /**
395
+ * UI/helper preview for a proposed borrow amount.
396
+ *
397
+ * This is computed from existing view calls (there is no on-chain `previewBorrow`).
398
+ */
399
+ export declare function previewBorrow(params: {
400
+ core: {
401
+ read: {
402
+ getCollateralValue: (args: readonly [Address]) => Promise<bigint>;
403
+ getDebt: (args: readonly [Address]) => Promise<bigint>;
404
+ getMaxBorrow: (args: readonly [Address]) => Promise<bigint>;
405
+ getHealthFactor: (args: readonly [Address]) => Promise<unknown>;
406
+ };
407
+ };
408
+ /** Optional: include pool headroom (liquidity + cap). */
409
+ pool?: {
410
+ read: {
411
+ maxBorrow: () => Promise<bigint>;
412
+ };
413
+ };
414
+ user: Address;
415
+ borrowAmount: bigint;
416
+ }): Promise<PreviewBorrow>;
417
+ export type PreviewRepay = {
418
+ user: Address;
419
+ repayAmount: bigint;
420
+ /** Repay amount clamped to [0, currentDebt]. */
421
+ effectiveRepayAmount: bigint;
422
+ currentDebt: bigint;
423
+ remainingDebt: bigint;
424
+ minBorrow: bigint;
425
+ violatesRemainingMinBorrow: boolean;
426
+ };
427
+ /**
428
+ * UI/helper preview for a proposed repayment amount.
429
+ *
430
+ * Notes:
431
+ * - Core enforces MIN_BORROW_DURATION (time-based) but borrowTimestamp isn't exposed, so we
432
+ * cannot fully preview that rule without offchain tracking.
433
+ * - Core enforces remaining debt is either 0 or >= MIN_BORROW.
434
+ */
435
+ export declare function previewRepay(params: {
436
+ core: {
437
+ read: {
438
+ getDebt: (args: readonly [Address]) => Promise<bigint>;
439
+ MIN_BORROW: () => Promise<bigint>;
440
+ };
441
+ };
442
+ user: Address;
443
+ repayAmount: bigint;
444
+ }): Promise<PreviewRepay>;
382
445
  /**
383
446
  * A small convenience bundle for frontends/backends.
384
447
  */
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/views/core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAGF,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,iBAAiB,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;SACnE,CAAC;KACH,CAAC;IACF,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAyB/B;AAED;;GAEG;AAEH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE;IAC9C,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,eAAe,EAAE,MAAM,OAAO,CAAC,OA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IACjD,IAAI,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC3B,MAAM,EAAE;QAAE,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;KAAE,CAAC;IACnD,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA8E9B"}
@@ -412,6 +412,75 @@ export async function readManyLiquidationBonusBps(params) {
412
412
  }
413
413
  return out;
414
414
  }
415
+ /**
416
+ * UI/helper preview for a proposed borrow amount.
417
+ *
418
+ * This is computed from existing view calls (there is no on-chain `previewBorrow`).
419
+ */
420
+ export async function previewBorrow(params) {
421
+ const limits = await readBorrowLimits({ core: params.core, user: params.user });
422
+ const maxBorrowByCollateral = limits.maxBorrow;
423
+ const canBorrowByCollateral = params.borrowAmount <= maxBorrowByCollateral;
424
+ const currentDebt = limits.debt;
425
+ const newDebt = currentDebt + params.borrowAmount;
426
+ // Use the collateralValue we already read. Note: healthFactor is floor-div in contracts.
427
+ const currentHealthFactor = limits.healthFactor;
428
+ const newHealthFactor = newDebt === 0n
429
+ ? 2n ** 256n - 1n
430
+ : (limits.collateralValue * 1000000000000000000n) / newDebt;
431
+ if (!params.pool) {
432
+ return {
433
+ user: params.user,
434
+ borrowAmount: params.borrowAmount,
435
+ maxBorrowByCollateral,
436
+ canBorrowByCollateral,
437
+ currentDebt,
438
+ newDebt,
439
+ currentHealthFactor,
440
+ newHealthFactor,
441
+ };
442
+ }
443
+ const maxBorrowByPool = await params.pool.read.maxBorrow();
444
+ const canBorrowByPool = params.borrowAmount <= maxBorrowByPool;
445
+ return {
446
+ user: params.user,
447
+ borrowAmount: params.borrowAmount,
448
+ maxBorrowByCollateral,
449
+ maxBorrowByPool,
450
+ canBorrowByCollateral,
451
+ canBorrowByPool,
452
+ currentDebt,
453
+ newDebt,
454
+ currentHealthFactor,
455
+ newHealthFactor,
456
+ };
457
+ }
458
+ /**
459
+ * UI/helper preview for a proposed repayment amount.
460
+ *
461
+ * Notes:
462
+ * - Core enforces MIN_BORROW_DURATION (time-based) but borrowTimestamp isn't exposed, so we
463
+ * cannot fully preview that rule without offchain tracking.
464
+ * - Core enforces remaining debt is either 0 or >= MIN_BORROW.
465
+ */
466
+ export async function previewRepay(params) {
467
+ const [currentDebt, minBorrow] = await Promise.all([
468
+ params.core.read.getDebt([params.user]),
469
+ params.core.read.MIN_BORROW(),
470
+ ]);
471
+ const effectiveRepayAmount = params.repayAmount > currentDebt ? currentDebt : params.repayAmount;
472
+ const remainingDebt = currentDebt > effectiveRepayAmount ? currentDebt - effectiveRepayAmount : 0n;
473
+ const violatesRemainingMinBorrow = remainingDebt > 0n && remainingDebt < minBorrow;
474
+ return {
475
+ user: params.user,
476
+ repayAmount: params.repayAmount,
477
+ effectiveRepayAmount,
478
+ currentDebt,
479
+ remainingDebt,
480
+ minBorrow,
481
+ violatesRemainingMinBorrow,
482
+ };
483
+ }
415
484
  /**
416
485
  * A small convenience bundle for frontends/backends.
417
486
  */
@@ -16,6 +16,82 @@ export type ReadLiquidatorBasics = {
16
16
  export declare function readLiquidatorBasics(params: {
17
17
  liquidator: LiquidatorLike;
18
18
  }): Promise<ReadLiquidatorBasics>;
19
+ type CanLiquidateLike = {
20
+ read: {
21
+ canLiquidate: (args: readonly [Address]) => Promise<unknown>;
22
+ };
23
+ };
24
+ export type ReadCanLiquidate = {
25
+ user: Address;
26
+ canLiquidate: boolean;
27
+ healthFactor: bigint;
28
+ currentBonus: bigint;
29
+ };
30
+ /**
31
+ * Normalized wrapper over `*.canLiquidate(user)`.
32
+ */
33
+ export declare function readCanLiquidate(params: {
34
+ liquidator: CanLiquidateLike;
35
+ user: Address;
36
+ }): Promise<ReadCanLiquidate>;
37
+ type PreviewLiquidationLike = {
38
+ read: {
39
+ previewLiquidation: (args: readonly [Address, bigint, bigint]) => Promise<unknown>;
40
+ };
41
+ };
42
+ export type ReadPreviewLiquidation = {
43
+ user: Address;
44
+ positionId: bigint;
45
+ debtToCover: bigint;
46
+ debtToLiquidate: bigint;
47
+ collateralToSeize: bigint;
48
+ bonusAmount: bigint;
49
+ protocolFeeAmount: bigint;
50
+ liquidatorProfitMerge: bigint;
51
+ };
52
+ /**
53
+ * Normalized wrapper over `*.previewLiquidation(user, positionId, debtToCover)`.
54
+ */
55
+ export declare function readPreviewLiquidation(params: {
56
+ liquidator: PreviewLiquidationLike;
57
+ user: Address;
58
+ positionId: bigint;
59
+ debtToCover: bigint;
60
+ }): Promise<ReadPreviewLiquidation>;
61
+ type CalculateLiquidationBonusLike = {
62
+ read: {
63
+ calculateLiquidationBonus: (args: readonly [bigint]) => Promise<bigint>;
64
+ };
65
+ };
66
+ /**
67
+ * Thin wrapper over `*.calculateLiquidationBonus(healthFactor)`.
68
+ */
69
+ export declare function readCalculateLiquidationBonus(params: {
70
+ liquidator: CalculateLiquidationBonusLike;
71
+ healthFactor: bigint;
72
+ }): Promise<{
73
+ healthFactor: bigint;
74
+ bonusBps: bigint;
75
+ }>;
76
+ type CheckBadDebtLike = {
77
+ read: {
78
+ checkBadDebt: (args: readonly [Address]) => Promise<unknown>;
79
+ };
80
+ };
81
+ export type ReadBadDebtStatus = {
82
+ user: Address;
83
+ hasBadDebt: boolean;
84
+ collateralValue: bigint;
85
+ debtValue: bigint;
86
+ shortfall: bigint;
87
+ };
88
+ /**
89
+ * Normalized wrapper over `VarlaLiquidator.checkBadDebt(user)`.
90
+ */
91
+ export declare function readBadDebtStatus(params: {
92
+ liquidator: CheckBadDebtLike;
93
+ user: Address;
94
+ }): Promise<ReadBadDebtStatus>;
19
95
  type MergeLiquidatorLike = LiquidatorLike & {
20
96
  read: LiquidatorLike["read"] & {
21
97
  marketAdapter: () => Promise<Address>;
@@ -1 +1 @@
1
- {"version":3,"file":"liquidators.d.ts","sourceRoot":"","sources":["../../src/views/liquidators.ts"],"names":[],"mappings":"AAEA,O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KAC9D,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AAEH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE;IAC9C,UAAU,EAAE,gBAAgB,CAAC;IAC7B,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAmB7B;AAED,KAAK,mBAAmB,GAAG,cAAc,GAAG;IAC1C,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG;QAC7B,aAAa,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;KACvC,CAAC;CACH,CAAC;AAGF,wBAAsB,yBAAyB,CAAC,MAAM,EAAE;IACtD,UAAU,EAAE,mBAAmB,CAAC;CACjC,GAAG,OAAO,CAAC,oBAAoB,GAAG;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,CAAC,CAI7D;AAED,KAAK,qBAAqB,GAAG,cAAc,GAAG;IAC5C,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG;QAC7B,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;KACxC,CAAC;CACH,CAAC;AAGF,wBAAsB,2BAA2B,CAAC,MAAM,EAAE;IACxD,UAAU,EAAE,qBAAqB,CAAC;CACnC,GAAG,OAAO,CAAC,oBAAoB,GAAG;IAAE,cAAc,EAAE,OAAO,CAAA;CAAE,CAAC,CAI9D"}
@@ -9,6 +9,84 @@ export async function readLiquidatorBasics(params) {
9
9
  ]);
10
10
  return { core, treasury, collateralToken, positionsToken };
11
11
  }
12
+ /**
13
+ * Normalized wrapper over `*.canLiquidate(user)`.
14
+ */
15
+ // wraps: VarlaLiquidator.canLiquidate,VarlaMergeLiquidator.canLiquidate,VarlaConvertLiquidator.canLiquidate
16
+ export async function readCanLiquidate(params) {
17
+ const raw = await params.liquidator.read.canLiquidate([params.user]);
18
+ const r = raw;
19
+ const canLiquidate = r.canLiquidate_ ?? r.canLiquidate ?? r[0];
20
+ const healthFactor = r.healthFactor ?? r[1];
21
+ const currentBonus = r.currentBonus ?? r[2];
22
+ if (typeof canLiquidate !== "boolean" ||
23
+ typeof healthFactor !== "bigint" ||
24
+ typeof currentBonus !== "bigint") {
25
+ throw new Error("Unexpected canLiquidate() return shape");
26
+ }
27
+ return { user: params.user, canLiquidate, healthFactor, currentBonus };
28
+ }
29
+ /**
30
+ * Normalized wrapper over `*.previewLiquidation(user, positionId, debtToCover)`.
31
+ */
32
+ // wraps: VarlaLiquidator.previewLiquidation,VarlaMergeLiquidator.previewLiquidation,VarlaConvertLiquidator.previewLiquidation
33
+ export async function readPreviewLiquidation(params) {
34
+ const raw = await params.liquidator.read.previewLiquidation([
35
+ params.user,
36
+ params.positionId,
37
+ params.debtToCover,
38
+ ]);
39
+ const r = raw;
40
+ const debtToLiquidate = r.debtToLiquidate ?? r[0];
41
+ const collateralToSeize = r.collateralToSeize ?? r[1];
42
+ const bonusAmount = r.bonusAmount ?? r[2];
43
+ const protocolFeeAmount = r.protocolFeeAmount ?? r[3];
44
+ const liquidatorProfitMerge = r.liquidatorProfitMerge ?? r[4];
45
+ if (typeof debtToLiquidate !== "bigint" ||
46
+ typeof collateralToSeize !== "bigint" ||
47
+ typeof bonusAmount !== "bigint" ||
48
+ typeof protocolFeeAmount !== "bigint" ||
49
+ typeof liquidatorProfitMerge !== "bigint") {
50
+ throw new Error("Unexpected previewLiquidation() return shape");
51
+ }
52
+ return {
53
+ user: params.user,
54
+ positionId: params.positionId,
55
+ debtToCover: params.debtToCover,
56
+ debtToLiquidate,
57
+ collateralToSeize,
58
+ bonusAmount,
59
+ protocolFeeAmount,
60
+ liquidatorProfitMerge,
61
+ };
62
+ }
63
+ /**
64
+ * Thin wrapper over `*.calculateLiquidationBonus(healthFactor)`.
65
+ */
66
+ // wraps: VarlaLiquidator.calculateLiquidationBonus,VarlaMergeLiquidator.calculateLiquidationBonus,VarlaConvertLiquidator.calculateLiquidationBonus
67
+ export async function readCalculateLiquidationBonus(params) {
68
+ const bonusBps = await params.liquidator.read.calculateLiquidationBonus([params.healthFactor]);
69
+ return { healthFactor: params.healthFactor, bonusBps };
70
+ }
71
+ /**
72
+ * Normalized wrapper over `VarlaLiquidator.checkBadDebt(user)`.
73
+ */
74
+ // wraps: VarlaLiquidator.checkBadDebt
75
+ export async function readBadDebtStatus(params) {
76
+ const raw = await params.liquidator.read.checkBadDebt([params.user]);
77
+ const r = raw;
78
+ const hasBadDebt = r.hasBadDebt ?? r[0];
79
+ const collateralValue = r.collateralValue ?? r[1];
80
+ const debtValue = r.debtValue ?? r[2];
81
+ const shortfall = r.shortfall ?? r[3];
82
+ if (typeof hasBadDebt !== "boolean" ||
83
+ typeof collateralValue !== "bigint" ||
84
+ typeof debtValue !== "bigint" ||
85
+ typeof shortfall !== "bigint") {
86
+ throw new Error("Unexpected checkBadDebt() return shape");
87
+ }
88
+ return { user: params.user, hasBadDebt, collateralValue, debtValue, shortfall };
89
+ }
12
90
  // wraps: VarlaMergeLiquidator.core,VarlaMergeLiquidator.treasury,VarlaMergeLiquidator.collateralToken,VarlaMergeLiquidator.positionsToken,VarlaMergeLiquidator.marketAdapter
13
91
  export async function readMergeLiquidatorBasics(params) {
14
92
  const base = await readLiquidatorBasics(params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varla/sdk",
3
- "version": "1.10.0",
3
+ "version": "1.10.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,