@defisaver/positions-sdk 0.0.30-dev → 0.0.32

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 (99) hide show
  1. package/cjs/compoundV3/index.js +1 -1
  2. package/cjs/config/contracts.d.ts +285 -1037
  3. package/cjs/config/contracts.js +58 -171
  4. package/cjs/constants/index.d.ts +2 -0
  5. package/cjs/constants/index.js +3 -1
  6. package/cjs/contracts.d.ts +2 -0
  7. package/cjs/contracts.js +13 -5
  8. package/cjs/curveUsd/index.js +1 -1
  9. package/cjs/helpers/curveUsdHelpers/index.d.ts +1 -2
  10. package/cjs/helpers/curveUsdHelpers/index.js +17 -25
  11. package/cjs/helpers/index.d.ts +1 -0
  12. package/cjs/helpers/index.js +2 -1
  13. package/cjs/helpers/morphoBlueHelpers/index.d.ts +7 -0
  14. package/cjs/helpers/morphoBlueHelpers/index.js +41 -0
  15. package/cjs/index.d.ts +2 -1
  16. package/cjs/index.js +3 -1
  17. package/cjs/markets/index.d.ts +1 -0
  18. package/cjs/markets/index.js +3 -1
  19. package/cjs/markets/morphoBlue/index.d.ts +6 -0
  20. package/cjs/markets/morphoBlue/index.js +24 -0
  21. package/cjs/moneymarket/moneymarketCommonService.js +1 -1
  22. package/cjs/morphoBlue/index.d.ts +5 -0
  23. package/cjs/morphoBlue/index.js +153 -0
  24. package/cjs/services/utils.d.ts +0 -4
  25. package/cjs/services/utils.js +1 -13
  26. package/cjs/types/common.d.ts +1 -1
  27. package/cjs/types/contracts/generated/CrvUSDView.d.ts +4 -30
  28. package/cjs/types/contracts/generated/FeedRegistry.d.ts +182 -0
  29. package/cjs/types/contracts/generated/FeedRegistry.js +5 -0
  30. package/cjs/types/contracts/generated/MorphoBlueView.d.ts +122 -0
  31. package/cjs/types/contracts/generated/MorphoBlueView.js +5 -0
  32. package/cjs/types/contracts/generated/index.d.ts +2 -0
  33. package/cjs/types/curveUsd.d.ts +0 -6
  34. package/cjs/types/index.d.ts +1 -0
  35. package/cjs/types/index.js +1 -0
  36. package/cjs/types/morphoBlue.d.ts +74 -0
  37. package/cjs/types/morphoBlue.js +7 -0
  38. package/esm/compoundV3/index.js +1 -1
  39. package/esm/config/contracts.d.ts +285 -1037
  40. package/esm/config/contracts.js +58 -171
  41. package/esm/constants/index.d.ts +2 -0
  42. package/esm/constants/index.js +2 -0
  43. package/esm/contracts.d.ts +2 -0
  44. package/esm/contracts.js +12 -4
  45. package/esm/curveUsd/index.js +1 -1
  46. package/esm/helpers/curveUsdHelpers/index.d.ts +1 -2
  47. package/esm/helpers/curveUsdHelpers/index.js +18 -26
  48. package/esm/helpers/index.d.ts +1 -0
  49. package/esm/helpers/index.js +1 -0
  50. package/esm/helpers/morphoBlueHelpers/index.d.ts +7 -0
  51. package/esm/helpers/morphoBlueHelpers/index.js +34 -0
  52. package/esm/index.d.ts +2 -1
  53. package/esm/index.js +2 -1
  54. package/esm/markets/index.d.ts +1 -0
  55. package/esm/markets/index.js +1 -0
  56. package/esm/markets/morphoBlue/index.d.ts +6 -0
  57. package/esm/markets/morphoBlue/index.js +19 -0
  58. package/esm/moneymarket/moneymarketCommonService.js +1 -1
  59. package/esm/morphoBlue/index.d.ts +5 -0
  60. package/esm/morphoBlue/index.js +145 -0
  61. package/esm/services/utils.d.ts +0 -4
  62. package/esm/services/utils.js +0 -11
  63. package/esm/types/common.d.ts +1 -1
  64. package/esm/types/contracts/generated/CrvUSDView.d.ts +4 -30
  65. package/esm/types/contracts/generated/FeedRegistry.d.ts +182 -0
  66. package/esm/types/contracts/generated/FeedRegistry.js +4 -0
  67. package/esm/types/contracts/generated/MorphoBlueView.d.ts +122 -0
  68. package/esm/types/contracts/generated/MorphoBlueView.js +4 -0
  69. package/esm/types/contracts/generated/index.d.ts +2 -0
  70. package/esm/types/curveUsd.d.ts +0 -6
  71. package/esm/types/index.d.ts +1 -0
  72. package/esm/types/index.js +1 -0
  73. package/esm/types/morphoBlue.d.ts +74 -0
  74. package/esm/types/morphoBlue.js +4 -0
  75. package/package.json +1 -1
  76. package/src/compoundV3/index.ts +1 -1
  77. package/src/config/contracts.js +58 -171
  78. package/src/constants/index.ts +3 -1
  79. package/src/contracts.ts +16 -6
  80. package/src/curveUsd/index.ts +1 -1
  81. package/src/helpers/curveUsdHelpers/index.ts +20 -28
  82. package/src/helpers/index.ts +2 -1
  83. package/src/helpers/morphoBlueHelpers/index.ts +47 -0
  84. package/src/index.ts +2 -0
  85. package/src/markets/index.ts +2 -1
  86. package/src/markets/morphoBlue/index.ts +21 -0
  87. package/src/moneymarket/moneymarketCommonService.ts +1 -1
  88. package/src/morphoBlue/index.ts +166 -0
  89. package/src/services/utils.ts +1 -14
  90. package/src/types/common.ts +1 -1
  91. package/src/types/contracts/generated/CrvUSDView.ts +8 -43
  92. package/src/types/contracts/generated/FeedRegistry.ts +337 -0
  93. package/src/types/contracts/generated/MorphoBlueView.ts +171 -0
  94. package/src/types/contracts/generated/index.ts +2 -0
  95. package/src/types/curveUsd.ts +0 -6
  96. package/src/types/index.ts +2 -1
  97. package/src/types/morphoBlue.ts +80 -0
  98. package/src/morpho/markets.ts +0 -39
  99. package/yarn-error.log +0 -64
