@strkfarm/sdk 2.0.0-staging.7 → 2.0.0-staging.70
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/dist/index.browser.global.js +3117 -1030
- package/dist/index.browser.mjs +2806 -711
- package/dist/index.d.ts +345 -50
- package/dist/index.js +2901 -794
- package/dist/index.mjs +2809 -711
- package/package.json +4 -4
- package/src/data/universal-vault.abi.json +143 -27
- package/src/dataTypes/_bignumber.ts +5 -0
- package/src/dataTypes/bignumber.browser.ts +5 -0
- package/src/dataTypes/bignumber.node.ts +5 -0
- package/src/global.ts +53 -1
- package/src/interfaces/common.tsx +77 -27
- package/src/modules/avnu.ts +1 -1
- package/src/modules/erc20.ts +18 -2
- package/src/modules/index.ts +3 -1
- package/src/modules/pricer-avnu-api.ts +114 -0
- package/src/modules/pricer.ts +63 -45
- package/src/node/pricer-redis.ts +1 -0
- package/src/strategies/base-strategy.ts +153 -8
- package/src/strategies/constants.ts +2 -2
- package/src/strategies/ekubo-cl-vault.tsx +254 -91
- package/src/strategies/factory.ts +21 -1
- package/src/strategies/index.ts +2 -0
- package/src/strategies/registry.ts +15 -30
- package/src/strategies/sensei.ts +52 -13
- package/src/strategies/types.ts +4 -0
- package/src/strategies/universal-adapters/vesu-adapter.ts +46 -25
- package/src/strategies/universal-lst-muliplier-strategy.tsx +1461 -584
- package/src/strategies/universal-strategy.tsx +157 -81
- package/src/strategies/vesu-rebalance.tsx +22 -12
- package/src/strategies/yoloVault.ts +1081 -0
- package/src/utils/strategy-utils.ts +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
1
|
import * as starknet from 'starknet';
|
|
3
|
-
import { RpcProvider, BlockIdentifier, Contract,
|
|
2
|
+
import { Uint256, RpcProvider, BlockIdentifier, Contract, Call, Account, CairoCustomEnum, RawArgs } from 'starknet';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
4
|
import React, { ReactNode } from 'react';
|
|
5
5
|
import { Quote, AvnuOptions } from '@avnu/avnu-sdk';
|
|
6
6
|
import { HexString, BytesLike } from '@ericnordelo/strk-merkle-tree/dist/bytes';
|
|
@@ -31,10 +31,12 @@ declare class _Web3Number<T extends _Web3Number<T>> extends BigNumber {
|
|
|
31
31
|
mag: bigint;
|
|
32
32
|
sign: 0 | 1;
|
|
33
33
|
};
|
|
34
|
+
toUint256(): starknet.Uint256;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
declare class Web3Number extends _Web3Number<Web3Number> {
|
|
37
38
|
static fromWei(weiNumber: string | number, decimals: number): Web3Number;
|
|
39
|
+
static fromUint256(uint256Value: Uint256): Web3Number;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
/**
|
|
@@ -107,6 +109,7 @@ interface TokenInfo {
|
|
|
107
109
|
displayDecimals: number;
|
|
108
110
|
priceProxySymbol?: string;
|
|
109
111
|
priceCheckAmount?: number;
|
|
112
|
+
dontPrice?: boolean;
|
|
110
113
|
}
|
|
111
114
|
declare enum Network {
|
|
112
115
|
mainnet = "mainnet",
|
|
@@ -123,22 +126,22 @@ interface IProtocol {
|
|
|
123
126
|
name: string;
|
|
124
127
|
logo: string;
|
|
125
128
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
META_VAULTS = "meta-vaults"
|
|
129
|
+
interface ICurator {
|
|
130
|
+
name: string;
|
|
131
|
+
logo: string;
|
|
130
132
|
}
|
|
131
133
|
declare enum StrategyTag {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
VESU = "Vesu",
|
|
136
|
-
SENSEI = "Sensei",
|
|
137
|
-
ENDUR = "Endur",
|
|
134
|
+
META_VAULT = "Meta Vaults",
|
|
135
|
+
LEVERED = "Maxx",
|
|
136
|
+
AUTOMATED_LP = "Ekubo",
|
|
138
137
|
BTC = "BTC"
|
|
139
138
|
}
|
|
140
139
|
declare enum VaultType {
|
|
141
|
-
|
|
140
|
+
LOOPING = "Looping",
|
|
141
|
+
META_VAULT = "Meta Vault",
|
|
142
|
+
DELTA_NEUTRAL = "Delta Neutral",
|
|
143
|
+
AUTOMATED_LP = "Automated LP",
|
|
144
|
+
TVA = "Troves Value Averaging"
|
|
142
145
|
}
|
|
143
146
|
declare enum AuditStatus {
|
|
144
147
|
AUDITED = "Audited",
|
|
@@ -150,7 +153,8 @@ declare enum SourceCodeType {
|
|
|
150
153
|
}
|
|
151
154
|
declare enum AccessControlType {
|
|
152
155
|
MULTISIG_ACCOUNT = "Multisig Account",
|
|
153
|
-
STANDARD_ACCOUNT = "Standard Account"
|
|
156
|
+
STANDARD_ACCOUNT = "Standard Account",
|
|
157
|
+
ROLE_BASED_ACCESS = "Role Based Access"
|
|
154
158
|
}
|
|
155
159
|
declare enum InstantWithdrawalVault {
|
|
156
160
|
YES = "Yes",
|
|
@@ -163,21 +167,20 @@ interface SourceCodeInfo {
|
|
|
163
167
|
interface AccessControlInfo {
|
|
164
168
|
type: AccessControlType;
|
|
165
169
|
addresses: ContractAddr[];
|
|
166
|
-
timeLock
|
|
170
|
+
timeLock?: string;
|
|
167
171
|
}
|
|
168
172
|
interface SecurityMetadata {
|
|
169
173
|
auditStatus: AuditStatus;
|
|
170
174
|
sourceCode: SourceCodeInfo;
|
|
171
175
|
accessControl: AccessControlInfo;
|
|
172
176
|
}
|
|
173
|
-
interface RedemptionExpectedTime {
|
|
174
|
-
upto1M: string;
|
|
175
|
-
upto10M: string;
|
|
176
|
-
above10M: string;
|
|
177
|
-
}
|
|
178
177
|
interface RedemptionInfo {
|
|
179
178
|
instantWithdrawalVault: InstantWithdrawalVault;
|
|
180
|
-
|
|
179
|
+
redemptionsInfo: {
|
|
180
|
+
title: string;
|
|
181
|
+
description: string;
|
|
182
|
+
}[];
|
|
183
|
+
alerts: StrategyAlert[];
|
|
181
184
|
}
|
|
182
185
|
declare enum FlowChartColors {
|
|
183
186
|
Green = "purple",
|
|
@@ -192,7 +195,8 @@ declare enum StrategyLiveStatus {
|
|
|
192
195
|
ACTIVE = "Active",
|
|
193
196
|
NEW = "New",
|
|
194
197
|
COMING_SOON = "Coming Soon",
|
|
195
|
-
|
|
198
|
+
DEPRECATED = "Deprecated",// active but not recommended
|
|
199
|
+
RETIRED = "Retired",// not active anymore
|
|
196
200
|
HOT = "Hot & New \uD83D\uDD25"
|
|
197
201
|
}
|
|
198
202
|
interface StrategyAlert {
|
|
@@ -201,7 +205,6 @@ interface StrategyAlert {
|
|
|
201
205
|
tab: "all" | "deposit" | "withdraw";
|
|
202
206
|
}
|
|
203
207
|
interface StrategySettings {
|
|
204
|
-
maxTVL?: Web3Number;
|
|
205
208
|
liveStatus?: StrategyLiveStatus;
|
|
206
209
|
isPaused?: boolean;
|
|
207
210
|
isInMaintenance?: boolean;
|
|
@@ -216,6 +219,10 @@ interface StrategySettings {
|
|
|
216
219
|
alerts?: StrategyAlert[];
|
|
217
220
|
tags?: StrategyTag[];
|
|
218
221
|
}
|
|
222
|
+
interface StrategyApyHistoryUIConfig {
|
|
223
|
+
showApyHistory?: boolean;
|
|
224
|
+
noApyHistoryMessage?: string;
|
|
225
|
+
}
|
|
219
226
|
/**
|
|
220
227
|
* @property risk.riskFactor.factor - The risk factors that are considered for the strategy.
|
|
221
228
|
* @property risk.riskFactor.factor - The value of the risk factor from 0 to 10, 0 being the lowest and 10 being the highest.
|
|
@@ -226,6 +233,19 @@ interface IStrategyMetadata<T> {
|
|
|
226
233
|
id: string;
|
|
227
234
|
name: string;
|
|
228
235
|
description: string | React.ReactNode;
|
|
236
|
+
/**
|
|
237
|
+
* Optional UI sort priority. Higher shows earlier.
|
|
238
|
+
* Intended for pinning flagship parent vaults (e.g. BTC above STRK).
|
|
239
|
+
*/
|
|
240
|
+
priority?: number;
|
|
241
|
+
/**
|
|
242
|
+
* Optional UI config for the variant intro popup (strategy page).
|
|
243
|
+
* Should be identical across strategies that share the same `parentId`.
|
|
244
|
+
*/
|
|
245
|
+
variantIntro?: {
|
|
246
|
+
title: string;
|
|
247
|
+
description: string;
|
|
248
|
+
};
|
|
229
249
|
address: ContractAddr;
|
|
230
250
|
launchBlock: number;
|
|
231
251
|
type: "ERC4626" | "ERC721" | "Other";
|
|
@@ -242,6 +262,7 @@ interface IStrategyMetadata<T> {
|
|
|
242
262
|
notARisks: RiskType[];
|
|
243
263
|
};
|
|
244
264
|
apyMethodology?: string;
|
|
265
|
+
realizedApyMethodology?: string;
|
|
245
266
|
additionalInfo: T;
|
|
246
267
|
contractDetails: {
|
|
247
268
|
address: ContractAddr;
|
|
@@ -256,16 +277,20 @@ interface IStrategyMetadata<T> {
|
|
|
256
277
|
}[];
|
|
257
278
|
docs?: string;
|
|
258
279
|
investmentSteps: string[];
|
|
259
|
-
curator?:
|
|
260
|
-
name: string;
|
|
261
|
-
logo: string;
|
|
262
|
-
};
|
|
280
|
+
curator?: ICurator;
|
|
263
281
|
isPreview?: boolean;
|
|
264
|
-
category: StrategyCategory;
|
|
265
282
|
tags?: StrategyTag[];
|
|
266
283
|
security: SecurityMetadata;
|
|
267
284
|
redemptionInfo: RedemptionInfo;
|
|
285
|
+
usualTimeToEarnings: null | string;
|
|
286
|
+
usualTimeToEarningsDescription: null | string;
|
|
287
|
+
discontinuationInfo?: {
|
|
288
|
+
date?: Date;
|
|
289
|
+
reason?: React.ReactNode | string;
|
|
290
|
+
info?: React.ReactNode | string;
|
|
291
|
+
};
|
|
268
292
|
settings?: StrategySettings;
|
|
293
|
+
apyHistoryUIConfig?: StrategyApyHistoryUIConfig;
|
|
269
294
|
actions?: Array<{
|
|
270
295
|
name?: string;
|
|
271
296
|
pool?: {
|
|
@@ -285,6 +310,8 @@ interface IStrategyMetadata<T> {
|
|
|
285
310
|
amount?: string | number;
|
|
286
311
|
isDeposit?: boolean;
|
|
287
312
|
}>;
|
|
313
|
+
parentId?: string;
|
|
314
|
+
parentName?: string;
|
|
288
315
|
}
|
|
289
316
|
interface IInvestmentFlow {
|
|
290
317
|
id?: string;
|
|
@@ -297,6 +324,8 @@ interface IInvestmentFlow {
|
|
|
297
324
|
style?: any;
|
|
298
325
|
}
|
|
299
326
|
declare function getMainnetConfig(rpcUrl?: string, blockIdentifier?: BlockIdentifier): IConfig;
|
|
327
|
+
declare const getStrategyTagDesciption: (tag: StrategyTag) => string;
|
|
328
|
+
declare const getAllStrategyTags: () => StrategyTag[];
|
|
300
329
|
declare const getRiskExplaination: (riskType: RiskType) => "The risk of the market moving against the position." | "The temporary loss of value experienced by liquidity providers in AMMs when asset prices diverge compared to simply holding them." | "The risk of losing funds due to the position being liquidated." | "The risk of low liquidity in the pool, which can lead to high slippages or reduced in-abilities to quickly exit the position." | "The risk of the oracle being manipulated or incorrect." | "The risk of the smart contract being vulnerable to attacks." | "The risk of technical issues e.g. backend failure." | "The risk of the counterparty defaulting e.g. bad debt on lending platforms." | "The risk of a token losing its peg to the underlying asset, leading to potential losses for holders.";
|
|
301
330
|
declare const getRiskColor: (risk: RiskFactor) => "light_green_2" | "yellow" | "red";
|
|
302
331
|
declare const getNoRiskTags: (risks: RiskFactor[]) => RiskType[];
|
|
@@ -337,6 +366,7 @@ declare const Protocols: {
|
|
|
337
366
|
ENDUR: IProtocol;
|
|
338
367
|
EXTENDED: IProtocol;
|
|
339
368
|
};
|
|
369
|
+
declare const UnwrapLabsCurator: ICurator;
|
|
340
370
|
|
|
341
371
|
interface ILendingMetadata {
|
|
342
372
|
name: string;
|
|
@@ -397,18 +427,41 @@ declare abstract class PricerBase {
|
|
|
397
427
|
getPrice(tokenSymbol: string, blockNumber?: BlockIdentifier): Promise<PriceInfo>;
|
|
398
428
|
}
|
|
399
429
|
|
|
430
|
+
/**
|
|
431
|
+
* Polls Avnu impulse tokens API and keeps USD prices in memory for configured tokens.
|
|
432
|
+
* Price timestamp is set when each poll request completes.
|
|
433
|
+
*/
|
|
434
|
+
declare class PricerAvnuApi extends PricerBase {
|
|
435
|
+
protected prices: {
|
|
436
|
+
[key: string]: PriceInfo;
|
|
437
|
+
};
|
|
438
|
+
readonly refreshInterval = 15000;
|
|
439
|
+
readonly staleTime: number;
|
|
440
|
+
private pollTimer;
|
|
441
|
+
private loading;
|
|
442
|
+
constructor(config: IConfig, tokens: TokenInfo[]);
|
|
443
|
+
start(): void;
|
|
444
|
+
stop(): void;
|
|
445
|
+
isStale(timestamp: Date): boolean;
|
|
446
|
+
hasPrice(tokenSymbol: string): boolean;
|
|
447
|
+
getPrice(tokenSymbol: string): Promise<PriceInfo>;
|
|
448
|
+
protected _loadPrices(): Promise<void>;
|
|
449
|
+
}
|
|
450
|
+
|
|
400
451
|
interface PriceInfo {
|
|
401
452
|
price: number;
|
|
402
453
|
timestamp: Date;
|
|
403
454
|
}
|
|
455
|
+
type PriceMethod = 'AvnuApi' | 'Coinbase' | 'Coinmarketcap' | 'Ekubo' | 'Avnu';
|
|
404
456
|
declare class Pricer extends PricerBase {
|
|
405
457
|
protected prices: {
|
|
406
458
|
[key: string]: PriceInfo;
|
|
407
459
|
};
|
|
408
460
|
refreshInterval: number;
|
|
409
461
|
staleTime: number;
|
|
462
|
+
protected readonly avnuApiPricer: PricerAvnuApi;
|
|
410
463
|
protected methodToUse: {
|
|
411
|
-
[tokenSymbol: string]:
|
|
464
|
+
[tokenSymbol: string]: PriceMethod;
|
|
412
465
|
};
|
|
413
466
|
/**
|
|
414
467
|
* TOKENA and TOKENB are the two token names to get price of TokenA in terms of TokenB
|
|
@@ -423,7 +476,9 @@ declare class Pricer extends PricerBase {
|
|
|
423
476
|
assertNotStale(timestamp: Date, tokenName: string): void;
|
|
424
477
|
getPrice(tokenSymbol: string, blockNumber?: BlockIdentifier): Promise<PriceInfo>;
|
|
425
478
|
protected _loadPrices(onUpdate?: (tokenSymbol: string) => void): void;
|
|
426
|
-
_getPrice(token: TokenInfo
|
|
479
|
+
_getPrice(token: TokenInfo): Promise<number>;
|
|
480
|
+
protected _tryPriceMethod(token: TokenInfo, method: PriceMethod): Promise<number>;
|
|
481
|
+
_getPriceAvnuApi(token: TokenInfo): Promise<number>;
|
|
427
482
|
_getPriceCoinbase(token: TokenInfo): Promise<number>;
|
|
428
483
|
_getPriceCoinMarketCap(token: TokenInfo): Promise<number>;
|
|
429
484
|
_getAvnuPrice(token: TokenInfo, amountIn?: Web3Number, retry?: number): Promise<number>;
|
|
@@ -494,6 +549,7 @@ declare class ERC20 {
|
|
|
494
549
|
contract(addr: string | ContractAddr): Contract;
|
|
495
550
|
balanceOf(token: string | ContractAddr, address: string | ContractAddr, tokenDecimals: number): Promise<Web3Number>;
|
|
496
551
|
allowance(token: string | ContractAddr, owner: string | ContractAddr, spender: string | ContractAddr, tokenDecimals: number): Promise<Web3Number>;
|
|
552
|
+
approve(token: string | ContractAddr, spender: string | ContractAddr, amount: Web3Number): starknet.Call;
|
|
497
553
|
}
|
|
498
554
|
|
|
499
555
|
interface Route {
|
|
@@ -591,6 +647,8 @@ interface DualTokenInfo {
|
|
|
591
647
|
token0: SingleTokenInfo;
|
|
592
648
|
token1: SingleTokenInfo;
|
|
593
649
|
}
|
|
650
|
+
type StrategyInputMode = "single" | "dual";
|
|
651
|
+
type InputModeFromAction<T> = T extends DualActionAmount ? "dual" : "single";
|
|
594
652
|
interface NetAPYSplit {
|
|
595
653
|
apy: number;
|
|
596
654
|
id: string;
|
|
@@ -599,22 +657,75 @@ interface NetAPYDetails {
|
|
|
599
657
|
net: number;
|
|
600
658
|
splits: NetAPYSplit[];
|
|
601
659
|
}
|
|
660
|
+
type UserPositionCardSubValueColor = "default" | "positive" | "negative" | "info";
|
|
661
|
+
interface UserPositionCard {
|
|
662
|
+
title: string;
|
|
663
|
+
value: string;
|
|
664
|
+
tooltip?: string;
|
|
665
|
+
subValue?: string;
|
|
666
|
+
subValueColor?: UserPositionCardSubValueColor;
|
|
667
|
+
}
|
|
668
|
+
interface UserPositionCardsInput {
|
|
669
|
+
user: ContractAddr;
|
|
670
|
+
investmentFlows?: Array<{
|
|
671
|
+
amount: string;
|
|
672
|
+
type: string;
|
|
673
|
+
timestamp: number;
|
|
674
|
+
tx_hash: string;
|
|
675
|
+
}>;
|
|
676
|
+
usualTimeToEarnings?: string | null;
|
|
677
|
+
usualTimeToEarningsDescription?: string | null;
|
|
678
|
+
}
|
|
602
679
|
interface CacheData {
|
|
603
680
|
timestamp: number;
|
|
604
681
|
ttl: number;
|
|
605
682
|
data: any;
|
|
606
683
|
}
|
|
607
|
-
declare class BaseStrategy<TVLInfo,
|
|
684
|
+
declare class BaseStrategy<TVLInfo, DepositActionInfo, WithdrawActionInfo = DepositActionInfo> extends CacheClass {
|
|
608
685
|
readonly config: IConfig;
|
|
609
686
|
readonly cache: Map<string, CacheData>;
|
|
610
|
-
|
|
687
|
+
private readonly _depositInputMode;
|
|
688
|
+
private readonly _withdrawInputMode;
|
|
689
|
+
constructor(config: IConfig, inputModes?: {
|
|
690
|
+
depositInputMode?: InputModeFromAction<DepositActionInfo>;
|
|
691
|
+
withdrawInputMode?: InputModeFromAction<WithdrawActionInfo>;
|
|
692
|
+
});
|
|
693
|
+
depositInputMode(): InputModeFromAction<DepositActionInfo>;
|
|
694
|
+
withdrawInputMode(): InputModeFromAction<WithdrawActionInfo>;
|
|
611
695
|
getUserTVL(user: ContractAddr, blockIdentifier?: BlockIdentifier): Promise<TVLInfo>;
|
|
612
696
|
getTVL(): Promise<TVLInfo>;
|
|
613
|
-
depositCall(amountInfo:
|
|
614
|
-
withdrawCall(amountInfo:
|
|
697
|
+
depositCall(amountInfo: DepositActionInfo, receiver: ContractAddr): Promise<Call[]>;
|
|
698
|
+
withdrawCall(amountInfo: WithdrawActionInfo, receiver: ContractAddr, owner: ContractAddr): Promise<Call[]>;
|
|
615
699
|
getVaultPositions(): Promise<VaultPosition[]>;
|
|
616
|
-
netAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number, timeperiod?: "24h" | "7d" | "30d" | "3m"): Promise<number | NetAPYDetails>;
|
|
700
|
+
netAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number, timeperiod?: "24h" | "7d" | "30d" | "3m"): Promise<number | string | NetAPYDetails>;
|
|
617
701
|
getPendingRewards(): Promise<HarvestInfo[]>;
|
|
702
|
+
getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
|
|
703
|
+
getUserPositionCards(_input: UserPositionCardsInput): Promise<UserPositionCard[]>;
|
|
704
|
+
getMaxTVL(): Promise<Web3Number>;
|
|
705
|
+
protected formatTokenAmountForCard(amount: Web3Number, tokenInfo: TokenInfo): string;
|
|
706
|
+
protected formatPercentForCard(value: number): string;
|
|
707
|
+
protected formatUSDForCard(value: number): string;
|
|
708
|
+
protected getSubValueColorFromSignedNumber(value: number): UserPositionCardSubValueColor;
|
|
709
|
+
/**
|
|
710
|
+
* Calculate lifetime earnings for a user based on provided data from client
|
|
711
|
+
* Formula: lifetimeEarnings = currentValue + totalWithdrawals - totalDeposits
|
|
712
|
+
*
|
|
713
|
+
* @param userTVL - The user's current TVL (SingleTokenInfo with amount, usdValue, tokenInfo)
|
|
714
|
+
* @param investmentFlows - Array of investment flow transactions from client
|
|
715
|
+
* @returns Object containing lifetime earnings, current value, and total deposits/withdrawals
|
|
716
|
+
*/
|
|
717
|
+
getLifetimeEarnings(userTVL: SingleTokenInfo, investmentFlows: Array<{
|
|
718
|
+
amount: string;
|
|
719
|
+
type: string;
|
|
720
|
+
timestamp: number;
|
|
721
|
+
tx_hash: string;
|
|
722
|
+
}>): {
|
|
723
|
+
tokenInfo: SingleTokenInfo;
|
|
724
|
+
lifetimeEarnings: Web3Number;
|
|
725
|
+
currentValue: Web3Number;
|
|
726
|
+
totalDeposits: Web3Number;
|
|
727
|
+
totalWithdrawals: Web3Number;
|
|
728
|
+
};
|
|
618
729
|
}
|
|
619
730
|
|
|
620
731
|
interface PoolProps {
|
|
@@ -900,17 +1011,32 @@ declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount>
|
|
|
900
1011
|
rebalanceCall(newBounds: EkuboBounds, swapParams: SwapInfo): Call[];
|
|
901
1012
|
handleUnusedCall(swapParams: SwapInfo): Call[];
|
|
902
1013
|
handleFeesCall(): Call[];
|
|
903
|
-
getFeeHistory(timePeriod?: '24h' | '7d' | '30d' | '3m'
|
|
1014
|
+
getFeeHistory(timePeriod?: '24h' | '7d' | '30d' | '3m' | '6m', range?: {
|
|
1015
|
+
startTimestamp?: number;
|
|
1016
|
+
endTimestamp?: number;
|
|
1017
|
+
}): Promise<{
|
|
904
1018
|
summary: DualTokenInfo;
|
|
905
1019
|
history: FeeHistory[];
|
|
906
1020
|
}>;
|
|
907
1021
|
netSharesBasedTrueAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
|
|
1022
|
+
/**
|
|
1023
|
+
* Calculate lifetime earnings for a user
|
|
1024
|
+
* Not yet implemented for Ekubo CL Vault strategy
|
|
1025
|
+
*/
|
|
1026
|
+
getLifetimeEarnings(userTVL: SingleTokenInfo, investmentFlows: Array<{
|
|
1027
|
+
amount: string;
|
|
1028
|
+
type: string;
|
|
1029
|
+
timestamp: number;
|
|
1030
|
+
tx_hash: string;
|
|
1031
|
+
}>): any;
|
|
908
1032
|
/**
|
|
909
1033
|
* Calculates realized APY based on TVL per share growth, always valued in USDC.
|
|
910
1034
|
* This is a vault-level metric (same for all users) and works for all strategies,
|
|
911
1035
|
* regardless of quote asset configuration.
|
|
912
1036
|
*/
|
|
913
1037
|
getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
|
|
1038
|
+
getMaxTVL(): Promise<Web3Number>;
|
|
1039
|
+
getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
|
|
914
1040
|
feeBasedAPY(timeperiod?: '24h' | '7d' | '30d' | '3m'): Promise<number>;
|
|
915
1041
|
/**
|
|
916
1042
|
* Calculates assets before and now in a given token of TVL per share to observe growth
|
|
@@ -1106,15 +1232,122 @@ declare class SenseiVault extends BaseStrategy<SingleTokenInfo, SingleActionAmou
|
|
|
1106
1232
|
}>;
|
|
1107
1233
|
getSecondaryTokenPriceRelativeToMain(retry?: number): Promise<number>;
|
|
1108
1234
|
getSettings: () => Promise<starknet.CallResult>;
|
|
1235
|
+
/**
|
|
1236
|
+
* Calculate lifetime earnings for a user
|
|
1237
|
+
* Not yet implemented for Sensei Vault strategy
|
|
1238
|
+
*/
|
|
1239
|
+
getLifetimeEarnings(userTVL: SingleTokenInfo, investmentFlows: Array<{
|
|
1240
|
+
amount: string;
|
|
1241
|
+
type: string;
|
|
1242
|
+
timestamp: number;
|
|
1243
|
+
tx_hash: string;
|
|
1244
|
+
}>): any;
|
|
1109
1245
|
netAPY(): Promise<number>;
|
|
1110
1246
|
/**
|
|
1111
1247
|
* Calculates user realized APY based on position growth accounting for deposits and withdrawals.
|
|
1112
1248
|
* Returns the APY as a number.
|
|
1249
|
+
* Not implemented for Sensei Strategy yet.
|
|
1113
1250
|
*/
|
|
1114
|
-
getUserRealizedAPY(
|
|
1251
|
+
getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
|
|
1252
|
+
getUserPositionCards(_input: UserPositionCardsInput): Promise<UserPositionCard[]>;
|
|
1115
1253
|
}
|
|
1116
1254
|
declare const SenseiStrategies: IStrategyMetadata<SenseiVaultSettings>[];
|
|
1117
1255
|
|
|
1256
|
+
interface YoloVaultSettings {
|
|
1257
|
+
startDate: string;
|
|
1258
|
+
expiryDate: string;
|
|
1259
|
+
mainToken: TokenInfo;
|
|
1260
|
+
secondaryToken: TokenInfo;
|
|
1261
|
+
totalEpochs: number;
|
|
1262
|
+
minEpochDurationSeconds: number;
|
|
1263
|
+
spendingLevels: YoloSpendingLevel[];
|
|
1264
|
+
feeBps: number;
|
|
1265
|
+
/** When true, base token is ERC-4626 (e.g. vUSDC); amounts for TVL / user info use `convert_to_assets` into `baseUnderlying`. */
|
|
1266
|
+
isBaseERC4626?: boolean;
|
|
1267
|
+
/** When true, second token is ERC-4626 (e.g. xSTRK); amounts use `convert_to_assets` into `secondUnderlying`. */
|
|
1268
|
+
isSecondERC4626?: boolean;
|
|
1269
|
+
/** Required when `isBaseERC4626` is true (e.g. USDC). */
|
|
1270
|
+
baseUnderlying?: TokenInfo;
|
|
1271
|
+
/** Required when `isSecondERC4626` is true (e.g. STRK / WBTC for xSTRK / xWBTC). */
|
|
1272
|
+
secondUnderlying?: TokenInfo;
|
|
1273
|
+
}
|
|
1274
|
+
interface YoloSpendingLevel {
|
|
1275
|
+
minPrice?: number;
|
|
1276
|
+
maxPrice?: number;
|
|
1277
|
+
spendPercent: number;
|
|
1278
|
+
}
|
|
1279
|
+
interface UserYoloInfo {
|
|
1280
|
+
shares: bigint;
|
|
1281
|
+
claimable_second_tokens: bigint;
|
|
1282
|
+
base_token_balance: bigint;
|
|
1283
|
+
base_token_consumed: bigint;
|
|
1284
|
+
base_consumed_last_index: bigint;
|
|
1285
|
+
second_token_last_index: bigint;
|
|
1286
|
+
second_token_balance: bigint;
|
|
1287
|
+
}
|
|
1288
|
+
interface YoloVaultStatus {
|
|
1289
|
+
current_epoch: bigint;
|
|
1290
|
+
total_epochs: bigint;
|
|
1291
|
+
remaining_base: bigint;
|
|
1292
|
+
total_second_tokens: bigint;
|
|
1293
|
+
global_second_token_index: bigint;
|
|
1294
|
+
cumulative_spend_index: bigint;
|
|
1295
|
+
total_shares: bigint;
|
|
1296
|
+
base_token_assets_per_share: bigint;
|
|
1297
|
+
}
|
|
1298
|
+
interface YoloSettings {
|
|
1299
|
+
base_token: bigint;
|
|
1300
|
+
second_token: bigint;
|
|
1301
|
+
total_epochs: bigint;
|
|
1302
|
+
min_time_per_epoch: bigint;
|
|
1303
|
+
max_spend_units_per_epoch: bigint;
|
|
1304
|
+
base_token_assets_per_share: bigint;
|
|
1305
|
+
oracle: bigint;
|
|
1306
|
+
}
|
|
1307
|
+
type YoloErc4626RuntimeConfig = {
|
|
1308
|
+
isBaseERC4626: boolean;
|
|
1309
|
+
isSecondERC4626: boolean;
|
|
1310
|
+
baseUnderlying?: TokenInfo;
|
|
1311
|
+
secondUnderlying?: TokenInfo;
|
|
1312
|
+
};
|
|
1313
|
+
declare class YoLoVault extends BaseStrategy<DualTokenInfo, SingleActionAmount, DualActionAmount> {
|
|
1314
|
+
readonly address: ContractAddr;
|
|
1315
|
+
readonly metadata: IStrategyMetadata<YoloVaultSettings>;
|
|
1316
|
+
readonly pricer: PricerBase;
|
|
1317
|
+
/** Resolves to a `Contract` built from `provider.getClassAt` at the vault address (no checked-in vault ABI). */
|
|
1318
|
+
readonly contract: Promise<Contract>;
|
|
1319
|
+
readonly primaryToken: TokenInfo;
|
|
1320
|
+
readonly secondaryToken: TokenInfo;
|
|
1321
|
+
readonly erc4626: YoloErc4626RuntimeConfig;
|
|
1322
|
+
constructor(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<YoloVaultSettings>);
|
|
1323
|
+
/** Underlying (or base token) used for pricing / swap sell leg when base is ERC-4626. */
|
|
1324
|
+
tokenForPrimaryPricing(): TokenInfo;
|
|
1325
|
+
/** Underlying (or second token) for price ratios when second leg is ERC-4626 (e.g. STRK for xSTRK). */
|
|
1326
|
+
tokenForSecondaryPricing(): TokenInfo;
|
|
1327
|
+
private primaryAmountDecimals;
|
|
1328
|
+
private secondaryAmountDecimals;
|
|
1329
|
+
private convertWrapperSharesToUnderlying;
|
|
1330
|
+
private getNormalizedUserInfo;
|
|
1331
|
+
private resolveWithdrawRequest;
|
|
1332
|
+
getUserTVL(user: ContractAddr, blockIdentifier?: BlockIdentifier): Promise<DualTokenInfo>;
|
|
1333
|
+
getVaultPositions(): Promise<VaultPosition[]>;
|
|
1334
|
+
getTVL(): Promise<DualTokenInfo>;
|
|
1335
|
+
depositCall(amountInfo: SingleActionAmount, receiver: ContractAddr): Promise<Call[]>;
|
|
1336
|
+
getVaultStatus(): Promise<YoloVaultStatus>;
|
|
1337
|
+
matchInputAmounts(amountInfo: DualActionAmount, user: ContractAddr): Promise<DualActionAmount>;
|
|
1338
|
+
withdrawCall(amountInfo: DualActionAmount, receiver: ContractAddr, owner: ContractAddr): Promise<Call[]>;
|
|
1339
|
+
netAPY(): Promise<number | string | NetAPYDetails>;
|
|
1340
|
+
getSwapAmounts(spendUnits: Web3Number): Promise<{
|
|
1341
|
+
grossSpend: Web3Number;
|
|
1342
|
+
netSpend: Web3Number;
|
|
1343
|
+
isReadyForNextSwap: boolean;
|
|
1344
|
+
}>;
|
|
1345
|
+
getSettings: () => Promise<YoloSettings>;
|
|
1346
|
+
getMaxTVL(): Promise<Web3Number>;
|
|
1347
|
+
getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
|
|
1348
|
+
}
|
|
1349
|
+
declare const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[];
|
|
1350
|
+
|
|
1118
1351
|
interface LeveledLogMethod {
|
|
1119
1352
|
(message: string, ...meta: any[]): void;
|
|
1120
1353
|
(message: any): void;
|
|
@@ -1368,6 +1601,24 @@ declare const VesuPools: {
|
|
|
1368
1601
|
Re7xSTRK: ContractAddr;
|
|
1369
1602
|
Re7xBTC: ContractAddr;
|
|
1370
1603
|
Prime: ContractAddr;
|
|
1604
|
+
Re7STRK: ContractAddr;
|
|
1605
|
+
};
|
|
1606
|
+
declare const VesuPoolMetadata: {
|
|
1607
|
+
[VesuPools.Genesis.address]: {
|
|
1608
|
+
name: string;
|
|
1609
|
+
};
|
|
1610
|
+
[VesuPools.Re7xSTRK.address]: {
|
|
1611
|
+
name: string;
|
|
1612
|
+
};
|
|
1613
|
+
[VesuPools.Re7xBTC.address]: {
|
|
1614
|
+
name: string;
|
|
1615
|
+
};
|
|
1616
|
+
[VesuPools.Prime.address]: {
|
|
1617
|
+
name: string;
|
|
1618
|
+
};
|
|
1619
|
+
[VesuPools.Re7STRK.address]: {
|
|
1620
|
+
name: string;
|
|
1621
|
+
};
|
|
1371
1622
|
};
|
|
1372
1623
|
declare const extensionMap: {
|
|
1373
1624
|
[key: string]: ContractAddr;
|
|
@@ -1410,8 +1661,15 @@ declare class VesuAdapter extends BaseAdapter {
|
|
|
1410
1661
|
getModifyPositionCall: (params: VesuModifyPositionCallParams) => ManageCall;
|
|
1411
1662
|
getMultiplyAdapter: (id: string) => LeafAdapterFn<VesuMultiplyCallParams>;
|
|
1412
1663
|
getMultiplyCall: (params: VesuMultiplyCallParams) => ManageCall;
|
|
1413
|
-
getVesuModifyDelegationAdapter: (id: string) => LeafAdapterFn<VesuModifyDelegationCallParams>;
|
|
1414
|
-
getVesuModifyDelegationCall: (params: VesuModifyDelegationCallParams) =>
|
|
1664
|
+
getVesuModifyDelegationAdapter: (id: string, delegatee: ContractAddr) => LeafAdapterFn<VesuModifyDelegationCallParams>;
|
|
1665
|
+
getVesuModifyDelegationCall: (delegatee: ContractAddr) => (params: VesuModifyDelegationCallParams) => {
|
|
1666
|
+
sanitizer: ContractAddr;
|
|
1667
|
+
call: {
|
|
1668
|
+
contractAddress: ContractAddr;
|
|
1669
|
+
selector: string;
|
|
1670
|
+
calldata: bigint[];
|
|
1671
|
+
};
|
|
1672
|
+
};
|
|
1415
1673
|
getDefispringRewardsAdapter: (id: string) => () => AdapterLeafType<VesuDefiSpringRewardsCallParams>;
|
|
1416
1674
|
getDefiSpringClaimCall: () => GenerateCallFn<VesuDefiSpringRewardsCallParams>;
|
|
1417
1675
|
formatAmountTypeEnum(amountType: VesuAmountType): CairoCustomEnum;
|
|
@@ -1466,6 +1724,11 @@ declare const AVNU_EXCHANGE: ContractAddr;
|
|
|
1466
1724
|
declare const VESU_SINGLETON: ContractAddr;
|
|
1467
1725
|
declare function toBigInt(value: string | number): bigint;
|
|
1468
1726
|
|
|
1727
|
+
declare enum LSTPriceType {
|
|
1728
|
+
ENDUR_PRICE = "ENDUR_PRICE",
|
|
1729
|
+
AVNU_PRICE = "AVNU_PRICE"
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1469
1732
|
interface UniversalManageCall {
|
|
1470
1733
|
proofs: string[];
|
|
1471
1734
|
manageCall: ManageCall;
|
|
@@ -1550,6 +1813,7 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
|
|
|
1550
1813
|
* Returns the APY as a number.
|
|
1551
1814
|
*/
|
|
1552
1815
|
getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
|
|
1816
|
+
getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
|
|
1553
1817
|
/**
|
|
1554
1818
|
* Calculates the total TVL of the strategy.
|
|
1555
1819
|
* @returns Object containing the total amount in token units and USD value
|
|
@@ -1559,10 +1823,11 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
|
|
|
1559
1823
|
amount: Web3Number;
|
|
1560
1824
|
usdValue: number;
|
|
1561
1825
|
}>;
|
|
1826
|
+
getMaxTVL(): Promise<Web3Number>;
|
|
1562
1827
|
getUnusedBalance(): Promise<SingleTokenInfo>;
|
|
1563
|
-
protected getVesuAUM(adapter: VesuAdapter): Promise<Web3Number>;
|
|
1828
|
+
protected getVesuAUM(adapter: VesuAdapter, _priceType?: LSTPriceType): Promise<Web3Number>;
|
|
1564
1829
|
getPrevAUM(): Promise<Web3Number>;
|
|
1565
|
-
getAUM(): Promise<{
|
|
1830
|
+
getAUM(unrealizedAUM?: boolean): Promise<{
|
|
1566
1831
|
net: SingleTokenInfo;
|
|
1567
1832
|
prevAum: Web3Number;
|
|
1568
1833
|
splits: {
|
|
@@ -1641,10 +1906,12 @@ declare function getContractDetails(settings: UniversalStrategySettings): {
|
|
|
1641
1906
|
declare const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[];
|
|
1642
1907
|
|
|
1643
1908
|
interface HyperLSTStrategySettings extends UniversalStrategySettings {
|
|
1644
|
-
borrowable_assets:
|
|
1909
|
+
borrowable_assets: {
|
|
1910
|
+
token: TokenInfo;
|
|
1911
|
+
poolId: ContractAddr;
|
|
1912
|
+
}[];
|
|
1645
1913
|
underlyingToken: TokenInfo;
|
|
1646
1914
|
defaultPoolId: ContractAddr;
|
|
1647
|
-
altSupportedPoolIds: ContractAddr[];
|
|
1648
1915
|
}
|
|
1649
1916
|
declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTStrategySettings> {
|
|
1650
1917
|
private quoteAmountToFetchPrice;
|
|
@@ -1679,7 +1946,22 @@ declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTS
|
|
|
1679
1946
|
shouldRebalance: boolean;
|
|
1680
1947
|
manageCall: Call | undefined;
|
|
1681
1948
|
}>;
|
|
1682
|
-
protected getVesuAUM(adapter: VesuAdapter): Promise<Web3Number>;
|
|
1949
|
+
protected getVesuAUM(adapter: VesuAdapter, priceType?: LSTPriceType): Promise<Web3Number>;
|
|
1950
|
+
getTVLUnrealized(): Promise<{
|
|
1951
|
+
net: SingleTokenInfo;
|
|
1952
|
+
prevAum: Web3Number;
|
|
1953
|
+
splits: {
|
|
1954
|
+
id: string;
|
|
1955
|
+
aum: Web3Number;
|
|
1956
|
+
}[];
|
|
1957
|
+
}>;
|
|
1958
|
+
getUserUnrealizedGains(user: ContractAddr): Promise<{
|
|
1959
|
+
unrealizedGains: Web3Number;
|
|
1960
|
+
userShare: number;
|
|
1961
|
+
tokenInfo: TokenInfo;
|
|
1962
|
+
}>;
|
|
1963
|
+
getMaxTVL(): Promise<Web3Number>;
|
|
1964
|
+
getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
|
|
1683
1965
|
private _getMinOutputAmountLSTBuy;
|
|
1684
1966
|
private _getMinOutputAmountLSTSell;
|
|
1685
1967
|
/**
|
|
@@ -1704,6 +1986,7 @@ declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTS
|
|
|
1704
1986
|
maxBorrowableAmount: Web3Number;
|
|
1705
1987
|
borrowableAsset: TokenInfo;
|
|
1706
1988
|
ltv: number;
|
|
1989
|
+
poolId: ContractAddr;
|
|
1707
1990
|
}[];
|
|
1708
1991
|
}>;
|
|
1709
1992
|
getMaxSwappableWithMaxSlippage(fromToken: TokenInfo, toToken: TokenInfo, maxSlippage: number, maxAmount: Web3Number): Promise<Web3Number>;
|
|
@@ -1732,6 +2015,7 @@ declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTS
|
|
|
1732
2015
|
apy: number;
|
|
1733
2016
|
weight: number;
|
|
1734
2017
|
}>;
|
|
2018
|
+
getLSTAvnuRate(): Promise<number>;
|
|
1735
2019
|
getLSTExchangeRate(): Promise<number>;
|
|
1736
2020
|
/**
|
|
1737
2021
|
*
|
|
@@ -1762,7 +2046,6 @@ interface FilterOption {
|
|
|
1762
2046
|
interface StrategyFilterMetadata {
|
|
1763
2047
|
assets: FilterOption[];
|
|
1764
2048
|
protocols: FilterOption[];
|
|
1765
|
-
categories: FilterOption[];
|
|
1766
2049
|
quickFilters: FilterOption[];
|
|
1767
2050
|
}
|
|
1768
2051
|
/**
|
|
@@ -1773,7 +2056,8 @@ declare enum StrategyType {
|
|
|
1773
2056
|
UNIVERSAL = "universal",
|
|
1774
2057
|
HYPER_LST = "hyper-lst",
|
|
1775
2058
|
VESU_REBALANCE = "vesu-rebalance",
|
|
1776
|
-
SENSEI = "sensei"
|
|
2059
|
+
SENSEI = "sensei",
|
|
2060
|
+
YOLO_VAULT = "yolo-vault"
|
|
1777
2061
|
}
|
|
1778
2062
|
/**
|
|
1779
2063
|
* Strategy metadata extracted from IStrategyMetadata
|
|
@@ -1784,7 +2068,6 @@ interface StrategyMetadata {
|
|
|
1784
2068
|
type: StrategyType;
|
|
1785
2069
|
assets: string[];
|
|
1786
2070
|
protocols: string[];
|
|
1787
|
-
category: string;
|
|
1788
2071
|
tags: string[];
|
|
1789
2072
|
curator?: {
|
|
1790
2073
|
name: string;
|
|
@@ -1825,10 +2108,12 @@ declare enum FactoryStrategyType {
|
|
|
1825
2108
|
EKUBO_CL = "EKUBO_CL",
|
|
1826
2109
|
HYPER_LST = "HYPER_LST",
|
|
1827
2110
|
VESU_REBALANCE = "VESU_REBALANCE",
|
|
1828
|
-
SENSEI = "SENSEI"
|
|
2111
|
+
SENSEI = "SENSEI",
|
|
2112
|
+
YOLO_VAULT = "YOLO_VAULT"
|
|
1829
2113
|
}
|
|
1830
2114
|
declare function createUniversalStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<UniversalStrategySettings>): UniversalStrategy<UniversalStrategySettings>;
|
|
1831
2115
|
declare function createEkuboCLStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<CLVaultStrategySettings>): EkuboCLVault;
|
|
2116
|
+
declare function createYoloVaultStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<YoloVaultSettings>): YoLoVault;
|
|
1832
2117
|
declare function createHyperLSTStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<HyperLSTStrategySettings>): UniversalLstMultiplierStrategy;
|
|
1833
2118
|
declare function createVesuRebalanceStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<VesuRebalanceSettings>): VesuRebalance;
|
|
1834
2119
|
declare function createSenseiStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<SenseiVaultSettings>): SenseiVault;
|
|
@@ -1839,7 +2124,7 @@ declare function getStrategyTypeFromMetadata(metadata: IStrategyMetadata<any>):
|
|
|
1839
2124
|
/**
|
|
1840
2125
|
* Generic factory function that creates SDK strategy instances based on type
|
|
1841
2126
|
*/
|
|
1842
|
-
declare function createStrategy(type: FactoryStrategyType, config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<any>): VesuRebalance | EkuboCLVault | SenseiVault | UniversalStrategy<UniversalStrategySettings>;
|
|
2127
|
+
declare function createStrategy(type: FactoryStrategyType, config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<any>): VesuRebalance | EkuboCLVault | SenseiVault | YoLoVault | UniversalStrategy<UniversalStrategySettings>;
|
|
1843
2128
|
|
|
1844
2129
|
interface EkuboRouteNode {
|
|
1845
2130
|
pool_key: {
|
|
@@ -1963,6 +2248,16 @@ declare class LSTAPRService {
|
|
|
1963
2248
|
static clearCache(): void;
|
|
1964
2249
|
}
|
|
1965
2250
|
|
|
2251
|
+
declare class EkuboPricer extends PricerBase {
|
|
2252
|
+
EKUBO_PRICE_FETCHER_ADDRESS: string;
|
|
2253
|
+
readonly contract: Contract;
|
|
2254
|
+
private readonly USDC_ADDRESS;
|
|
2255
|
+
private readonly USDC_DECIMALS;
|
|
2256
|
+
constructor(config: IConfig, tokens: TokenInfo[]);
|
|
2257
|
+
private div2Power128;
|
|
2258
|
+
getPrice(tokenAddr: string, blockIdentifier?: BlockIdentifier): Promise<PriceInfo>;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
1966
2261
|
declare class TelegramNotif {
|
|
1967
2262
|
private subscribers;
|
|
1968
2263
|
readonly bot: TelegramBot;
|
|
@@ -2115,4 +2410,4 @@ declare class PasswordJsonCryptoUtil {
|
|
|
2115
2410
|
decrypt(encryptedData: string, password: string): any;
|
|
2116
2411
|
}
|
|
2117
2412
|
|
|
2118
|
-
export { APYType, AUMTypes, AVNU_EXCHANGE, AVNU_MIDDLEWARE, type AccessControlInfo, AccessControlType, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type AmountInfo, type AmountsInfo, type ApproveCallParams, AuditStatus, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, type DecreaseLeverParams, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FilterOption, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, InstantWithdrawalVault, LSTAPRService, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, MyNumber, type NetAPYDetails, type NetAPYSplit, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, type PositionAPY, type PositionInfo, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type
|
|
2413
|
+
export { APYType, AUMTypes, AVNU_EXCHANGE, AVNU_MIDDLEWARE, type AccessControlInfo, AccessControlType, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type AmountInfo, type AmountsInfo, type ApproveCallParams, AuditStatus, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, type DecreaseLeverParams, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, EkuboPricer, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FilterOption, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type ICurator, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, type InputModeFromAction, InstantWithdrawalVault, LSTAPRService, LSTPriceType, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, MyNumber, type NetAPYDetails, type NetAPYSplit, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, type PositionAPY, type PositionInfo, Pragma, type PriceInfo, Pricer, PricerAvnuApi, PricerFromApi, PricerLST, PricerRedis, Protocols, type RedemptionInfo, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, type SecurityMetadata, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, type SourceCodeInfo, SourceCodeType, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type StrategyAlert, type StrategyApyHistoryUIConfig, type StrategyCapabilities, type StrategyFilterMetadata, type StrategyInputMode, StrategyLiveStatus, type StrategyMetadata, type StrategyRegistryEntry, type StrategySettings, StrategyTag, StrategyType, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, UnwrapLabsCurator, type UserPositionCard, type UserPositionCardSubValueColor, type UserPositionCardsInput, type UserYoloInfo, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VaultType, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuDefiSpringRewardsCallParams, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, type VesuMultiplyCallParams, VesuPoolMetadata, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, YoLoVault, type YoloSettings, type YoloSpendingLevel, type YoloVaultSettings, type YoloVaultStatus, YoloVaultStrategies, ZkLend, assert, buildStrategyRegistry, createEkuboCLStrategy, createHyperLSTStrategy, createSenseiStrategy, createStrategy, createUniversalStrategy, createVesuRebalanceStrategy, createYoloVaultStrategy, detectCapabilities, extensionMap, getAPIUsingHeadlessBrowser, getAllStrategyMetadata, getAllStrategyTags, getContractDetails, getDefaultStoreConfig, getFilterMetadata, getLiveStrategies, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getStrategiesByType, getStrategyTagDesciption, getStrategyTypeFromMetadata, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, isDualTokenStrategy, logger, toAmountsInfo, toBigInt };
|