@@ -0,0 +1,182 @@
1
+ /// <reference types="node" />
2
+ import type BN from "bn.js";
3
+ import type { ContractOptions } from "web3-eth-contract";
4
+ import type { EventLog } from "web3-core";
5
+ import type { EventEmitter } from "events";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
7
+ export interface EventOptions {
8
+ filter?: object;
9
+ fromBlock?: BlockType;
10
+ topics?: string[];
11
+ }
12
+ export declare namespace FeedRegistryInterface {
13
+ type PhaseStruct = [number | string | BN, number | string | BN, number | string | BN] | {
14
+ phaseId: number | string | BN;
15
+ startingAggregatorRoundId: number | string | BN;
16
+ endingAggregatorRoundId: number | string | BN;
17
+ };
18
+ type PhaseStructOutputArray = [string, string, string];
19
+ type PhaseStructOutputStruct = {
20
+ phaseId: string;
21
+ startingAggregatorRoundId: string;
22
+ endingAggregatorRoundId: string;
23
+ };
24
+ type PhaseStructOutput = PhaseStructOutputArray & PhaseStructOutputStruct;
25
+ }
26
+ export type AccessControllerSet = ContractEventLog<{
27
+ accessController: string;
28
+ sender: string;
29
+ 0: string;
30
+ 1: string;
31
+ }>;
32
+ export type FeedConfirmed = ContractEventLog<{
33
+ asset: string;
34
+ denomination: string;
35
+ latestAggregator: string;
36
+ previousAggregator: string;
37
+ nextPhaseId: string;
38
+ sender: string;
39
+ 0: string;
40
+ 1: string;
41
+ 2: string;
42
+ 3: string;
43
+ 4: string;
44
+ 5: string;
45
+ }>;
46
+ export type FeedProposed = ContractEventLog<{
47
+ asset: string;
48
+ denomination: string;
49
+ proposedAggregator: string;
50
+ currentAggregator: string;
51
+ sender: string;
52
+ 0: string;
53
+ 1: string;
54
+ 2: string;
55
+ 3: string;
56
+ 4: string;
57
+ }>;
58
+ export type OwnershipTransferRequested = ContractEventLog<{
59
+ from: string;
60
+ to: string;
61
+ 0: string;
62
+ 1: string;
63
+ }>;
64
+ export type OwnershipTransferred = ContractEventLog<{
65
+ from: string;
66
+ to: string;
67
+ 0: string;
68
+ 1: string;
69
+ }>;
70
+ export interface FeedRegistry extends BaseContract {
71
+ constructor(jsonInterface: any[], address?: string, options?: ContractOptions): FeedRegistry;
72
+ clone(): FeedRegistry;
73
+ methods: {
74
+ acceptOwnership(): NonPayableTransactionObject<void>;
75
+ confirmFeed(base: string, quote: string, aggregator: string): NonPayableTransactionObject<void>;
76
+ decimals(base: string, quote: string): NonPayableTransactionObject<string>;
77
+ description(base: string, quote: string): NonPayableTransactionObject<string>;
78
+ getAccessController(): NonPayableTransactionObject<string>;
79
+ getAnswer(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
80
+ getCurrentPhaseId(base: string, quote: string): NonPayableTransactionObject<string>;
81
+ getFeed(base: string, quote: string): NonPayableTransactionObject<string>;
82
+ getNextRoundId(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
83
+ getPhase(base: string, quote: string, phaseId: number | string | BN): NonPayableTransactionObject<FeedRegistryInterface.PhaseStructOutput>;
84
+ getPhaseFeed(base: string, quote: string, phaseId: number | string | BN): NonPayableTransactionObject<string>;
85
+ getPhaseRange(base: string, quote: string, phaseId: number | string | BN): NonPayableTransactionObject<[
86
+ string,
87
+ string
88
+ ] & {
89
+ startingRoundId: string;
90
+ endingRoundId: string;
91
+ }>;
92
+ getPreviousRoundId(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
93
+ getProposedFeed(base: string, quote: string): NonPayableTransactionObject<string>;
94
+ getRoundData(base: string, quote: string, _roundId: number | string | BN): NonPayableTransactionObject<[
95
+ string,
96
+ string,
97
+ string,
98
+ string,
99
+ string
100
+ ] & {
101
+ roundId: string;
102
+ answer: string;
103
+ startedAt: string;
104
+ updatedAt: string;
105
+ answeredInRound: string;
106
+ }>;
107
+ getRoundFeed(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
108
+ getTimestamp(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<string>;
109
+ isFeedEnabled(aggregator: string): NonPayableTransactionObject<boolean>;
110
+ latestAnswer(base: string, quote: string): NonPayableTransactionObject<string>;
111
+ latestRound(base: string, quote: string): NonPayableTransactionObject<string>;
112
+ latestRoundData(base: string, quote: string): NonPayableTransactionObject<[
113
+ string,
114
+ string,
115
+ string,
116
+ string,
117
+ string
118
+ ] & {
119
+ roundId: string;
120
+ answer: string;
121
+ startedAt: string;
122
+ updatedAt: string;
123
+ answeredInRound: string;
124
+ }>;
125
+ latestTimestamp(base: string, quote: string): NonPayableTransactionObject<string>;
126
+ owner(): NonPayableTransactionObject<string>;
127
+ proposeFeed(base: string, quote: string, aggregator: string): NonPayableTransactionObject<void>;
128
+ proposedGetRoundData(base: string, quote: string, roundId: number | string | BN): NonPayableTransactionObject<[
129
+ string,
130
+ string,
131
+ string,
132
+ string,
133
+ string
134
+ ] & {
135
+ id: string;
136
+ answer: string;
137
+ startedAt: string;
138
+ updatedAt: string;
139
+ answeredInRound: string;
140
+ }>;
141
+ proposedLatestRoundData(base: string, quote: string): NonPayableTransactionObject<[
142
+ string,
143
+ string,
144
+ string,
145
+ string,
146
+ string
147
+ ] & {
148
+ id: string;
149
+ answer: string;
150
+ startedAt: string;
151
+ updatedAt: string;
152
+ answeredInRound: string;
153
+ }>;
154
+ setAccessController(_accessController: string): NonPayableTransactionObject<void>;
155
+ transferOwnership(to: string): NonPayableTransactionObject<void>;
156
+ typeAndVersion(): NonPayableTransactionObject<string>;
157
+ version(base: string, quote: string): NonPayableTransactionObject<string>;
158
+ };
159
+ events: {
160
+ AccessControllerSet(cb?: Callback<AccessControllerSet>): EventEmitter;
161
+ AccessControllerSet(options?: EventOptions, cb?: Callback<AccessControllerSet>): EventEmitter;
162
+ FeedConfirmed(cb?: Callback<FeedConfirmed>): EventEmitter;
163
+ FeedConfirmed(options?: EventOptions, cb?: Callback<FeedConfirmed>): EventEmitter;
164
+ FeedProposed(cb?: Callback<FeedProposed>): EventEmitter;
165
+ FeedProposed(options?: EventOptions, cb?: Callback<FeedProposed>): EventEmitter;
166
+ OwnershipTransferRequested(cb?: Callback<OwnershipTransferRequested>): EventEmitter;
167
+ OwnershipTransferRequested(options?: EventOptions, cb?: Callback<OwnershipTransferRequested>): EventEmitter;
168
+ OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
169
+ OwnershipTransferred(options?: EventOptions, cb?: Callback<OwnershipTransferred>): EventEmitter;
170
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
171
+ };
172
+ once(event: "AccessControllerSet", cb: Callback<AccessControllerSet>): void;
173
+ once(event: "AccessControllerSet", options: EventOptions, cb: Callback<AccessControllerSet>): void;
174
+ once(event: "FeedConfirmed", cb: Callback<FeedConfirmed>): void;
175
+ once(event: "FeedConfirmed", options: EventOptions, cb: Callback<FeedConfirmed>): void;
176
+ once(event: "FeedProposed", cb: Callback<FeedProposed>): void;
177
+ once(event: "FeedProposed", options: EventOptions, cb: Callback<FeedProposed>): void;
178
+ once(event: "OwnershipTransferRequested", cb: Callback<OwnershipTransferRequested>): void;
179
+ once(event: "OwnershipTransferRequested", options: EventOptions, cb: Callback<OwnershipTransferRequested>): void;
180
+ once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
181
+ once(event: "OwnershipTransferred", options: EventOptions, cb: Callback<OwnershipTransferred>): void;
182
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,122 @@
1
+ /// <reference types="node" />
2
+ import type BN from "bn.js";
3
+ import type { ContractOptions } from "web3-eth-contract";
4
+ import type { EventLog } from "web3-core";
5
+ import type { EventEmitter } from "events";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "./types";
7
+ export interface EventOptions {
8
+ filter?: object;
9
+ fromBlock?: BlockType;
10
+ topics?: string[];
11
+ }
12
+ export type MarketParamsStruct = [string, string, string, string, number | string | BN] | {
13
+ loanToken: string;
14
+ collateralToken: string;
15
+ oracle: string;
16
+ irm: string;
17
+ lltv: number | string | BN;
18
+ };
19
+ export type MarketParamsStructOutputArray = [
20
+ string,
21
+ string,
22
+ string,
23
+ string,
24
+ string
25
+ ];
26
+ export type MarketParamsStructOutputStruct = {
27
+ loanToken: string;
28
+ collateralToken: string;
29
+ oracle: string;
30
+ irm: string;
31
+ lltv: string;
32
+ };
33
+ export type MarketParamsStructOutput = MarketParamsStructOutputArray & MarketParamsStructOutputStruct;
34
+ export declare namespace MorphoBlueView {
35
+ type MarketInfoStruct = [
36
+ string | number[],
37
+ number | string | BN,
38
+ number | string | BN,
39
+ number | string | BN,
40
+ number | string | BN,
41
+ number | string | BN,
42
+ number | string | BN,
43
+ number | string | BN,
44
+ number | string | BN
45
+ ] | {
46
+ id: string | number[];
47
+ totalSupplyAssets: number | string | BN;
48
+ totalSupplyShares: number | string | BN;
49
+ totalBorrowAssets: number | string | BN;
50
+ totalBorrowShares: number | string | BN;
51
+ lastUpdate: number | string | BN;
52
+ fee: number | string | BN;
53
+ borrowRate: number | string | BN;
54
+ oracle: number | string | BN;
55
+ };
56
+ type MarketInfoStructOutputArray = [
57
+ string,
58
+ string,
59
+ string,
60
+ string,
61
+ string,
62
+ string,
63
+ string,
64
+ string,
65
+ string
66
+ ];
67
+ type MarketInfoStructOutputStruct = {
68
+ id: string;
69
+ totalSupplyAssets: string;
70
+ totalSupplyShares: string;
71
+ totalBorrowAssets: string;
72
+ totalBorrowShares: string;
73
+ lastUpdate: string;
74
+ fee: string;
75
+ borrowRate: string;
76
+ oracle: string;
77
+ };
78
+ type MarketInfoStructOutput = MarketInfoStructOutputArray & MarketInfoStructOutputStruct;
79
+ type PositionInfoStruct = [
80
+ number | string | BN,
81
+ number | string | BN,
82
+ number | string | BN,
83
+ number | string | BN,
84
+ number | string | BN
85
+ ] | {
86
+ supplyShares: number | string | BN;
87
+ suppliedInAssets: number | string | BN;
88
+ borrowShares: number | string | BN;
89
+ borrowedInAssets: number | string | BN;
90
+ collateral: number | string | BN;
91
+ };
92
+ type PositionInfoStructOutputArray = [
93
+ string,
94
+ string,
95
+ string,
96
+ string,
97
+ string
98
+ ];
99
+ type PositionInfoStructOutputStruct = {
100
+ supplyShares: string;
101
+ suppliedInAssets: string;
102
+ borrowShares: string;
103
+ borrowedInAssets: string;
104
+ collateral: string;
105
+ };
106
+ type PositionInfoStructOutput = PositionInfoStructOutputArray & PositionInfoStructOutputStruct;
107
+ }
108
+ export interface MorphoBlueView extends BaseContract {
109
+ constructor(jsonInterface: any[], address?: string, options?: ContractOptions): MorphoBlueView;
110
+ clone(): MorphoBlueView;
111
+ methods: {
112
+ MORPHO_BLUE_ADDRESS(): NonPayableTransactionObject<string>;
113
+ getMarketId(marketParams: MarketParamsStruct): NonPayableTransactionObject<string>;
114
+ getMarketInfo(marketParams: MarketParamsStruct): NonPayableTransactionObject<MorphoBlueView.MarketInfoStructOutput>;
115
+ getMarketInfoNotTuple(loanToken: string, collToken: string, oracle: string, irm: string, lltv: number | string | BN): NonPayableTransactionObject<MorphoBlueView.MarketInfoStructOutput>;
116
+ getUserInfo(marketParams: MarketParamsStruct, owner: string): NonPayableTransactionObject<MorphoBlueView.PositionInfoStructOutput>;
117
+ morphoBlue(): NonPayableTransactionObject<string>;
118
+ };
119
+ events: {
120
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
121
+ };
122
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -21,6 +21,7 @@ export type { CompoundLoanInfo } from "./CompoundLoanInfo";
21
21
  export type { Comptroller } from "./Comptroller";
22
22
  export type { ETHPriceFeed } from "./ETHPriceFeed";
23
23
  export type { Erc20 } from "./Erc20";
24
+ export type { FeedRegistry } from "./FeedRegistry";
24
25
  export type { GHO } from "./GHO";
25
26
  export type { GhoDiscountRateStrategy } from "./GhoDiscountRateStrategy";
26
27
  export type { IAToken } from "./IAToken";
@@ -37,6 +38,7 @@ export type { McdView } from "./McdView";
37
38
  export type { MorphoAaveV2Proxy } from "./MorphoAaveV2Proxy";
38
39
  export type { MorphoAaveV2View } from "./MorphoAaveV2View";
39
40
  export type { MorphoAaveV3ProxyEthMarket } from "./MorphoAaveV3ProxyEthMarket";
41
+ export type { MorphoBlueView } from "./MorphoBlueView";
40
42
  export type { Pot } from "./Pot";
41
43
  export type { PriceFeed } from "./PriceFeed";
42
44
  export type { REth } from "./REth";
@@ -67,12 +67,6 @@ export interface CrvUSDAggregatedPositionData {
67
67
  borrowedUsd: string;
68
68
  borrowed: string;
69
69
  safetyRatio: string;
70
- borrowLimitUsd: string;
71
- minAllowedRatio: number;
72
- collFactor: string;
73
- leveragedType: string;
74
- leveragedAsset?: string;
75
- liquidationPrice?: string;
76
70
  }
77
71
  export interface CrvUSDUsedAsset {
78
72
  isSupplied: boolean;
@@ -5,3 +5,4 @@ export * from './curveUsd';
5
5
  export * from './liquity';
6
6
  export * from './maker';
7
7
  export * from './chickenBonds';
8
+ export * from './morphoBlue';
@@ -21,3 +21,4 @@ __exportStar(require("./curveUsd"), exports);
21
21
  __exportStar(require("./liquity"), exports);
22
22
  __exportStar(require("./maker"), exports);
23
23
  __exportStar(require("./chickenBonds"), exports);
24
+ __exportStar(require("./morphoBlue"), exports);
@@ -0,0 +1,74 @@
1
+ import { MMUsedAssets, NetworkNumber } from './common';
2
+ export declare enum MorphoBlueVersions {
3
+ MorphoBlueWstEthEth = "morphobluewstetheth"
4
+ }
5
+ export interface MorphoBlueMarketData {
6
+ chainIds: NetworkNumber[];
7
+ label: string;
8
+ shortLabel: string;
9
+ url: string;
10
+ value: MorphoBlueVersions;
11
+ loanToken: string;
12
+ collateralToken: string;
13
+ oracle: string;
14
+ irm: string;
15
+ lltv: number | string;
16
+ protocolName: string;
17
+ }
18
+ export interface MorphoBlueAssetData {
19
+ symbol: string;
20
+ address: string;
21
+ price: string;
22
+ supplyRate: string;
23
+ borrowRate: string;
24
+ incentiveSupplyApy?: string;
25
+ incentiveSupplyToken?: string;
26
+ totalSupply?: string;
27
+ totalBorrow?: string;
28
+ }
29
+ export type MorphoBlueAssetsData = {
30
+ [key: string]: MorphoBlueAssetData;
31
+ };
32
+ export interface MorphoBlueMarketInfo {
33
+ id: string;
34
+ fee: string;
35
+ loanToken: string;
36
+ collateralToken: string;
37
+ utillization: string;
38
+ oracle: string;
39
+ lltv: string;
40
+ assetsData: MorphoBlueAssetsData;
41
+ }
42
+ export interface MorphoBlueAggregatedPositionData {
43
+ suppliedUsd: string;
44
+ suppliedCollateralUsd: string;
45
+ borrowedUsd: string;
46
+ borrowLimitUsd: string;
47
+ liquidationLimitUsd: string;
48
+ leftToBorrowUsd: string;
49
+ netApy: string;
50
+ incentiveUsd: string;
51
+ totalInterestUsd: string;
52
+ ltv: string;
53
+ leveragedType: string;
54
+ leveragedAsset?: string;
55
+ leveragedLsdAssetRatio?: string;
56
+ liquidationPrice?: string;
57
+ }
58
+ export interface MorphoBluePositionData {
59
+ usedAssets: MMUsedAssets;
60
+ suppliedUsd: string;
61
+ suppliedCollateralUsd: string;
62
+ borrowedUsd: string;
63
+ borrowLimitUsd: string;
64
+ liquidationLimitUsd: string;
65
+ leftToBorrowUsd: string;
66
+ netApy: string;
67
+ incentiveUsd: string;
68
+ totalInterestUsd: string;
69
+ ltv: string;
70
+ leveragedType: string;
71
+ leveragedAsset?: string;
72
+ leveragedLsdAssetRatio?: string;
73
+ liquidationPrice?: string;
74
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MorphoBlueVersions = void 0;
4
+ var MorphoBlueVersions;
5
+ (function (MorphoBlueVersions) {
6
+ MorphoBlueVersions["MorphoBlueWstEthEth"] = "morphobluewstetheth";
7
+ })(MorphoBlueVersions || (exports.MorphoBlueVersions = MorphoBlueVersions = {}));
@@ -169,7 +169,7 @@ export const getCompoundV3AccountData = (web3, network, address, proxyAddress, e
169
169
  if (loanData.depositAmount.toString() !== '0') {
170
170
  usedAssets[baseAssetSymbol].isSupplied = true;
171
171
  usedAssets[baseAssetSymbol].supplied = assetAmountInEth(loanData.depositAmount, baseAssetInfo.symbol);
172
- usedAssets[baseAssetSymbol].suppliedUsd = assetAmountInEth(loanData.depositValue, baseAssetInfo.symbol);
172
+ usedAssets[baseAssetSymbol].suppliedUsd = new Dec(assetAmountInEth(loanData.depositValue, baseAssetInfo.symbol)).mul(assetsData[baseAssetSymbol].price).toString();
173
173
  }
174
174
  if (loanData.borrowAmount.toString() !== '0') {
175
175
  usedAssets[baseAssetSymbol].isBorrowed = true;