@1delta/margin-fetcher 5.0.41 → 5.0.43
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.d.ts +238 -10
- package/dist/index.js +490 -207
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { fetchTokenLists, fetchTokenList, aavePools, compoundV3Pools, initConfig
|
|
|
7
7
|
import lodash from 'lodash';
|
|
8
8
|
import { Chain } from '@1delta/chain-registry';
|
|
9
9
|
import { multicallRetryUniversal, getEvmClient, getEvmChain, getEvmClientUniversal } from '@1delta/providers';
|
|
10
|
-
import { LiquityTroveManagerAbi, LiquityActivePoolAbi, LiquityStabilityPoolAbi, LiquityPriceFeedAbi, LiquitySortedTrovesAbi, RiverTroveManagerAbi, RiverStabilityPoolAbi, TellerMarketRegistryAbi, TellerV2Abi, InverseMarketAbi, InverseOracleAbi, InverseDbrAbi, Erc20Abi, LlamaLendControllerAbi, LlamaLendControllerV1Abi, LlamaLendControllerV2Abi, LlamaLendVaultAbi, LlamaLendAmmAbi, MetaMorphoAbi, ExactlyPreviewerAbi, ExactlyAuditorAbi, LenderCommitmentGroupAbi, ResupplyRegistryAbi, ResupplyPairAbi, ResupplyUtilitiesAbi, ResupplyRewardHandlerAbi, ResupplyPairEmissionsAbi, ConvexPoolUtilAbi, FraxlendPairAbi, FraxlendLeverAbi, FrankencoinPositionAbi, FluidLendingResolverAbi, FluidVaultResolverAbi, FluidLiquidityResolverAbi, MoolahVaultAbi, UsddVatAbi, UsddJugAbi, UsddSpotAbi, MorphoLensAbi, AaveV4SpokeAbi, AaveV4OracleAbi, AaveV4HubAbi, DolomiteMarginAbi, GearboxMarketCompressorV310Abi,
|
|
10
|
+
import { LiquityTroveManagerAbi, LiquityActivePoolAbi, LiquityStabilityPoolAbi, LiquityPriceFeedAbi, LiquitySortedTrovesAbi, RiverTroveManagerAbi, RiverStabilityPoolAbi, TellerMarketRegistryAbi, TellerV2Abi, InverseMarketAbi, InverseOracleAbi, InverseDbrAbi, Erc20Abi, LlamaLendControllerAbi, LlamaLendControllerV1Abi, LlamaLendControllerV2Abi, LlamaLendVaultAbi, LlamaLendAmmAbi, MetaMorphoAbi, FluidDexResolverAbi, ExactlyPreviewerAbi, ExactlyAuditorAbi, LenderCommitmentGroupAbi, ResupplyRegistryAbi, ResupplyPairAbi, ResupplyUtilitiesAbi, ResupplyRewardHandlerAbi, ResupplyPairEmissionsAbi, ConvexPoolUtilAbi, FraxlendPairAbi, FraxlendLeverAbi, FrankencoinPositionAbi, FluidLendingResolverAbi, FluidVaultResolverAbi, FluidLiquidityResolverAbi, MoolahVaultAbi, UsddVatAbi, UsddJugAbi, UsddSpotAbi, MorphoLensAbi, AaveV4SpokeAbi, AaveV4OracleAbi, AaveV4HubAbi, DolomiteMarginAbi, GearboxMarketCompressorV310Abi, MorphoBlueAbi, MidnightAbi, TermRepoTokenAbi, TermRepoServicerAbi, TermRepoCollateralManagerAbi, LiquityTroveNFTAbi, LiquityCollSurplusPoolAbi, TellerCollateralManagerAbi, TermMaxViewerAbi, InverseEscrowAbi, CurvanceMarketManagerAbi, CurvanceCTokenAbi, GearboxCreditAccountCompressorV310Abi, UsddCdpManagerAbi, UsddProxyRegistryAbi, CurvanceProtocolReaderAbi, CurvanceCentralRegistryAbi, TermPriceConsumerAbi, CurvanceOracleManagerAbi, TermMaxOracleAggregatorV2Abi } from '@1delta/abis';
|
|
11
11
|
export { MorphoLensAbi } from '@1delta/abis';
|
|
12
12
|
import { prepareDebitDataMulticall, prepareLenderDebitMulticall, parseDebitDataResult, parseLenderDebitResult, getPermit2ContractAddress, getLstAcceptedInputs, getCompoundV3CometAddress as getCompoundV3CometAddress$1, getMorphoAddress, getAaveCollateralTokenAddress, getSiloHalfForUnderlying, bandLtvCurve, InitMarginAddresses } from '@1delta/calldata-sdk';
|
|
13
13
|
import { proxyNativeFetch } from '@1delta/proxy-fetch';
|
|
@@ -11574,12 +11574,12 @@ function rateToApy(rate) {
|
|
|
11574
11574
|
);
|
|
11575
11575
|
}
|
|
11576
11576
|
function parseLtv(ltv) {
|
|
11577
|
-
let
|
|
11577
|
+
let str8 = 0;
|
|
11578
11578
|
try {
|
|
11579
|
-
|
|
11579
|
+
str8 = Number(formatUnits(BigInt(ltv), 18));
|
|
11580
11580
|
} catch (e) {
|
|
11581
11581
|
}
|
|
11582
|
-
return
|
|
11582
|
+
return str8;
|
|
11583
11583
|
}
|
|
11584
11584
|
function liquidationPenaltyFromLltv(lltv) {
|
|
11585
11585
|
if (!lltv || lltv <= 0) return 0;
|
|
@@ -44033,12 +44033,83 @@ var snusdFetcher = {
|
|
|
44033
44033
|
}
|
|
44034
44034
|
};
|
|
44035
44035
|
var CHAIN_ID9 = Chain.ETHEREUM_MAINNET;
|
|
44036
|
+
var WITRY = "0xe346c29b5b60ef870b9724c57ccfbbc631e47dee";
|
|
44037
|
+
var BRIX_APY_URL = "https://brix.money/api/witry/apy-snapshot?windowDays=30&method=realized";
|
|
44038
|
+
var BRIX_DEFILLAMA_POOL = "da8c4ac9-733d-4a98-85a5-83b76b7e84d1";
|
|
44039
|
+
var VESTING_PERIOD = 248400n;
|
|
44040
|
+
var YEAR_SECONDS9 = 31536000n;
|
|
44041
|
+
var ONE_E188 = 10n ** 18n;
|
|
44042
|
+
var WITRY_KEY = "WITRY";
|
|
44043
|
+
var WITRY_GROUP_KEY = "Wrapped iTRY::WITRY";
|
|
44044
|
+
var STAKED_ITRY_ABI = [
|
|
44045
|
+
{
|
|
44046
|
+
name: "vestingAmount",
|
|
44047
|
+
type: "function",
|
|
44048
|
+
stateMutability: "view",
|
|
44049
|
+
inputs: [],
|
|
44050
|
+
outputs: [{ type: "uint256" }]
|
|
44051
|
+
},
|
|
44052
|
+
{
|
|
44053
|
+
name: "lastDistributionTimestamp",
|
|
44054
|
+
type: "function",
|
|
44055
|
+
stateMutability: "view",
|
|
44056
|
+
inputs: [],
|
|
44057
|
+
outputs: [{ type: "uint256" }]
|
|
44058
|
+
},
|
|
44059
|
+
{
|
|
44060
|
+
name: "totalAssets",
|
|
44061
|
+
type: "function",
|
|
44062
|
+
stateMutability: "view",
|
|
44063
|
+
inputs: [],
|
|
44064
|
+
outputs: [{ type: "uint256" }]
|
|
44065
|
+
}
|
|
44066
|
+
];
|
|
44067
|
+
var fetchBrixAprPercent = async () => {
|
|
44068
|
+
const res = await fetch(BRIX_APY_URL, {
|
|
44069
|
+
headers: { accept: "application/json" },
|
|
44070
|
+
signal: AbortSignal.timeout(8e3)
|
|
44071
|
+
});
|
|
44072
|
+
if (!res.ok) throw new Error(`Brix HTTP ${res.status}`);
|
|
44073
|
+
const apr = Number((await res.json())?.stakingApr);
|
|
44074
|
+
if (!Number.isFinite(apr) || apr <= 0) throw new Error("stakingApr missing");
|
|
44075
|
+
return apr * 100;
|
|
44076
|
+
};
|
|
44077
|
+
var fetchWitryAprOnChain = async () => {
|
|
44078
|
+
const [vestingAmount, lastDistribution, totalAssets] = await multicallRetryUniversal({
|
|
44079
|
+
chain: CHAIN_ID9,
|
|
44080
|
+
abi: STAKED_ITRY_ABI,
|
|
44081
|
+
calls: [
|
|
44082
|
+
{ address: WITRY, name: "vestingAmount", params: [] },
|
|
44083
|
+
{ address: WITRY, name: "lastDistributionTimestamp", params: [] },
|
|
44084
|
+
{ address: WITRY, name: "totalAssets", params: [] }
|
|
44085
|
+
],
|
|
44086
|
+
allowFailure: false
|
|
44087
|
+
});
|
|
44088
|
+
if (totalAssets === 0n) throw new Error("wiTRY: empty vault");
|
|
44089
|
+
const elapsed = BigInt(Math.floor(Date.now() / 1e3)) - lastDistribution;
|
|
44090
|
+
const window = elapsed > VESTING_PERIOD ? elapsed : VESTING_PERIOD;
|
|
44091
|
+
if (window <= 0n) throw new Error("wiTRY: bad vesting window");
|
|
44092
|
+
const perSecond = vestingAmount / window;
|
|
44093
|
+
const apr = Number(perSecond * YEAR_SECONDS9 * ONE_E188 / totalAssets) / 1e16;
|
|
44094
|
+
if (!Number.isFinite(apr) || apr <= 0) throw new Error("wiTRY: no yield");
|
|
44095
|
+
return apr;
|
|
44096
|
+
};
|
|
44097
|
+
var brixFetcher = {
|
|
44098
|
+
label: "WITRY",
|
|
44099
|
+
fetch: async () => {
|
|
44100
|
+
const apr = await fetchBrixAprPercent().catch(() => fetchWitryAprOnChain()).catch(
|
|
44101
|
+
async () => apyToAprPercent(await fetchDefiLlamaApy(BRIX_DEFILLAMA_POOL))
|
|
44102
|
+
).catch(() => 0);
|
|
44103
|
+
return { [WITRY_KEY]: apr, [WITRY_GROUP_KEY]: apr };
|
|
44104
|
+
}
|
|
44105
|
+
};
|
|
44106
|
+
var CHAIN_ID10 = Chain.ETHEREUM_MAINNET;
|
|
44036
44107
|
var APYUSD = "0x38eeb52f0771140d10c4e9a9a72349a329fe8a6a";
|
|
44037
44108
|
var APYX_LINEAR_VEST = "0x0d62b4cc02b4b51ed19ddf41d7a7979cf394c99f";
|
|
44038
44109
|
var APYX_DISCOVER_URL = "https://api.apyx.fi/v1/rewards/seasons/2/discover";
|
|
44039
44110
|
var APYX_DEFILLAMA_POOL = "cb6139f9-4a68-4efd-8245-0312a92aee55";
|
|
44040
|
-
var
|
|
44041
|
-
var
|
|
44111
|
+
var YEAR_SECONDS10 = 31536000n;
|
|
44112
|
+
var ONE_E189 = 10n ** 18n;
|
|
44042
44113
|
var APYUSD_KEY = "APYUSD";
|
|
44043
44114
|
var APYUSD_GROUP_KEY = "apyUSD::APYUSD";
|
|
44044
44115
|
var APYUSD_LEGACY_GROUP_KEY = "apyUSD::apyUSD";
|
|
@@ -44067,7 +44138,7 @@ var APYX_READ_ABI = [
|
|
|
44067
44138
|
];
|
|
44068
44139
|
var fetchApyusdAprOnChain = async () => {
|
|
44069
44140
|
const [totalAssets, unvested, periodRemaining] = await multicallRetryUniversal({
|
|
44070
|
-
chain:
|
|
44141
|
+
chain: CHAIN_ID10,
|
|
44071
44142
|
abi: APYX_READ_ABI,
|
|
44072
44143
|
calls: [
|
|
44073
44144
|
{ address: APYUSD, name: "totalAssets", params: [] },
|
|
@@ -44084,7 +44155,7 @@ var fetchApyusdAprOnChain = async () => {
|
|
|
44084
44155
|
throw new Error("apyx vesting state empty");
|
|
44085
44156
|
}
|
|
44086
44157
|
const perSecond = unvested / periodRemaining;
|
|
44087
|
-
return Number(perSecond *
|
|
44158
|
+
return Number(perSecond * YEAR_SECONDS10 * ONE_E189 / totalAssets) / 1e16;
|
|
44088
44159
|
};
|
|
44089
44160
|
var fetchApyusdApyFromApi = async () => {
|
|
44090
44161
|
const res = await fetch(APYX_DISCOVER_URL, {
|
|
@@ -44204,7 +44275,7 @@ var strataFetcher = {
|
|
|
44204
44275
|
}
|
|
44205
44276
|
};
|
|
44206
44277
|
var RAY7 = 10n ** 27n;
|
|
44207
|
-
var
|
|
44278
|
+
var YEAR_SECONDS11 = 31536e3;
|
|
44208
44279
|
var DSR_ABI = [
|
|
44209
44280
|
{
|
|
44210
44281
|
name: "dsr",
|
|
@@ -44232,7 +44303,7 @@ var SUSDD_GROUP_KEY = "Savings Usdd::sUSDD";
|
|
|
44232
44303
|
var aprFromDsr = (dsr) => {
|
|
44233
44304
|
if (dsr <= RAY7) return 0;
|
|
44234
44305
|
const perSecond = Number(dsr - RAY7) / 1e27;
|
|
44235
|
-
return perSecond *
|
|
44306
|
+
return perSecond * YEAR_SECONDS11 * 100;
|
|
44236
44307
|
};
|
|
44237
44308
|
var fetchChainDsr = async (chainId, pot) => {
|
|
44238
44309
|
const [dsr] = await multicallRetryUniversal({
|
|
@@ -46062,6 +46133,85 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
46062
46133
|
yieldFetcher: snusdFetcher,
|
|
46063
46134
|
yieldKey: SNUSD_KEY
|
|
46064
46135
|
},
|
|
46136
|
+
{
|
|
46137
|
+
// Brix wiTRY — StakedUSDeV2 clone over iTRY, a TURKISH LIRA stablecoin
|
|
46138
|
+
// backed by the Digital Liquidity Fund's DLF token (shares in a
|
|
46139
|
+
// regulated basket of Turkish money-market funds). Yield is the funds'
|
|
46140
|
+
// NAV delta, minted as fresh iTRY on a scheduled cycle (weekly at
|
|
46141
|
+
// launch) and `transferInRewards`'d into the vault, where it vests
|
|
46142
|
+
// linearly over a PRIVATE 248,400 s (69 h) constant — see
|
|
46143
|
+
// `fetchers/brix.ts` for how that was solved, and why the rate is not
|
|
46144
|
+
// read from a getter.
|
|
46145
|
+
//
|
|
46146
|
+
// THE RATE IS IN LIRA. 36-38 % is what Turkish money-market paper pays
|
|
46147
|
+
// BECAUSE the lira depreciates; a USD holder earns that minus the
|
|
46148
|
+
// TRY/USD drift, and historically the two have been close. Nothing in
|
|
46149
|
+
// the numeric fields can express that — `supplyRate` is asset-
|
|
46150
|
+
// denominated for every row on this surface — so the description below
|
|
46151
|
+
// is the only place it is stated, and it must stay there. Note also
|
|
46152
|
+
// that `denomination` classifies iTRY as `stable` (fiat-pegged, the
|
|
46153
|
+
// same call already made for ZCHF / EURA / TRYB): that axis means
|
|
46154
|
+
// "pegged to a currency", never "does not move against the dollar".
|
|
46155
|
+
//
|
|
46156
|
+
// Verified on-chain 2026-08-14: `silo()` = 0x1b301c81…, `unstake`,
|
|
46157
|
+
// `cooldownAssets`/`cooldownShares`, `MAX_COOLDOWN_DURATION` = 90 d,
|
|
46158
|
+
// `maxDeposit` = uint.max.
|
|
46159
|
+
//
|
|
46160
|
+
// `isMintable: false` — NOT because of a cap or a KYC gate on the vault,
|
|
46161
|
+
// which has neither, but because **the UNDERLYING is a permissioned
|
|
46162
|
+
// token**. iTRY is an Ethena `USDtb` clone sitting at
|
|
46163
|
+
// `transferState() == 1` (WHITELIST_ENABLED), whose transfer hook needs
|
|
46164
|
+
// BOTH `from` AND `to` to hold `WHITELISTED_ROLE` and otherwise reverts
|
|
46165
|
+
// `OperationNotAllowed()`. The role is held only by protocol plumbing
|
|
46166
|
+
// (this vault, the Silo, the Yield Forwarder, the OFT adapter, the
|
|
46167
|
+
// distributor), so an ordinary wallet cannot receive iTRY, cannot send
|
|
46168
|
+
// it, and therefore cannot stake OR unstake. `maxDeposit` reads
|
|
46169
|
+
// uint.max throughout — the vault has no idea. Fork-proven 2026-08-14:
|
|
46170
|
+
// the deposit reverts for a fresh account and the whole cycle succeeds
|
|
46171
|
+
// the moment the role is granted (see the worker-api fixture
|
|
46172
|
+
// `witry-cooldown-cycle.test.ts`, which fails loudly if
|
|
46173
|
+
// `transferState` ever reaches 2 so this flag gets flipped back).
|
|
46174
|
+
//
|
|
46175
|
+
// NB the vault's own `maxRedeem`/`maxWithdraw` report the full balance
|
|
46176
|
+
// while the cooldown is set even though `withdraw`/`redeem` revert —
|
|
46177
|
+
// family-wide StakedUSDeV2 behaviour (sNUSD does it too), not a Brix
|
|
46178
|
+
// bug. Never size an exit here off the 4626 views.
|
|
46179
|
+
//
|
|
46180
|
+
// COOLDOWN: the docs say 3 days; the contract answered **300 seconds**
|
|
46181
|
+
// on 2026-08-14, an owner-settable dial with no timelock and a 90-day
|
|
46182
|
+
// ceiling (docs also still label staking "coming soon" while $8.7M is
|
|
46183
|
+
// staked). The pin below is the documented steady state and the
|
|
46184
|
+
// `erc4626-cooldown` reader overrides it with the live value every
|
|
46185
|
+
// fetch, so neither number can go stale on the row.
|
|
46186
|
+
//
|
|
46187
|
+
// Ethereum-only. MegaETH (4326) carries same-address-book LayerZero
|
|
46188
|
+
// OFTs for both tokens — 94 % of the wiTRY supply actually sits there —
|
|
46189
|
+
// but that contract is a bare ERC-20: `asset()`, `totalAssets()`,
|
|
46190
|
+
// `cooldownDuration()` and `convertToAssets()` all revert, and the
|
|
46191
|
+
// staking logic is Ethereum-canonical (MegaETH stakes round-trip
|
|
46192
|
+
// through LayerZero OVault). A second row would be a second vault that
|
|
46193
|
+
// does not exist.
|
|
46194
|
+
reader: "erc4626-cooldown",
|
|
46195
|
+
address: "0xe346c29b5b60ef870b9724c57ccfbbc631e47dee",
|
|
46196
|
+
underlying: "0xb492b4afd9658093694cf9452d5c272e8230f3b0",
|
|
46197
|
+
// iTRY
|
|
46198
|
+
symbol: "wiTRY",
|
|
46199
|
+
brand: "Brix",
|
|
46200
|
+
// The backing is a regulated fund's shares held with Zodia Custody plus
|
|
46201
|
+
// an on-chain Fast Access Vault, marked by a licensed administrator's
|
|
46202
|
+
// daily NAV. Attested, not verifiable on-chain — and Brix's own
|
|
46203
|
+
// Accountable proof-of-reserves dashboard is documented as launching
|
|
46204
|
+
// "day 1 of official launch", i.e. not live at integration.
|
|
46205
|
+
solvency: "nav-attested",
|
|
46206
|
+
description: "iTRY is a Turkish lira stablecoin backed by shares in a regulated basket of Turkish money-market funds, custodied off-chain and marked to a daily fund NAV. wiTRY stakes it: the NAV gain is minted as fresh iTRY weekly and vests into the share price over ~69 hours. NOT OPEN YET \u2014 iTRY transfers are whitelist-gated to the protocol's own contracts, so an ordinary wallet can neither hold nor stake it. The rate is earned in LIRA: Turkish paper pays this much because the lira depreciates, so a dollar-based holder keeps only what is left after the TRY/USD move.",
|
|
46207
|
+
decimals: 18,
|
|
46208
|
+
isRebasing: false,
|
|
46209
|
+
isMintable: false,
|
|
46210
|
+
withdrawalMode: "fixed-cooldown",
|
|
46211
|
+
withdrawalCooldownSeconds: 3 * 86400,
|
|
46212
|
+
yieldFetcher: brixFetcher,
|
|
46213
|
+
yieldKey: WITRY_KEY
|
|
46214
|
+
},
|
|
46065
46215
|
{
|
|
46066
46216
|
// Apyx apyUSD — ERC-4626 over apxUSD, the "Dividend-Backed
|
|
46067
46217
|
// Dollar" (variable-rate perpetual preferred stock of DAT
|
|
@@ -56359,7 +56509,7 @@ var Erc4626PreviewRedeemAbi = [
|
|
|
56359
56509
|
];
|
|
56360
56510
|
|
|
56361
56511
|
// src/vaults/lst/readers/shared.ts
|
|
56362
|
-
var
|
|
56512
|
+
var ONE_E1810 = 10n ** 18n;
|
|
56363
56513
|
var rescaleDecimals = (v, fromDec, toDec) => toDec >= fromDec ? v * 10n ** BigInt(toDec - fromDec) : v / 10n ** BigInt(fromDec - toDec);
|
|
56364
56514
|
var MULTICALL3_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
56365
56515
|
var Multicall3BalanceAbi = [
|
|
@@ -56402,7 +56552,7 @@ var readerBeetsStS = (entry) => ({
|
|
|
56402
56552
|
}
|
|
56403
56553
|
const liquidity = toBigInt14(pool);
|
|
56404
56554
|
return {
|
|
56405
|
-
totalAssets: totalSupply * exchangeRate /
|
|
56555
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
56406
56556
|
totalSupply,
|
|
56407
56557
|
exchangeRate,
|
|
56408
56558
|
liquidity
|
|
@@ -56435,7 +56585,7 @@ var readerBenqiSavax = (entry) => ({
|
|
|
56435
56585
|
{
|
|
56436
56586
|
address: entry.address,
|
|
56437
56587
|
name: "getPooledAvaxByShares",
|
|
56438
|
-
params: [
|
|
56588
|
+
params: [ONE_E1810]
|
|
56439
56589
|
},
|
|
56440
56590
|
{ address: entry.address, name: "totalPooledAvax", params: [] }
|
|
56441
56591
|
],
|
|
@@ -56446,7 +56596,7 @@ var readerBenqiSavax = (entry) => ({
|
|
|
56446
56596
|
if (totalSupply === void 0 || exchangeRate === void 0) {
|
|
56447
56597
|
return void 0;
|
|
56448
56598
|
}
|
|
56449
|
-
const totalAssets = toBigInt14(totalPooled) ?? totalSupply * exchangeRate /
|
|
56599
|
+
const totalAssets = toBigInt14(totalPooled) ?? totalSupply * exchangeRate / ONE_E1810;
|
|
56450
56600
|
return {
|
|
56451
56601
|
totalAssets,
|
|
56452
56602
|
totalSupply,
|
|
@@ -56465,7 +56615,7 @@ var readerBgtWrapper1to1 = (entry) => ({
|
|
|
56465
56615
|
return {
|
|
56466
56616
|
totalAssets: totalSupply,
|
|
56467
56617
|
totalSupply,
|
|
56468
|
-
exchangeRate:
|
|
56618
|
+
exchangeRate: ONE_E1810
|
|
56469
56619
|
};
|
|
56470
56620
|
}
|
|
56471
56621
|
});
|
|
@@ -56495,7 +56645,7 @@ var readerDineroBeraEth = (entry) => ({
|
|
|
56495
56645
|
return void 0;
|
|
56496
56646
|
}
|
|
56497
56647
|
return {
|
|
56498
|
-
totalAssets: totalSupply * exchangeRate /
|
|
56648
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
56499
56649
|
totalSupply,
|
|
56500
56650
|
exchangeRate
|
|
56501
56651
|
};
|
|
@@ -56507,7 +56657,7 @@ var readerErc4626 = (entry) => ({
|
|
|
56507
56657
|
calls: [
|
|
56508
56658
|
{ address: entry.address, name: "totalAssets", params: [] },
|
|
56509
56659
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
56510
|
-
{ address: entry.address, name: "convertToAssets", params: [
|
|
56660
|
+
{ address: entry.address, name: "convertToAssets", params: [ONE_E1810] }
|
|
56511
56661
|
],
|
|
56512
56662
|
abis: [Erc4626ReadAbi, TotalSupplyAbi, Erc4626ReadAbi],
|
|
56513
56663
|
parse: ([assets, supply, rate]) => {
|
|
@@ -56524,7 +56674,7 @@ var readerErc4626PreviewRedeem = (entry) => ({
|
|
|
56524
56674
|
calls: [
|
|
56525
56675
|
{ address: entry.address, name: "totalAssets", params: [] },
|
|
56526
56676
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
56527
|
-
{ address: entry.address, name: "previewRedeem", params: [
|
|
56677
|
+
{ address: entry.address, name: "previewRedeem", params: [ONE_E1810] }
|
|
56528
56678
|
],
|
|
56529
56679
|
abis: [Erc4626PreviewRedeemAbi, TotalSupplyAbi, Erc4626PreviewRedeemAbi],
|
|
56530
56680
|
parse: ([assets, supply, rate]) => {
|
|
@@ -56604,7 +56754,7 @@ var readerEtherFiWeEth = (entry) => {
|
|
|
56604
56754
|
}
|
|
56605
56755
|
}
|
|
56606
56756
|
return {
|
|
56607
|
-
totalAssets: totalSupply * exchangeRate /
|
|
56757
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
56608
56758
|
totalSupply,
|
|
56609
56759
|
exchangeRate,
|
|
56610
56760
|
liquidity
|
|
@@ -56637,7 +56787,7 @@ var readerHyperbeatBeHype = (entry) => {
|
|
|
56637
56787
|
return {
|
|
56638
56788
|
totalAssets: totalSupply,
|
|
56639
56789
|
totalSupply,
|
|
56640
|
-
exchangeRate:
|
|
56790
|
+
exchangeRate: ONE_E1810
|
|
56641
56791
|
};
|
|
56642
56792
|
}
|
|
56643
56793
|
};
|
|
@@ -56645,7 +56795,7 @@ var readerHyperbeatBeHype = (entry) => {
|
|
|
56645
56795
|
return {
|
|
56646
56796
|
calls: [
|
|
56647
56797
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
56648
|
-
{ address: stakingCore, name: "BeHYPEToHYPE", params: [
|
|
56798
|
+
{ address: stakingCore, name: "BeHYPEToHYPE", params: [ONE_E1810] }
|
|
56649
56799
|
],
|
|
56650
56800
|
abis: [TotalSupplyAbi, HyperbeatStakingCoreAbi],
|
|
56651
56801
|
parse: ([supply, rate]) => {
|
|
@@ -56655,7 +56805,7 @@ var readerHyperbeatBeHype = (entry) => {
|
|
|
56655
56805
|
return void 0;
|
|
56656
56806
|
}
|
|
56657
56807
|
return {
|
|
56658
|
-
totalAssets: totalSupply * exchangeRate /
|
|
56808
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
56659
56809
|
totalSupply,
|
|
56660
56810
|
exchangeRate
|
|
56661
56811
|
};
|
|
@@ -56687,7 +56837,7 @@ var readerKelpRsEth = (entry) => {
|
|
|
56687
56837
|
return {
|
|
56688
56838
|
totalAssets: totalSupply,
|
|
56689
56839
|
totalSupply,
|
|
56690
|
-
exchangeRate:
|
|
56840
|
+
exchangeRate: ONE_E1810
|
|
56691
56841
|
};
|
|
56692
56842
|
}
|
|
56693
56843
|
};
|
|
@@ -56705,7 +56855,7 @@ var readerKelpRsEth = (entry) => {
|
|
|
56705
56855
|
return void 0;
|
|
56706
56856
|
}
|
|
56707
56857
|
return {
|
|
56708
|
-
totalAssets: totalSupply * exchangeRate /
|
|
56858
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
56709
56859
|
totalSupply,
|
|
56710
56860
|
exchangeRate
|
|
56711
56861
|
};
|
|
@@ -56737,7 +56887,7 @@ var readerKinetiqKHype = (entry) => {
|
|
|
56737
56887
|
return {
|
|
56738
56888
|
totalAssets: totalSupply,
|
|
56739
56889
|
totalSupply,
|
|
56740
|
-
exchangeRate:
|
|
56890
|
+
exchangeRate: ONE_E1810
|
|
56741
56891
|
};
|
|
56742
56892
|
}
|
|
56743
56893
|
};
|
|
@@ -56745,7 +56895,7 @@ var readerKinetiqKHype = (entry) => {
|
|
|
56745
56895
|
return {
|
|
56746
56896
|
calls: [
|
|
56747
56897
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
56748
|
-
{ address: accountant, name: "kHYPEToHYPE", params: [
|
|
56898
|
+
{ address: accountant, name: "kHYPEToHYPE", params: [ONE_E1810] }
|
|
56749
56899
|
],
|
|
56750
56900
|
abis: [TotalSupplyAbi, KinetiqStakingAccountantAbi],
|
|
56751
56901
|
parse: ([supply, rate]) => {
|
|
@@ -56755,7 +56905,7 @@ var readerKinetiqKHype = (entry) => {
|
|
|
56755
56905
|
return void 0;
|
|
56756
56906
|
}
|
|
56757
56907
|
return {
|
|
56758
|
-
totalAssets: totalSupply * exchangeRate /
|
|
56908
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
56759
56909
|
totalSupply,
|
|
56760
56910
|
exchangeRate
|
|
56761
56911
|
};
|
|
@@ -56795,7 +56945,7 @@ var readerLairStKaia = (entry) => ({
|
|
|
56795
56945
|
if (totalSupply === void 0 || exchangeRate === void 0) {
|
|
56796
56946
|
return void 0;
|
|
56797
56947
|
}
|
|
56798
|
-
const totalAssets = toBigInt14(totalStaking) ?? totalSupply * exchangeRate /
|
|
56948
|
+
const totalAssets = toBigInt14(totalStaking) ?? totalSupply * exchangeRate / ONE_E1810;
|
|
56799
56949
|
return {
|
|
56800
56950
|
totalAssets,
|
|
56801
56951
|
totalSupply,
|
|
@@ -56829,7 +56979,7 @@ var readerLidoWstEth = (entry) => ({
|
|
|
56829
56979
|
return void 0;
|
|
56830
56980
|
}
|
|
56831
56981
|
return {
|
|
56832
|
-
totalAssets: totalSupply * exchangeRate /
|
|
56982
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
56833
56983
|
totalSupply,
|
|
56834
56984
|
exchangeRate
|
|
56835
56985
|
};
|
|
@@ -56867,7 +57017,7 @@ var readerListaSlisBnb = (entry) => {
|
|
|
56867
57017
|
return {
|
|
56868
57018
|
totalAssets: totalSupply,
|
|
56869
57019
|
totalSupply,
|
|
56870
|
-
exchangeRate:
|
|
57020
|
+
exchangeRate: ONE_E1810
|
|
56871
57021
|
};
|
|
56872
57022
|
}
|
|
56873
57023
|
};
|
|
@@ -56875,7 +57025,7 @@ var readerListaSlisBnb = (entry) => {
|
|
|
56875
57025
|
return {
|
|
56876
57026
|
calls: [
|
|
56877
57027
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
56878
|
-
{ address: manager, name: "convertSnBnbToBnb", params: [
|
|
57028
|
+
{ address: manager, name: "convertSnBnbToBnb", params: [ONE_E1810] },
|
|
56879
57029
|
{ address: manager, name: "getTotalPooledBnb", params: [] }
|
|
56880
57030
|
],
|
|
56881
57031
|
abis: [TotalSupplyAbi, ListaStakeManagerReadAbi, ListaStakeManagerReadAbi],
|
|
@@ -56886,7 +57036,7 @@ var readerListaSlisBnb = (entry) => {
|
|
|
56886
57036
|
return void 0;
|
|
56887
57037
|
}
|
|
56888
57038
|
const pooledBnb = toBigInt14(pooled);
|
|
56889
|
-
const totalAssets = pooledBnb ?? totalSupply * exchangeRate /
|
|
57039
|
+
const totalAssets = pooledBnb ?? totalSupply * exchangeRate / ONE_E1810;
|
|
56890
57040
|
return { totalAssets, totalSupply, exchangeRate };
|
|
56891
57041
|
}
|
|
56892
57042
|
};
|
|
@@ -56916,7 +57066,7 @@ var readerMantleMEth = (entry) => {
|
|
|
56916
57066
|
return {
|
|
56917
57067
|
totalAssets: totalSupply,
|
|
56918
57068
|
totalSupply,
|
|
56919
|
-
exchangeRate:
|
|
57069
|
+
exchangeRate: ONE_E1810
|
|
56920
57070
|
};
|
|
56921
57071
|
}
|
|
56922
57072
|
};
|
|
@@ -56924,7 +57074,7 @@ var readerMantleMEth = (entry) => {
|
|
|
56924
57074
|
return {
|
|
56925
57075
|
calls: [
|
|
56926
57076
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
56927
|
-
{ address: staking, name: "mETHToETH", params: [
|
|
57077
|
+
{ address: staking, name: "mETHToETH", params: [ONE_E1810] }
|
|
56928
57078
|
],
|
|
56929
57079
|
abis: [TotalSupplyAbi, MantleStakingAbi],
|
|
56930
57080
|
parse: ([supply, rate]) => {
|
|
@@ -56934,7 +57084,7 @@ var readerMantleMEth = (entry) => {
|
|
|
56934
57084
|
return void 0;
|
|
56935
57085
|
}
|
|
56936
57086
|
return {
|
|
56937
|
-
totalAssets: totalSupply * exchangeRate /
|
|
57087
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
56938
57088
|
totalSupply,
|
|
56939
57089
|
exchangeRate
|
|
56940
57090
|
};
|
|
@@ -56955,7 +57105,7 @@ var readerOffChain = (entry) => {
|
|
|
56955
57105
|
return {
|
|
56956
57106
|
totalAssets: rescaleDecimals(totalSupply, shareDec, underlyingDec),
|
|
56957
57107
|
totalSupply,
|
|
56958
|
-
exchangeRate:
|
|
57108
|
+
exchangeRate: ONE_E1810
|
|
56959
57109
|
};
|
|
56960
57110
|
}
|
|
56961
57111
|
};
|
|
@@ -56989,7 +57139,7 @@ var readerRenzoEzEth = (entry) => {
|
|
|
56989
57139
|
return {
|
|
56990
57140
|
totalAssets: totalSupply,
|
|
56991
57141
|
totalSupply,
|
|
56992
|
-
exchangeRate:
|
|
57142
|
+
exchangeRate: ONE_E1810
|
|
56993
57143
|
};
|
|
56994
57144
|
}
|
|
56995
57145
|
};
|
|
@@ -57008,7 +57158,7 @@ var readerRenzoEzEth = (entry) => {
|
|
|
57008
57158
|
return {
|
|
57009
57159
|
totalAssets: totalTvl,
|
|
57010
57160
|
totalSupply,
|
|
57011
|
-
exchangeRate: totalTvl *
|
|
57161
|
+
exchangeRate: totalTvl * ONE_E1810 / totalSupply
|
|
57012
57162
|
};
|
|
57013
57163
|
}
|
|
57014
57164
|
};
|
|
@@ -57064,7 +57214,7 @@ var readerRocketReth = (entry) => {
|
|
|
57064
57214
|
}
|
|
57065
57215
|
const liquidity = depositPool ? toBigInt14(slice2[2]) : void 0;
|
|
57066
57216
|
return {
|
|
57067
|
-
totalAssets: totalSupply * exchangeRate /
|
|
57217
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
57068
57218
|
totalSupply,
|
|
57069
57219
|
exchangeRate,
|
|
57070
57220
|
liquidity
|
|
@@ -57106,7 +57256,7 @@ var readerStaderEthx = (entry) => {
|
|
|
57106
57256
|
return {
|
|
57107
57257
|
totalAssets: totalSupply,
|
|
57108
57258
|
totalSupply,
|
|
57109
|
-
exchangeRate:
|
|
57259
|
+
exchangeRate: ONE_E1810
|
|
57110
57260
|
};
|
|
57111
57261
|
}
|
|
57112
57262
|
};
|
|
@@ -57124,7 +57274,7 @@ var readerStaderEthx = (entry) => {
|
|
|
57124
57274
|
return void 0;
|
|
57125
57275
|
}
|
|
57126
57276
|
return {
|
|
57127
|
-
totalAssets: totalSupply * exchangeRate /
|
|
57277
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
57128
57278
|
totalSupply,
|
|
57129
57279
|
exchangeRate
|
|
57130
57280
|
};
|
|
@@ -57141,7 +57291,7 @@ var readerStaderMaticX = (entry) => {
|
|
|
57141
57291
|
{
|
|
57142
57292
|
address: rateAddress,
|
|
57143
57293
|
name: "convertMaticXToMatic",
|
|
57144
|
-
params: [
|
|
57294
|
+
params: [ONE_E1810],
|
|
57145
57295
|
chainId: homeChainId
|
|
57146
57296
|
}
|
|
57147
57297
|
],
|
|
@@ -57156,7 +57306,7 @@ var readerStaderMaticX = (entry) => {
|
|
|
57156
57306
|
}
|
|
57157
57307
|
const isCrossChain = homeContract !== void 0;
|
|
57158
57308
|
return {
|
|
57159
|
-
totalAssets: isCrossChain ? totalSupply * amountInMatic /
|
|
57309
|
+
totalAssets: isCrossChain ? totalSupply * amountInMatic / ONE_E1810 : totalPooledMatic ?? totalSupply * amountInMatic / ONE_E1810,
|
|
57160
57310
|
totalSupply,
|
|
57161
57311
|
exchangeRate: amountInMatic
|
|
57162
57312
|
};
|
|
@@ -57188,7 +57338,7 @@ var readerStakeWiseOsEth = (entry) => {
|
|
|
57188
57338
|
return {
|
|
57189
57339
|
totalAssets: totalSupply,
|
|
57190
57340
|
totalSupply,
|
|
57191
|
-
exchangeRate:
|
|
57341
|
+
exchangeRate: ONE_E1810
|
|
57192
57342
|
};
|
|
57193
57343
|
}
|
|
57194
57344
|
};
|
|
@@ -57196,7 +57346,7 @@ var readerStakeWiseOsEth = (entry) => {
|
|
|
57196
57346
|
return {
|
|
57197
57347
|
calls: [
|
|
57198
57348
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
57199
|
-
{ address: controller, name: "convertToAssets", params: [
|
|
57349
|
+
{ address: controller, name: "convertToAssets", params: [ONE_E1810] }
|
|
57200
57350
|
],
|
|
57201
57351
|
abis: [TotalSupplyAbi, StakeWiseOsTokenAbi],
|
|
57202
57352
|
parse: ([supply, rate]) => {
|
|
@@ -57206,7 +57356,7 @@ var readerStakeWiseOsEth = (entry) => {
|
|
|
57206
57356
|
return void 0;
|
|
57207
57357
|
}
|
|
57208
57358
|
return {
|
|
57209
|
-
totalAssets: totalSupply * exchangeRate /
|
|
57359
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
57210
57360
|
totalSupply,
|
|
57211
57361
|
exchangeRate
|
|
57212
57362
|
};
|
|
@@ -57238,7 +57388,7 @@ var readerStCelo = (entry) => {
|
|
|
57238
57388
|
return {
|
|
57239
57389
|
totalAssets: totalSupply,
|
|
57240
57390
|
totalSupply,
|
|
57241
|
-
exchangeRate:
|
|
57391
|
+
exchangeRate: ONE_E1810
|
|
57242
57392
|
};
|
|
57243
57393
|
}
|
|
57244
57394
|
};
|
|
@@ -57246,7 +57396,7 @@ var readerStCelo = (entry) => {
|
|
|
57246
57396
|
return {
|
|
57247
57397
|
calls: [
|
|
57248
57398
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
57249
|
-
{ address: manager, name: "toCelo", params: [
|
|
57399
|
+
{ address: manager, name: "toCelo", params: [ONE_E1810] }
|
|
57250
57400
|
],
|
|
57251
57401
|
abis: [TotalSupplyAbi, StCeloManagerAbi],
|
|
57252
57402
|
parse: ([supply, rate]) => {
|
|
@@ -57256,7 +57406,7 @@ var readerStCelo = (entry) => {
|
|
|
57256
57406
|
return void 0;
|
|
57257
57407
|
}
|
|
57258
57408
|
return {
|
|
57259
|
-
totalAssets: totalSupply * exchangeRate /
|
|
57409
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
57260
57410
|
totalSupply,
|
|
57261
57411
|
exchangeRate
|
|
57262
57412
|
};
|
|
@@ -57289,7 +57439,7 @@ var readerSwellGetRate = (entry) => ({
|
|
|
57289
57439
|
return void 0;
|
|
57290
57440
|
}
|
|
57291
57441
|
return {
|
|
57292
|
-
totalAssets: totalSupply * exchangeRate /
|
|
57442
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
57293
57443
|
totalSupply,
|
|
57294
57444
|
exchangeRate
|
|
57295
57445
|
};
|
|
@@ -57320,7 +57470,7 @@ var readerValantisWstHype = (entry) => {
|
|
|
57320
57470
|
return {
|
|
57321
57471
|
totalAssets: totalSupply,
|
|
57322
57472
|
totalSupply,
|
|
57323
|
-
exchangeRate:
|
|
57473
|
+
exchangeRate: ONE_E1810
|
|
57324
57474
|
};
|
|
57325
57475
|
}
|
|
57326
57476
|
};
|
|
@@ -57338,7 +57488,7 @@ var readerValantisWstHype = (entry) => {
|
|
|
57338
57488
|
return void 0;
|
|
57339
57489
|
}
|
|
57340
57490
|
return {
|
|
57341
|
-
totalAssets: totalSupply * exchangeRate /
|
|
57491
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
57342
57492
|
totalSupply,
|
|
57343
57493
|
exchangeRate
|
|
57344
57494
|
};
|
|
@@ -57372,7 +57522,7 @@ var readerVedaAccountant = (entry) => {
|
|
|
57372
57522
|
return {
|
|
57373
57523
|
totalAssets: rescaleDecimals(totalSupply, shareDec, underlyingDec),
|
|
57374
57524
|
totalSupply,
|
|
57375
|
-
exchangeRate:
|
|
57525
|
+
exchangeRate: ONE_E1810
|
|
57376
57526
|
};
|
|
57377
57527
|
}
|
|
57378
57528
|
};
|
|
@@ -57391,7 +57541,7 @@ var readerVedaAccountant = (entry) => {
|
|
|
57391
57541
|
const exchangeRate = rawRate * scale3;
|
|
57392
57542
|
return {
|
|
57393
57543
|
totalAssets: rescaleDecimals(
|
|
57394
|
-
totalSupply * exchangeRate /
|
|
57544
|
+
totalSupply * exchangeRate / ONE_E1810,
|
|
57395
57545
|
shareDec,
|
|
57396
57546
|
underlyingDec
|
|
57397
57547
|
),
|
|
@@ -57427,9 +57577,9 @@ var readerAnkrRatio = (entry) => ({
|
|
|
57427
57577
|
return void 0;
|
|
57428
57578
|
}
|
|
57429
57579
|
return {
|
|
57430
|
-
totalAssets: totalSupply *
|
|
57580
|
+
totalAssets: totalSupply * ONE_E1810 / r,
|
|
57431
57581
|
totalSupply,
|
|
57432
|
-
exchangeRate:
|
|
57582
|
+
exchangeRate: ONE_E1810 * ONE_E1810 / r
|
|
57433
57583
|
};
|
|
57434
57584
|
}
|
|
57435
57585
|
});
|
|
@@ -57459,7 +57609,7 @@ var readerBinanceWbeth = (entry) => ({
|
|
|
57459
57609
|
return void 0;
|
|
57460
57610
|
}
|
|
57461
57611
|
return {
|
|
57462
|
-
totalAssets: totalSupply * exchangeRate /
|
|
57612
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
57463
57613
|
totalSupply,
|
|
57464
57614
|
exchangeRate
|
|
57465
57615
|
};
|
|
@@ -57505,7 +57655,7 @@ var readerCoreEarnRate = (entry) => {
|
|
|
57505
57655
|
return {
|
|
57506
57656
|
totalAssets: totalSupply * r / CORE_RATE_DENOM,
|
|
57507
57657
|
totalSupply,
|
|
57508
|
-
exchangeRate: r *
|
|
57658
|
+
exchangeRate: r * ONE_E1810 / CORE_RATE_DENOM
|
|
57509
57659
|
};
|
|
57510
57660
|
}
|
|
57511
57661
|
};
|
|
@@ -57527,7 +57677,7 @@ var readerCoreStakedRatio = (entry) => {
|
|
|
57527
57677
|
return {
|
|
57528
57678
|
totalAssets: totalStaked,
|
|
57529
57679
|
totalSupply,
|
|
57530
|
-
exchangeRate: totalStaked *
|
|
57680
|
+
exchangeRate: totalStaked * ONE_E1810 / totalSupply
|
|
57531
57681
|
};
|
|
57532
57682
|
}
|
|
57533
57683
|
};
|
|
@@ -57562,7 +57712,7 @@ var readerKintsuSMon = (entry) => ({
|
|
|
57562
57712
|
const totalAssets = toBigInt14(pooled);
|
|
57563
57713
|
const totalSupply = toBigInt14(shares);
|
|
57564
57714
|
if (totalAssets === void 0 || totalSupply === void 0) return void 0;
|
|
57565
|
-
const exchangeRate = totalSupply > 0n ? totalAssets *
|
|
57715
|
+
const exchangeRate = totalSupply > 0n ? totalAssets * ONE_E1810 / totalSupply : ONE_E1810;
|
|
57566
57716
|
return { totalAssets, totalSupply, exchangeRate };
|
|
57567
57717
|
}
|
|
57568
57718
|
});
|
|
@@ -57998,7 +58148,7 @@ var getLstValidators = async (chainId, shareToken) => {
|
|
|
57998
58148
|
};
|
|
57999
58149
|
|
|
58000
58150
|
// src/vaults/lst/fetchPublic.ts
|
|
58001
|
-
var
|
|
58151
|
+
var ONE_E1811 = 10n ** 18n;
|
|
58002
58152
|
var ERC20_BALANCE_ABI = parseAbi([
|
|
58003
58153
|
"function balanceOf(address) view returns (uint256)"
|
|
58004
58154
|
]);
|
|
@@ -58113,8 +58263,8 @@ var fetchLstShareTokens = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
58113
58263
|
const underlyingUnit = 10n ** BigInt(underlyingDec);
|
|
58114
58264
|
const totalAssetsFormatted = Number(state.totalAssets) / 10 ** underlyingDec;
|
|
58115
58265
|
const totalAssetsUsd = priceUsd !== void 0 ? totalAssetsFormatted * priceUsd : 0;
|
|
58116
|
-
const convertToAssets = state.exchangeRate * underlyingUnit /
|
|
58117
|
-
const convertToShares = state.exchangeRate > 0n ?
|
|
58266
|
+
const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E1811;
|
|
58267
|
+
const convertToShares = state.exchangeRate > 0n ? ONE_E1811 * shareUnit / state.exchangeRate : 0n;
|
|
58118
58268
|
let liquidityRaw;
|
|
58119
58269
|
if (state.liquidity !== void 0) {
|
|
58120
58270
|
liquidityRaw = state.liquidity;
|
|
@@ -60912,6 +61062,17 @@ var LST_WITHDRAWAL_REGISTRY = {
|
|
|
60912
61062
|
symbol: "sNUSD",
|
|
60913
61063
|
reader: "ethenaCooldown"
|
|
60914
61064
|
},
|
|
61065
|
+
{
|
|
61066
|
+
// Brix wiTRY — StakedUSDeV2 clone over iTRY (Turkish lira); same
|
|
61067
|
+
// cooldowns(address) escrow, claim via `unstake`. The duration is
|
|
61068
|
+
// owner-settable with no timelock (documented 3 d, live 300 s on
|
|
61069
|
+
// 2026-08-14, 90 d ceiling), which is exactly why the pending exit is
|
|
61070
|
+
// read per-user from `cooldowns()` rather than derived from a constant.
|
|
61071
|
+
lst: "0xe346c29b5b60ef870b9724c57ccfbbc631e47dee",
|
|
61072
|
+
brand: "Brix",
|
|
61073
|
+
symbol: "wiTRY",
|
|
61074
|
+
reader: "ethenaCooldown"
|
|
61075
|
+
},
|
|
60915
61076
|
{
|
|
60916
61077
|
// 3Jane sUSD3 — startCooldown(shares) → 30d → plain 4626 redeem
|
|
60917
61078
|
// inside the withdrawal window; getCooldownStatus(address) getter.
|
|
@@ -61546,6 +61707,15 @@ var Erc4626ReadAbi2 = [
|
|
|
61546
61707
|
outputs: [{ type: "uint256", name: "assets" }]
|
|
61547
61708
|
}
|
|
61548
61709
|
];
|
|
61710
|
+
var CooldownDurationAbi = [
|
|
61711
|
+
{
|
|
61712
|
+
name: "cooldownDuration",
|
|
61713
|
+
type: "function",
|
|
61714
|
+
stateMutability: "view",
|
|
61715
|
+
inputs: [],
|
|
61716
|
+
outputs: [{ type: "uint24" }]
|
|
61717
|
+
}
|
|
61718
|
+
];
|
|
61549
61719
|
var NavOracleReadAbi = [
|
|
61550
61720
|
{
|
|
61551
61721
|
name: "latestRoundData",
|
|
@@ -61563,7 +61733,7 @@ var NavOracleReadAbi = [
|
|
|
61563
61733
|
];
|
|
61564
61734
|
|
|
61565
61735
|
// src/vaults/savings/readers/shared.ts
|
|
61566
|
-
var
|
|
61736
|
+
var ONE_E1812 = 10n ** 18n;
|
|
61567
61737
|
var toBigInt16 = (v) => {
|
|
61568
61738
|
if (v === void 0 || v === null) return void 0;
|
|
61569
61739
|
if (typeof v === "bigint") return v;
|
|
@@ -61604,7 +61774,37 @@ var readerErc46262 = (entry) => {
|
|
|
61604
61774
|
return {
|
|
61605
61775
|
totalAssets,
|
|
61606
61776
|
totalSupply,
|
|
61607
|
-
exchangeRate: convertToAssetsRaw *
|
|
61777
|
+
exchangeRate: convertToAssetsRaw * ONE_E1812 / underlyingUnit
|
|
61778
|
+
};
|
|
61779
|
+
}
|
|
61780
|
+
};
|
|
61781
|
+
};
|
|
61782
|
+
|
|
61783
|
+
// src/vaults/savings/readers/erc4626Cooldown.ts
|
|
61784
|
+
var readerErc4626Cooldown = (entry) => {
|
|
61785
|
+
const shareUnit = 10n ** BigInt(entry.decimals);
|
|
61786
|
+
const underlyingUnit = 10n ** BigInt(entry.underlyingDecimals ?? entry.decimals);
|
|
61787
|
+
return {
|
|
61788
|
+
calls: [
|
|
61789
|
+
{ address: entry.address, name: "totalAssets", params: [] },
|
|
61790
|
+
{ address: entry.address, name: "totalSupply", params: [] },
|
|
61791
|
+
{ address: entry.address, name: "convertToAssets", params: [shareUnit] },
|
|
61792
|
+
{ address: entry.address, name: "cooldownDuration", params: [] }
|
|
61793
|
+
],
|
|
61794
|
+
abis: [Erc4626ReadAbi2, TotalSupplyAbi2, Erc4626ReadAbi2, CooldownDurationAbi],
|
|
61795
|
+
parse: ([assets, supply, rate, cooldown]) => {
|
|
61796
|
+
const totalAssets = toBigInt16(assets);
|
|
61797
|
+
const totalSupply = toBigInt16(supply);
|
|
61798
|
+
const convertToAssetsRaw = toBigInt16(rate);
|
|
61799
|
+
if (totalAssets === void 0 || totalSupply === void 0 || convertToAssetsRaw === void 0) {
|
|
61800
|
+
return void 0;
|
|
61801
|
+
}
|
|
61802
|
+
const cooldownSecs = toBigInt16(cooldown);
|
|
61803
|
+
return {
|
|
61804
|
+
totalAssets,
|
|
61805
|
+
totalSupply,
|
|
61806
|
+
exchangeRate: convertToAssetsRaw * ONE_E1812 / underlyingUnit,
|
|
61807
|
+
withdrawalCooldownSeconds: cooldownSecs === void 0 ? void 0 : Number(cooldownSecs)
|
|
61608
61808
|
};
|
|
61609
61809
|
}
|
|
61610
61810
|
};
|
|
@@ -61793,7 +61993,7 @@ var readerErc4626Idle = (entry) => {
|
|
|
61793
61993
|
return {
|
|
61794
61994
|
totalAssets,
|
|
61795
61995
|
totalSupply,
|
|
61796
|
-
exchangeRate: convertToAssetsRaw *
|
|
61996
|
+
exchangeRate: convertToAssetsRaw * ONE_E1812 / underlyingUnit,
|
|
61797
61997
|
...capacity !== void 0 ? {
|
|
61798
61998
|
instantRedeemCapacity: capacity,
|
|
61799
61999
|
instantRedeemEnabled: true,
|
|
@@ -61842,7 +62042,7 @@ var readerErc4626WithdrawLimit = (entry) => {
|
|
|
61842
62042
|
return {
|
|
61843
62043
|
totalAssets,
|
|
61844
62044
|
totalSupply,
|
|
61845
|
-
exchangeRate: convertToAssetsRaw *
|
|
62045
|
+
exchangeRate: convertToAssetsRaw * ONE_E1812 / underlyingUnit,
|
|
61846
62046
|
...capacity !== void 0 ? {
|
|
61847
62047
|
instantRedeemCapacity: capacity,
|
|
61848
62048
|
instantRedeemEnabled: true,
|
|
@@ -61871,7 +62071,7 @@ var readerFrankencoinSavings = (entry) => ({
|
|
|
61871
62071
|
// `fetchPublic` derives `convertToAssets` / `convertToShares` from
|
|
61872
62072
|
// `exchangeRate`, and 1e18 makes them the identity.
|
|
61873
62073
|
totalSupply: deposits,
|
|
61874
|
-
exchangeRate:
|
|
62074
|
+
exchangeRate: ONE_E1812
|
|
61875
62075
|
};
|
|
61876
62076
|
}
|
|
61877
62077
|
});
|
|
@@ -61897,7 +62097,7 @@ var readerNavOracle = (entry) => {
|
|
|
61897
62097
|
const exchangeRate = toBigInt16(raw);
|
|
61898
62098
|
if (exchangeRate === void 0 || exchangeRate <= 0n) return void 0;
|
|
61899
62099
|
return {
|
|
61900
|
-
totalAssets: totalSupply * exchangeRate * underlyingUnit / (
|
|
62100
|
+
totalAssets: totalSupply * exchangeRate * underlyingUnit / (ONE_E1812 * shareUnit),
|
|
61901
62101
|
totalSupply,
|
|
61902
62102
|
exchangeRate
|
|
61903
62103
|
};
|
|
@@ -61911,7 +62111,7 @@ var readerNativeWnlp = (entry) => {
|
|
|
61911
62111
|
return {
|
|
61912
62112
|
calls: [
|
|
61913
62113
|
{ address, name: "totalSupply", params: [] },
|
|
61914
|
-
{ address, name: "getNlpByWnlp", params: [
|
|
62114
|
+
{ address, name: "getNlpByWnlp", params: [ONE_E1812] },
|
|
61915
62115
|
{ address, name: "instantRedeemFeeBips", params: [] },
|
|
61916
62116
|
{ address, name: "instantRedeemEnabled", params: [] },
|
|
61917
62117
|
// Falls back to the vault itself when no CreditVault is pinned —
|
|
@@ -61945,7 +62145,7 @@ var readerNativeWnlp = (entry) => {
|
|
|
61945
62145
|
const windowSeconds = toBigInt16(window);
|
|
61946
62146
|
const bips = toBigInt16(feeBips);
|
|
61947
62147
|
return {
|
|
61948
|
-
totalAssets: totalSupply * exchangeRate /
|
|
62148
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1812,
|
|
61949
62149
|
totalSupply,
|
|
61950
62150
|
exchangeRate,
|
|
61951
62151
|
// `instantRedeemFeeBips` on-chain is already basis points, so it
|
|
@@ -61963,7 +62163,7 @@ var readerNativeWnlp = (entry) => {
|
|
|
61963
62163
|
};
|
|
61964
62164
|
|
|
61965
62165
|
// src/vaults/savings/readers/yieldBasisLt.ts
|
|
61966
|
-
var ONE_SHARE =
|
|
62166
|
+
var ONE_SHARE = ONE_E1812;
|
|
61967
62167
|
var readerYieldBasisLt = (entry) => {
|
|
61968
62168
|
const underlyingUnit = 10n ** BigInt(entry.underlyingDecimals ?? entry.decimals);
|
|
61969
62169
|
const amm = entry.capacityContract ?? entry.address;
|
|
@@ -61991,7 +62191,7 @@ var readerYieldBasisLt = (entry) => {
|
|
|
61991
62191
|
}
|
|
61992
62192
|
if (totalSupply === 0n || redeemRaw === 0n) return void 0;
|
|
61993
62193
|
const totalAssets = totalSupply * redeemRaw / ONE_SHARE;
|
|
61994
|
-
const exchangeRate = redeemRaw *
|
|
62194
|
+
const exchangeRate = redeemRaw * ONE_E1812 / underlyingUnit;
|
|
61995
62195
|
const equity = Array.isArray(valueOracle) ? toBigInt16(valueOracle[1]) : toBigInt16(valueOracle?.value);
|
|
61996
62196
|
const cap = toBigInt16(maxDebt);
|
|
61997
62197
|
let depositCapacity;
|
|
@@ -62021,6 +62221,8 @@ var buildReader2 = (entry) => {
|
|
|
62021
62221
|
return readerFrankencoinSavings(entry);
|
|
62022
62222
|
case "yieldbasis-lt":
|
|
62023
62223
|
return readerYieldBasisLt(entry);
|
|
62224
|
+
case "erc4626-cooldown":
|
|
62225
|
+
return readerErc4626Cooldown(entry);
|
|
62024
62226
|
case "erc4626-idle":
|
|
62025
62227
|
return readerErc4626Idle(entry);
|
|
62026
62228
|
case "erc4626-withdraw-limit":
|
|
@@ -62035,7 +62237,7 @@ var buildReader2 = (entry) => {
|
|
|
62035
62237
|
var resolveYieldApr2 = async (entries) => (await resolveEntryApr(entries)).apr;
|
|
62036
62238
|
|
|
62037
62239
|
// src/vaults/savings/fetchPublic.ts
|
|
62038
|
-
var
|
|
62240
|
+
var ONE_E1813 = 10n ** 18n;
|
|
62039
62241
|
var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList = {}) => {
|
|
62040
62242
|
const entries = getSavingsRegistry(chainId);
|
|
62041
62243
|
if (entries.length === 0) return {};
|
|
@@ -62084,8 +62286,8 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
62084
62286
|
1,
|
|
62085
62287
|
Number(liquidityAmount * 1000000n / state.totalAssets) / 1e6
|
|
62086
62288
|
) : 1;
|
|
62087
|
-
const convertToAssets = state.exchangeRate * underlyingUnit /
|
|
62088
|
-
const convertToShares = state.exchangeRate > 0n ?
|
|
62289
|
+
const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E1813;
|
|
62290
|
+
const convertToShares = state.exchangeRate > 0n ? ONE_E1813 * shareUnit / state.exchangeRate : 0n;
|
|
62089
62291
|
const depositCapacity = state.depositCapacity?.toString();
|
|
62090
62292
|
const depositCapacityFormatted = state.depositCapacity !== void 0 ? Number(state.depositCapacity) / 10 ** underlyingDec : void 0;
|
|
62091
62293
|
const depositCapacityUsd = depositCapacityFormatted !== void 0 && priceUsd !== void 0 ? depositCapacityFormatted * priceUsd : void 0;
|
|
@@ -62123,12 +62325,13 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
62123
62325
|
depositRate,
|
|
62124
62326
|
// Opt-IN, not opt-out: a new bespoke reader exists precisely
|
|
62125
62327
|
// because its token is not a conforming vault, so the default for
|
|
62126
|
-
// an unlisted reader must be `false`. `erc4626-idle
|
|
62127
|
-
// `erc4626-withdraw-limit` are the plain 4626
|
|
62128
|
-
// extra read (an inventory balance / the strategy's
|
|
62129
|
-
// so they count; Native's wNLP and Re's
|
|
62130
|
-
//
|
|
62131
|
-
|
|
62328
|
+
// an unlisted reader must be `false`. `erc4626-idle`,
|
|
62329
|
+
// `erc4626-withdraw-limit` and `erc4626-cooldown` are the plain 4626
|
|
62330
|
+
// surface plus one extra read (an inventory balance / the strategy's
|
|
62331
|
+
// limit view / the exit lock), so they count; Native's wNLP and Re's
|
|
62332
|
+
// NAV-oracle tokens revert on
|
|
62333
|
+
// `asset()`/`totalAssets()`/`convertToAssets()` and do not.
|
|
62334
|
+
isErc4626: entry.reader === void 0 || entry.reader === "erc4626" || entry.reader === "erc4626-cooldown" || entry.reader === "erc4626-idle" || entry.reader === "erc4626-withdraw-limit",
|
|
62132
62335
|
isRebasing: entry.isRebasing,
|
|
62133
62336
|
isMintable: entry.isMintable,
|
|
62134
62337
|
mintContract: entry.mintContract?.toLowerCase() ?? addressLc,
|
|
@@ -62629,6 +62832,23 @@ var fetchAaveEarnVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
62629
62832
|
// src/vaults/upshift/fetchPublic.ts
|
|
62630
62833
|
var num8 = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
62631
62834
|
var isEvmAddress = (a) => /^0x[0-9a-fA-F]{40}$/.test(a);
|
|
62835
|
+
var str4 = (v) => {
|
|
62836
|
+
const s = typeof v === "string" ? v.trim() : "";
|
|
62837
|
+
return s ? s : void 0;
|
|
62838
|
+
};
|
|
62839
|
+
var UNCAPPED_SENTINEL = 1e12;
|
|
62840
|
+
var deriveDepositCapacity = (v, totalAssetsRaw) => {
|
|
62841
|
+
const cap = v.depositCap ?? v.maxSupply;
|
|
62842
|
+
const normalized = Number(cap?.normalized);
|
|
62843
|
+
if (!cap?.raw || !Number.isFinite(normalized)) return void 0;
|
|
62844
|
+
if (normalized >= UNCAPPED_SENTINEL) return void 0;
|
|
62845
|
+
try {
|
|
62846
|
+
const remaining = BigInt(cap.raw) - BigInt(totalAssetsRaw);
|
|
62847
|
+
return remaining > 0n ? remaining.toString() : "0";
|
|
62848
|
+
} catch {
|
|
62849
|
+
return void 0;
|
|
62850
|
+
}
|
|
62851
|
+
};
|
|
62632
62852
|
var derivePricePerShare = (totalAssetsRaw, totalSupplyRaw, shareDecimals) => {
|
|
62633
62853
|
try {
|
|
62634
62854
|
const supply = BigInt(totalSupplyRaw);
|
|
@@ -62665,6 +62885,18 @@ function parseVault8(v, chainId, prices, tokenList) {
|
|
|
62665
62885
|
const totalAssetsUsd = apiTvlUsd || totalAssetsFormatted * priceUsd;
|
|
62666
62886
|
const name = (v.name ?? "").trim();
|
|
62667
62887
|
const symbol = (v.receipt?.symbol ?? "").trim();
|
|
62888
|
+
const strategist = (v.strategists ?? []).find((s) => str4(s?.name));
|
|
62889
|
+
const curatorName = str4(strategist?.name);
|
|
62890
|
+
const performanceStanding = num8(v.fees?.performance) ?? 0;
|
|
62891
|
+
const managementStanding = num8(v.fees?.management) ?? 0;
|
|
62892
|
+
const performanceWaived = v.fees?.isPerformanceWaived === true;
|
|
62893
|
+
const managementWaived = v.fees?.isManagementWaived === true;
|
|
62894
|
+
const instant = v.instant_redeem_config;
|
|
62895
|
+
const instantRedeemEnabled = !!instant && instant.isPaused !== true;
|
|
62896
|
+
const spreadBps = instantRedeemEnabled ? Math.max(
|
|
62897
|
+
0,
|
|
62898
|
+
...(instant?.redeemableAssets ?? []).map((a) => num8(a?.spreadBps) ?? 0)
|
|
62899
|
+
) : void 0;
|
|
62668
62900
|
return {
|
|
62669
62901
|
address: receiptAddr,
|
|
62670
62902
|
vaultAddress: vaultAddr,
|
|
@@ -62689,8 +62921,30 @@ function parseVault8(v, chainId, prices, tokenList) {
|
|
|
62689
62921
|
points: num8(v.apy?.pointsApy),
|
|
62690
62922
|
underlying: num8(v.apy?.underlyingApy)
|
|
62691
62923
|
},
|
|
62924
|
+
curatorName,
|
|
62925
|
+
curatorLogoURI: str4(strategist?.logo),
|
|
62926
|
+
description: str4(v.description),
|
|
62927
|
+
version: str4(v.version),
|
|
62928
|
+
fee: performanceWaived ? 0 : performanceStanding,
|
|
62929
|
+
managementFee: managementWaived ? 0 : managementStanding,
|
|
62930
|
+
feeDetail: {
|
|
62931
|
+
performanceStanding,
|
|
62932
|
+
managementStanding,
|
|
62933
|
+
performanceWaived,
|
|
62934
|
+
managementWaived,
|
|
62935
|
+
performanceWaivedUntilDate: str4(v.fees?.performanceFeeWaivedUntilDate),
|
|
62936
|
+
managementWaivedUntilDate: str4(v.fees?.managementFeeWaivedUntilDate)
|
|
62937
|
+
},
|
|
62938
|
+
withdrawalCooldownSeconds: num8(v.lagDuration) ?? 0,
|
|
62939
|
+
...instantRedeemEnabled ? {
|
|
62940
|
+
withdrawalMode: "fee-or-queued",
|
|
62941
|
+
withdrawFeeBps: spreadBps,
|
|
62942
|
+
instantRedeemEnabled: true
|
|
62943
|
+
} : {},
|
|
62692
62944
|
isDepositPaused: v.isDepositPaused ?? false,
|
|
62693
62945
|
isWithdrawalPaused: v.isWithdrawalPaused ?? false,
|
|
62946
|
+
isClosed: v.withdrawalOnly === true,
|
|
62947
|
+
depositCapacity: deriveDepositCapacity(v, totalAssetsRaw),
|
|
62694
62948
|
asset: assetMeta,
|
|
62695
62949
|
priceUsd,
|
|
62696
62950
|
totalAssetsFormatted,
|
|
@@ -63186,6 +63440,12 @@ var STABLECOIN_SYMBOLS = /* @__PURE__ */ new Set([
|
|
|
63186
63440
|
"GBPT",
|
|
63187
63441
|
"XSGD",
|
|
63188
63442
|
"TRYB",
|
|
63443
|
+
// Brix iTRY — lira-pegged, backed by a regulated basket of Turkish
|
|
63444
|
+
// money-market funds. `stable` on this axis means PEGGED TO A CURRENCY, not
|
|
63445
|
+
// "holds its value in dollars": a lira peg is a promise about lira, and this
|
|
63446
|
+
// one pays ~37 % precisely because that is what the lira costs. Same reading
|
|
63447
|
+
// already applied to ZCHF / EURA / TRYB above.
|
|
63448
|
+
"ITRY",
|
|
63189
63449
|
// long-tail USD stables (no `USD` substring) — verified against the
|
|
63190
63450
|
// dataset's `stablecoinish` flag.
|
|
63191
63451
|
"WM",
|
|
@@ -64187,7 +64447,7 @@ var fetchGmxVaults = async (chainId, multicallRetry, options) => {
|
|
|
64187
64447
|
// src/vaults/gmx/fetchUser.ts
|
|
64188
64448
|
var DEFAULT_CAP = 50;
|
|
64189
64449
|
var isBig = (v) => typeof v === "bigint";
|
|
64190
|
-
var
|
|
64450
|
+
var str5 = (v) => isBig(v) ? v.toString() : "0";
|
|
64191
64451
|
var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
64192
64452
|
const empty = {
|
|
64193
64453
|
chainId,
|
|
@@ -64315,11 +64575,11 @@ var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
|
64315
64575
|
market: a.market.toLowerCase(),
|
|
64316
64576
|
initialLongToken: a.initialLongToken.toLowerCase(),
|
|
64317
64577
|
initialShortToken: a.initialShortToken.toLowerCase(),
|
|
64318
|
-
initialLongTokenAmount:
|
|
64319
|
-
initialShortTokenAmount:
|
|
64320
|
-
minOut:
|
|
64321
|
-
executionFee:
|
|
64322
|
-
updatedAtTime:
|
|
64578
|
+
initialLongTokenAmount: str5(n.initialLongTokenAmount),
|
|
64579
|
+
initialShortTokenAmount: str5(n.initialShortTokenAmount),
|
|
64580
|
+
minOut: str5(n.minMarketTokens),
|
|
64581
|
+
executionFee: str5(n.executionFee),
|
|
64582
|
+
updatedAtTime: str5(n.updatedAtTime)
|
|
64323
64583
|
});
|
|
64324
64584
|
});
|
|
64325
64585
|
withdrawalKeys.forEach((key3, i) => {
|
|
@@ -64333,11 +64593,11 @@ var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
|
64333
64593
|
account: a.account.toLowerCase(),
|
|
64334
64594
|
receiver: a.receiver.toLowerCase(),
|
|
64335
64595
|
market: a.market.toLowerCase(),
|
|
64336
|
-
tokenAmount:
|
|
64337
|
-
minLongTokenAmount:
|
|
64338
|
-
minShortTokenAmount:
|
|
64339
|
-
executionFee:
|
|
64340
|
-
updatedAtTime:
|
|
64596
|
+
tokenAmount: str5(n.marketTokenAmount),
|
|
64597
|
+
minLongTokenAmount: str5(n.minLongTokenAmount),
|
|
64598
|
+
minShortTokenAmount: str5(n.minShortTokenAmount),
|
|
64599
|
+
executionFee: str5(n.executionFee),
|
|
64600
|
+
updatedAtTime: str5(n.updatedAtTime)
|
|
64341
64601
|
});
|
|
64342
64602
|
});
|
|
64343
64603
|
const glvDeposits = Array.isArray(glvRes[0]) ? glvRes[0] : [];
|
|
@@ -64354,11 +64614,11 @@ var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
|
64354
64614
|
glv: a.glv.toLowerCase(),
|
|
64355
64615
|
initialLongToken: a.initialLongToken.toLowerCase(),
|
|
64356
64616
|
initialShortToken: a.initialShortToken.toLowerCase(),
|
|
64357
|
-
initialLongTokenAmount:
|
|
64358
|
-
initialShortTokenAmount:
|
|
64359
|
-
minOut:
|
|
64360
|
-
executionFee:
|
|
64361
|
-
updatedAtTime:
|
|
64617
|
+
initialLongTokenAmount: str5(n.initialLongTokenAmount),
|
|
64618
|
+
initialShortTokenAmount: str5(n.initialShortTokenAmount),
|
|
64619
|
+
minOut: str5(n.minGlvTokens),
|
|
64620
|
+
executionFee: str5(n.executionFee),
|
|
64621
|
+
updatedAtTime: str5(n.updatedAtTime)
|
|
64362
64622
|
});
|
|
64363
64623
|
}
|
|
64364
64624
|
for (const w of glvWithdrawals) {
|
|
@@ -64371,11 +64631,11 @@ var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
|
64371
64631
|
receiver: a.receiver.toLowerCase(),
|
|
64372
64632
|
market: a.market.toLowerCase(),
|
|
64373
64633
|
glv: a.glv.toLowerCase(),
|
|
64374
|
-
tokenAmount:
|
|
64375
|
-
minLongTokenAmount:
|
|
64376
|
-
minShortTokenAmount:
|
|
64377
|
-
executionFee:
|
|
64378
|
-
updatedAtTime:
|
|
64634
|
+
tokenAmount: str5(n.glvTokenAmount),
|
|
64635
|
+
minLongTokenAmount: str5(n.minLongTokenAmount),
|
|
64636
|
+
minShortTokenAmount: str5(n.minShortTokenAmount),
|
|
64637
|
+
executionFee: str5(n.executionFee),
|
|
64638
|
+
updatedAtTime: str5(n.updatedAtTime)
|
|
64379
64639
|
});
|
|
64380
64640
|
}
|
|
64381
64641
|
return {
|
|
@@ -64689,7 +64949,7 @@ var readVaultSharePrices = async (chainId, addresses, multicallRetry) => {
|
|
|
64689
64949
|
};
|
|
64690
64950
|
|
|
64691
64951
|
// src/vaults/yield/annualize.ts
|
|
64692
|
-
var
|
|
64952
|
+
var YEAR_SECONDS12 = 365 * 24 * 60 * 60;
|
|
64693
64953
|
var SCALE = 10n ** 18n;
|
|
64694
64954
|
var appendSnapshot = (points, snap, options) => {
|
|
64695
64955
|
const maxPoints = options?.maxPoints ?? 90;
|
|
@@ -64718,7 +64978,7 @@ var computeVaultApr = (points, options) => {
|
|
|
64718
64978
|
if (pThen === 0n) return void 0;
|
|
64719
64979
|
const ratioScaled = BigInt(now.p) * SCALE / pThen;
|
|
64720
64980
|
const ratio = Number(ratioScaled) / 1e18;
|
|
64721
|
-
const apr = (ratio - 1) * (
|
|
64981
|
+
const apr = (ratio - 1) * (YEAR_SECONDS12 / windowSeconds);
|
|
64722
64982
|
return {
|
|
64723
64983
|
apr,
|
|
64724
64984
|
sharePriceNow: now.p,
|
|
@@ -65886,10 +66146,10 @@ function resolveMinDebt(input) {
|
|
|
65886
66146
|
];
|
|
65887
66147
|
for (const c of candidates) {
|
|
65888
66148
|
if (c == null) continue;
|
|
65889
|
-
const
|
|
65890
|
-
if (
|
|
65891
|
-
if (!/^\d+$/.test(
|
|
65892
|
-
return
|
|
66149
|
+
const str8 = String(c);
|
|
66150
|
+
if (str8 === "0" || str8 === "") continue;
|
|
66151
|
+
if (!/^\d+$/.test(str8)) continue;
|
|
66152
|
+
return str8;
|
|
65893
66153
|
}
|
|
65894
66154
|
return void 0;
|
|
65895
66155
|
}
|
|
@@ -65897,9 +66157,9 @@ function resolveMinCollateral(input) {
|
|
|
65897
66157
|
const m = input.market ?? {};
|
|
65898
66158
|
const raw = m.frankencoin?.minimumCollateral;
|
|
65899
66159
|
if (raw == null) return void 0;
|
|
65900
|
-
const
|
|
65901
|
-
if (
|
|
65902
|
-
return
|
|
66160
|
+
const str8 = String(raw);
|
|
66161
|
+
if (str8 === "0" || str8 === "" || !/^\d+$/.test(str8)) return void 0;
|
|
66162
|
+
return str8;
|
|
65903
66163
|
}
|
|
65904
66164
|
function capUtil(total, cap) {
|
|
65905
66165
|
if (!isNum(cap) || cap <= 0 || !isNum(total)) return void 0;
|
|
@@ -66376,10 +66636,17 @@ var VAULT_PROVIDER_TRAITS = {
|
|
|
66376
66636
|
rateKind: "variable-managed",
|
|
66377
66637
|
rateSource: "api",
|
|
66378
66638
|
rateWindow: { kind: "trailing" },
|
|
66639
|
+
// Every vault requests → settles → claims; the per-vault delay runs 0 to
|
|
66640
|
+
// 30 days and rides on the row as `withdrawalCooldownSeconds`. One vault
|
|
66641
|
+
// (Upshift Clear RWA) declares `fee-or-queued` for its instant leg.
|
|
66379
66642
|
defaultExitMode: "request-based",
|
|
66380
66643
|
priceRisk: "none",
|
|
66381
66644
|
counterpartyKind: "vault-strategy",
|
|
66382
|
-
|
|
66645
|
+
// Upshift publishes a full schedule — performance AND management, per
|
|
66646
|
+
// vault, with waiver flags. Reported `false` while the fetcher dropped
|
|
66647
|
+
// the block, which made every row's empty fee list read as "free" when
|
|
66648
|
+
// one vault charges 20 % + 2 %.
|
|
66649
|
+
reportsPerformanceFee: true,
|
|
66383
66650
|
reportsGovernance: false,
|
|
66384
66651
|
reportsExposures: false,
|
|
66385
66652
|
hasDecomposableBacking: true,
|
|
@@ -66539,6 +66806,19 @@ function buildFees2(input, t) {
|
|
|
66539
66806
|
description: "Taken from the yield the vault earns, not from your principal. The published rate is already net of it."
|
|
66540
66807
|
});
|
|
66541
66808
|
}
|
|
66809
|
+
if (isNum2(input.managementFee) && input.managementFee !== 0) {
|
|
66810
|
+
out.push({
|
|
66811
|
+
id: "management",
|
|
66812
|
+
label: "Management fee",
|
|
66813
|
+
when: "ongoing",
|
|
66814
|
+
unit: "apr-percent",
|
|
66815
|
+
basis: "principal",
|
|
66816
|
+
value: t.feeIsFraction ? input.managementFee * 100 : input.managementFee,
|
|
66817
|
+
payee: "curator",
|
|
66818
|
+
mutable: true,
|
|
66819
|
+
description: "Accrues on your whole balance for as long as you hold, whether or not the vault earns anything. The published rate is already net of it."
|
|
66820
|
+
});
|
|
66821
|
+
}
|
|
66542
66822
|
if (isNum2(input.withdrawFeeBps) && input.withdrawFeeBps !== 0) {
|
|
66543
66823
|
out.push({
|
|
66544
66824
|
id: "instant-exit",
|
|
@@ -67309,13 +67589,13 @@ function num12(v) {
|
|
|
67309
67589
|
const n = typeof v === "number" ? v : Number(v);
|
|
67310
67590
|
return Number.isFinite(n) ? n : void 0;
|
|
67311
67591
|
}
|
|
67312
|
-
function
|
|
67592
|
+
function str6(v) {
|
|
67313
67593
|
if (typeof v === "string") return v.length > 0 ? v : void 0;
|
|
67314
67594
|
if (typeof v === "number" && Number.isFinite(v)) return String(v);
|
|
67315
67595
|
return void 0;
|
|
67316
67596
|
}
|
|
67317
67597
|
function addr2(v) {
|
|
67318
|
-
return
|
|
67598
|
+
return str6(v)?.toLowerCase();
|
|
67319
67599
|
}
|
|
67320
67600
|
function yieldProfile(v) {
|
|
67321
67601
|
return v === "yield-bearing" || v === "volatile" ? v : void 0;
|
|
@@ -67394,7 +67674,7 @@ var RATE_KIND = {
|
|
|
67394
67674
|
gmx: "realized"
|
|
67395
67675
|
};
|
|
67396
67676
|
function resolveExitMode2(provider, meta, tvl, liq) {
|
|
67397
|
-
const declared =
|
|
67677
|
+
const declared = str6(meta.withdrawalMode);
|
|
67398
67678
|
if (declared) return declared;
|
|
67399
67679
|
const fallback = vaultTraits(provider)?.defaultExitMode ?? "instant";
|
|
67400
67680
|
if (fallback !== "instant-capped") return fallback;
|
|
@@ -67405,9 +67685,9 @@ function resolveExitMode2(provider, meta, tvl, liq) {
|
|
|
67405
67685
|
return available >= total ? "instant" : "instant-capped";
|
|
67406
67686
|
}
|
|
67407
67687
|
function earnMarketFromVault(row, chainId, opts = {}) {
|
|
67408
|
-
const provider =
|
|
67409
|
-
const address =
|
|
67410
|
-
const underlying =
|
|
67688
|
+
const provider = str6(row.provider);
|
|
67689
|
+
const address = str6(row.vaultAddress)?.toLowerCase();
|
|
67690
|
+
const underlying = str6(row.underlying)?.toLowerCase();
|
|
67411
67691
|
if (!provider || !address || !underlying) return void 0;
|
|
67412
67692
|
const meta = row.providerMeta ?? {};
|
|
67413
67693
|
const info = row.vaultInfo ?? {};
|
|
@@ -67447,15 +67727,15 @@ function earnMarketFromVault(row, chainId, opts = {}) {
|
|
|
67447
67727
|
venue: vaultVenue(provider),
|
|
67448
67728
|
venueKind: "vault",
|
|
67449
67729
|
// Curator first (it names the actual operator), then the provider brand.
|
|
67450
|
-
brand:
|
|
67730
|
+
brand: str6(row.curatorName) ?? venueBrand(vaultVenue(provider)),
|
|
67451
67731
|
// What the vault is BUILT ON, kept apart from who runs it — see
|
|
67452
67732
|
// `resolveEarnIdentity` for why this is not simply provider-vs-brand.
|
|
67453
67733
|
...withCuratorEntity(
|
|
67454
67734
|
resolveEarnIdentity(
|
|
67455
67735
|
vaultVenue(provider),
|
|
67456
|
-
|
|
67736
|
+
str6(row.curatorName)
|
|
67457
67737
|
),
|
|
67458
|
-
|
|
67738
|
+
str6(row.curatorEntity)
|
|
67459
67739
|
),
|
|
67460
67740
|
// The maturity is part of a fixed-term row's IDENTITY. Pendle ships names
|
|
67461
67741
|
// with no date, so several PTs on one underlying render identically —
|
|
@@ -67484,26 +67764,26 @@ function earnMarketFromVault(row, chainId, opts = {}) {
|
|
|
67484
67764
|
withMaturityLabel(
|
|
67485
67765
|
stripLeadingBrand(
|
|
67486
67766
|
vaultDisplayName(row, info) ?? "",
|
|
67487
|
-
|
|
67767
|
+
str6(row.curatorName) ?? venueBrand(vaultVenue(provider))
|
|
67488
67768
|
) || void 0,
|
|
67489
67769
|
maturity
|
|
67490
67770
|
),
|
|
67491
|
-
trancheFromCounterparty(
|
|
67771
|
+
trancheFromCounterparty(str6(meta.solvency))
|
|
67492
67772
|
),
|
|
67493
67773
|
ref: address,
|
|
67494
|
-
logoURI:
|
|
67774
|
+
logoURI: str6(info.logoURI) ?? str6(row.underlyingInfo?.asset?.logoURI),
|
|
67495
67775
|
asset: {
|
|
67496
67776
|
address: underlying,
|
|
67497
|
-
symbol:
|
|
67777
|
+
symbol: str6(row.underlyingInfo?.asset?.symbol) ?? "",
|
|
67498
67778
|
decimals: assetDecimals,
|
|
67499
|
-
assetGroup:
|
|
67779
|
+
assetGroup: str6(info.assetGroup),
|
|
67500
67780
|
priceUsd: num12(row.underlyingInfo?.prices?.priceUsd)
|
|
67501
67781
|
},
|
|
67502
67782
|
// The vault IS a share token by construction; carry it so a withdraw in
|
|
67503
67783
|
// share units can be built without a second lookup.
|
|
67504
67784
|
shareToken: {
|
|
67505
67785
|
address,
|
|
67506
|
-
symbol:
|
|
67786
|
+
symbol: str6(info.symbol) ?? str6(row.symbol) ?? "",
|
|
67507
67787
|
decimals: shareDecimals
|
|
67508
67788
|
},
|
|
67509
67789
|
rate,
|
|
@@ -67522,11 +67802,11 @@ function earnMarketFromVault(row, chainId, opts = {}) {
|
|
|
67522
67802
|
liq.liquidityUsd,
|
|
67523
67803
|
assetDecimals
|
|
67524
67804
|
) : void 0,
|
|
67525
|
-
depositCapacity:
|
|
67805
|
+
depositCapacity: str6(meta.depositCapacity) ?? str6(meta.maxDeposit),
|
|
67526
67806
|
maturity,
|
|
67527
67807
|
exit: {
|
|
67528
67808
|
mode: exitMode,
|
|
67529
|
-
settlement:
|
|
67809
|
+
settlement: str6(meta.redemptionType),
|
|
67530
67810
|
cooldownSecs: num12(meta.withdrawalCooldownSeconds),
|
|
67531
67811
|
feeBps: num12(meta.withdrawFeeBps)
|
|
67532
67812
|
},
|
|
@@ -67537,9 +67817,9 @@ function earnMarketFromVault(row, chainId, opts = {}) {
|
|
|
67537
67817
|
// The curated trust classification, where one exists. Typed on `EarnRisk`
|
|
67538
67818
|
// since the surface was written and never populated — a tranche's
|
|
67539
67819
|
// first-loss position is the term most worth surfacing on a rate list.
|
|
67540
|
-
counterparty:
|
|
67820
|
+
counterparty: str6(meta.solvency),
|
|
67541
67821
|
score: num12(row.rating?.score),
|
|
67542
|
-
label:
|
|
67822
|
+
label: str6(row.rating?.level),
|
|
67543
67823
|
illiquid: isIlliquid({
|
|
67544
67824
|
exitMode,
|
|
67545
67825
|
tvlUsd: num12(tvl.totalAssetsUsd),
|
|
@@ -67575,7 +67855,7 @@ function earnVaultTerms(provider, providerMeta, size) {
|
|
|
67575
67855
|
}
|
|
67576
67856
|
function resolveAvailability(meta, maturity) {
|
|
67577
67857
|
const isMintable = meta.isMintable;
|
|
67578
|
-
const capacity =
|
|
67858
|
+
const capacity = str6(meta.depositCapacity) ?? str6(meta.maxDeposit);
|
|
67579
67859
|
const capFull = capacity === "0";
|
|
67580
67860
|
let gating;
|
|
67581
67861
|
let reason;
|
|
@@ -67606,7 +67886,7 @@ function resolveAvailability(meta, maturity) {
|
|
|
67606
67886
|
}
|
|
67607
67887
|
function vaultDisplayName(row, info) {
|
|
67608
67888
|
const share = row.shareAsset;
|
|
67609
|
-
return
|
|
67889
|
+
return str6(row.name) ?? str6(info.name) ?? str6(row.displayName) ?? str6(share?.name) ?? str6(share?.symbol) ?? str6(info.symbol) ?? str6(row.symbol);
|
|
67610
67890
|
}
|
|
67611
67891
|
function resolveMaturity(meta) {
|
|
67612
67892
|
const expiry = num12(meta.expiry) ?? num12(meta.maturity);
|
|
@@ -67615,13 +67895,13 @@ function resolveMaturity(meta) {
|
|
|
67615
67895
|
return {
|
|
67616
67896
|
kind: "fixed-date",
|
|
67617
67897
|
maturity: expiry,
|
|
67618
|
-
maturityIso:
|
|
67898
|
+
maturityIso: str6(meta.expiryIso) ?? new Date(expiry * 1e3).toISOString(),
|
|
67619
67899
|
// A SNAPSHOT — a cached listing ages, so a countdown must be recomputed
|
|
67620
67900
|
// from `maturity` rather than ticked down from this.
|
|
67621
67901
|
secondsToMaturity: Math.max(expiry - nowSecs, 0),
|
|
67622
67902
|
// A PT simply stops earning: it redeems for the underlying at par and
|
|
67623
67903
|
// sits there. No penalty, no liquidation, no auto-roll.
|
|
67624
|
-
atMaturity:
|
|
67904
|
+
atMaturity: str6(meta.atMaturity) ?? "stops-earning"
|
|
67625
67905
|
};
|
|
67626
67906
|
}
|
|
67627
67907
|
function isMatured(maturity) {
|
|
@@ -67654,7 +67934,7 @@ var num13 = (v) => {
|
|
|
67654
67934
|
}
|
|
67655
67935
|
return void 0;
|
|
67656
67936
|
};
|
|
67657
|
-
var
|
|
67937
|
+
var str7 = (v) => typeof v === "string" && v.trim() !== "" ? v : void 0;
|
|
67658
67938
|
var bool2 = (v) => typeof v === "boolean" ? v : void 0;
|
|
67659
67939
|
var fromRaw = (raw, decimals) => {
|
|
67660
67940
|
const s = raw == null ? void 0 : String(raw);
|
|
@@ -67683,7 +67963,7 @@ function sdkRates(row, provider) {
|
|
|
67683
67963
|
}
|
|
67684
67964
|
function toVaultTermInput(vault, provider, chainId) {
|
|
67685
67965
|
const row = vault;
|
|
67686
|
-
const address =
|
|
67966
|
+
const address = str7(row.address)?.toLowerCase();
|
|
67687
67967
|
if (!address) return void 0;
|
|
67688
67968
|
const assetDecimals = num13(row.assetDecimals) ?? num13(row.decimals);
|
|
67689
67969
|
const asset = row.asset;
|
|
@@ -67692,22 +67972,22 @@ function toVaultTermInput(vault, provider, chainId) {
|
|
|
67692
67972
|
chainId,
|
|
67693
67973
|
address,
|
|
67694
67974
|
vaultUid: `vault.${provider}:${chainId}:${address}`,
|
|
67695
|
-
name:
|
|
67696
|
-
brand:
|
|
67697
|
-
curatorName:
|
|
67698
|
-
description:
|
|
67975
|
+
name: str7(row.displayName) ?? str7(row.name),
|
|
67976
|
+
brand: str7(row.brand),
|
|
67977
|
+
curatorName: str7(row.curatorName),
|
|
67978
|
+
description: str7(row.description),
|
|
67699
67979
|
asset: {
|
|
67700
67980
|
chainId,
|
|
67701
|
-
address:
|
|
67702
|
-
symbol:
|
|
67703
|
-
name:
|
|
67981
|
+
address: str7(row.underlying)?.toLowerCase() ?? "",
|
|
67982
|
+
symbol: str7(asset?.symbol),
|
|
67983
|
+
name: str7(asset?.name),
|
|
67704
67984
|
decimals: assetDecimals,
|
|
67705
|
-
assetGroup:
|
|
67706
|
-
logoURI:
|
|
67985
|
+
assetGroup: str7(asset?.assetGroup),
|
|
67986
|
+
logoURI: str7(asset?.logoURI)
|
|
67707
67987
|
},
|
|
67708
67988
|
...sdkRates(row, provider),
|
|
67709
67989
|
isForwardApr: bool2(row.isForwardApr),
|
|
67710
|
-
aprWindow:
|
|
67990
|
+
aprWindow: str7(row.aprWindow),
|
|
67711
67991
|
// GMX / HyperCore / Pendle report USD only and set the token-denominated
|
|
67712
67992
|
// fields to their USD figure — `totalAssetsFormatted` is the cross-provider
|
|
67713
67993
|
// magnitude either way, so prefer it over re-deriving from raw.
|
|
@@ -67718,19 +67998,20 @@ function toVaultTermInput(vault, provider, chainId) {
|
|
|
67718
67998
|
instantLiquidityRatio: num13(row.instantLiquidityRatio),
|
|
67719
67999
|
totalBorrowed: fromRaw(row.totalBorrowed, assetDecimals),
|
|
67720
68000
|
expectedLiquidity: fromRaw(row.expectedLiquidity, assetDecimals),
|
|
67721
|
-
withdrawalMode:
|
|
68001
|
+
withdrawalMode: str7(row.withdrawalMode),
|
|
67722
68002
|
withdrawalCooldownSeconds: num13(row.withdrawalCooldownSeconds),
|
|
67723
68003
|
withdrawFeeBps: num13(row.withdrawFeeBps),
|
|
67724
68004
|
fee: num13(row.fee),
|
|
68005
|
+
managementFee: num13(row.managementFee),
|
|
67725
68006
|
swapFeeRate: num13(row.feeRate),
|
|
67726
68007
|
redemptionDiscountBps: num13(row.redemptionDiscountBps),
|
|
67727
68008
|
instantRedeemEnabled: bool2(row.instantRedeemEnabled),
|
|
67728
68009
|
yieldWarmupSeconds: num13(row.yieldWarmupSeconds),
|
|
67729
|
-
accrual:
|
|
68010
|
+
accrual: str7(row.accrual),
|
|
67730
68011
|
needsDepositApproval: bool2(row.needsDepositApproval),
|
|
67731
68012
|
isMintable: bool2(row.isMintable),
|
|
67732
|
-
depositCapacity:
|
|
67733
|
-
supplyCap:
|
|
68013
|
+
depositCapacity: str7(row.depositCapacity),
|
|
68014
|
+
supplyCap: str7(row.supplyCap),
|
|
67734
68015
|
paused: bool2(row.isPaused),
|
|
67735
68016
|
depositsPaused: bool2(row.isDepositPaused),
|
|
67736
68017
|
withdrawalsPaused: bool2(row.isWithdrawalPaused),
|
|
@@ -67738,13 +68019,13 @@ function toVaultTermInput(vault, provider, chainId) {
|
|
|
67738
68019
|
whitelisted: bool2(row.whitelisted),
|
|
67739
68020
|
expiry: num13(row.expiry),
|
|
67740
68021
|
timelock: num13(row.timelock),
|
|
67741
|
-
owner:
|
|
67742
|
-
curator:
|
|
67743
|
-
guardian:
|
|
67744
|
-
feeRecipient:
|
|
67745
|
-
solvency:
|
|
67746
|
-
navOracle:
|
|
67747
|
-
yieldProfile:
|
|
68022
|
+
owner: str7(row.owner),
|
|
68023
|
+
curator: str7(row.curator),
|
|
68024
|
+
guardian: str7(row.guardian),
|
|
68025
|
+
feeRecipient: str7(row.feeRecipient),
|
|
68026
|
+
solvency: str7(row.solvency),
|
|
68027
|
+
navOracle: str7(row.navOracle),
|
|
68028
|
+
yieldProfile: str7(row.yieldProfile),
|
|
67748
68029
|
exposures: Array.isArray(row.exposures) ? row.exposures : void 0
|
|
67749
68030
|
};
|
|
67750
68031
|
}
|
|
@@ -67761,7 +68042,7 @@ function vaultTermInputFromEarnMarket(m) {
|
|
|
67761
68042
|
name: m.name,
|
|
67762
68043
|
brand: m.brand,
|
|
67763
68044
|
curatorName: m.brand,
|
|
67764
|
-
description:
|
|
68045
|
+
description: str7(meta.description),
|
|
67765
68046
|
asset: {
|
|
67766
68047
|
chainId: m.chainId,
|
|
67767
68048
|
address: m.asset.address,
|
|
@@ -67774,7 +68055,7 @@ function vaultTermInputFromEarnMarket(m) {
|
|
|
67774
68055
|
rewardsRate: m.rate.rewards,
|
|
67775
68056
|
totalRate: m.rate.total,
|
|
67776
68057
|
isForwardApr: bool2(meta.isForwardApr),
|
|
67777
|
-
aprWindow:
|
|
68058
|
+
aprWindow: str7(meta.aprWindow),
|
|
67778
68059
|
totalAssets: m.tvl.formatted,
|
|
67779
68060
|
totalAssetsUsd: m.tvl.usd,
|
|
67780
68061
|
liquidity: m.liquidity?.formatted,
|
|
@@ -67786,30 +68067,31 @@ function vaultTermInputFromEarnMarket(m) {
|
|
|
67786
68067
|
withdrawalCooldownSeconds: m.exit.cooldownSecs,
|
|
67787
68068
|
withdrawFeeBps: m.exit.feeBps,
|
|
67788
68069
|
fee: m.rate.fee,
|
|
68070
|
+
managementFee: num13(meta.managementFee),
|
|
67789
68071
|
swapFeeRate: num13(meta.feeRate),
|
|
67790
68072
|
redemptionDiscountBps: num13(meta.redemptionDiscountBps),
|
|
67791
68073
|
instantRedeemEnabled: bool2(meta.instantRedeemEnabled),
|
|
67792
68074
|
yieldWarmupSeconds: num13(meta.yieldWarmupSeconds),
|
|
67793
|
-
accrual:
|
|
68075
|
+
accrual: str7(meta.accrual),
|
|
67794
68076
|
needsDepositApproval: bool2(meta.needsDepositApproval),
|
|
67795
68077
|
// `canDeposit` already folds in the cap, the pause and the gate, so it is
|
|
67796
68078
|
// the authoritative answer — but the REASON is what a disabled CTA renders,
|
|
67797
68079
|
// and that only survives in the raw fields.
|
|
67798
68080
|
isMintable: m.availability.canDeposit ? void 0 : false,
|
|
67799
68081
|
depositCapacity: m.depositCapacity,
|
|
67800
|
-
supplyCap:
|
|
68082
|
+
supplyCap: str7(meta.supplyCap),
|
|
67801
68083
|
paused: m.availability.gating === "paused" ? true : void 0,
|
|
67802
68084
|
withdrawalsPaused: m.availability.canWithdraw ? void 0 : true,
|
|
67803
68085
|
isClosed: bool2(meta.isClosed),
|
|
67804
68086
|
whitelisted: bool2(meta.whitelisted),
|
|
67805
68087
|
expiry: m.maturity?.maturity,
|
|
67806
68088
|
timelock: num13(meta.timelock),
|
|
67807
|
-
owner:
|
|
67808
|
-
curator:
|
|
67809
|
-
guardian:
|
|
67810
|
-
feeRecipient:
|
|
68089
|
+
owner: str7(meta.owner),
|
|
68090
|
+
curator: str7(meta.curator),
|
|
68091
|
+
guardian: str7(meta.guardian),
|
|
68092
|
+
feeRecipient: str7(meta.feeRecipient),
|
|
67811
68093
|
solvency: m.risk?.counterparty,
|
|
67812
|
-
navOracle:
|
|
68094
|
+
navOracle: str7(meta.navOracle),
|
|
67813
68095
|
yieldProfile: m.risk?.yieldProfile,
|
|
67814
68096
|
exposures: m.refs?.exposures
|
|
67815
68097
|
};
|
|
@@ -67825,8 +68107,8 @@ function originRates(rates) {
|
|
|
67825
68107
|
};
|
|
67826
68108
|
}
|
|
67827
68109
|
function vaultTermInputFromSourceRow(row, chainId) {
|
|
67828
|
-
const provider =
|
|
67829
|
-
const address =
|
|
68110
|
+
const provider = str7(row.provider);
|
|
68111
|
+
const address = str7(row.vaultAddress)?.toLowerCase();
|
|
67830
68112
|
if (!provider || !address) return void 0;
|
|
67831
68113
|
const meta = row.providerMeta ?? {};
|
|
67832
68114
|
const rates = row.rates ?? {};
|
|
@@ -67840,21 +68122,21 @@ function vaultTermInputFromSourceRow(row, chainId) {
|
|
|
67840
68122
|
chainId,
|
|
67841
68123
|
address,
|
|
67842
68124
|
vaultUid: `vault.${provider}:${chainId}:${address}`,
|
|
67843
|
-
name:
|
|
67844
|
-
brand:
|
|
67845
|
-
curatorName:
|
|
67846
|
-
description:
|
|
68125
|
+
name: str7(info.name) ?? str7(row.displayName) ?? str7(row.name),
|
|
68126
|
+
brand: str7(row.curatorName) ?? str7(meta.brand),
|
|
68127
|
+
curatorName: str7(row.curatorName),
|
|
68128
|
+
description: str7(meta.description),
|
|
67847
68129
|
asset: {
|
|
67848
68130
|
chainId,
|
|
67849
|
-
address:
|
|
67850
|
-
symbol:
|
|
68131
|
+
address: str7(row.underlying)?.toLowerCase() ?? "",
|
|
68132
|
+
symbol: str7(assetInfo?.symbol),
|
|
67851
68133
|
decimals: assetDecimals,
|
|
67852
|
-
assetGroup:
|
|
67853
|
-
logoURI:
|
|
68134
|
+
assetGroup: str7(info.assetGroup),
|
|
68135
|
+
logoURI: str7(assetInfo?.logoURI)
|
|
67854
68136
|
},
|
|
67855
68137
|
...originRates(rates),
|
|
67856
68138
|
isForwardApr: bool2(meta.isForwardApr),
|
|
67857
|
-
aprWindow:
|
|
68139
|
+
aprWindow: str7(meta.aprWindow),
|
|
67858
68140
|
totalAssets: num13(tvl.totalAssetsFormatted) ?? fromRaw(tvl.totalAssets, assetDecimals),
|
|
67859
68141
|
totalAssetsUsd: num13(tvl.totalAssetsUsd),
|
|
67860
68142
|
liquidity: num13(liq.liquidityFormatted) ?? fromRaw(liq.liquidity, assetDecimals),
|
|
@@ -67862,19 +68144,20 @@ function vaultTermInputFromSourceRow(row, chainId) {
|
|
|
67862
68144
|
instantLiquidityRatio: num13(meta.instantLiquidityRatio),
|
|
67863
68145
|
totalBorrowed: fromRaw(meta.totalBorrowed, assetDecimals),
|
|
67864
68146
|
expectedLiquidity: fromRaw(meta.expectedLiquidity, assetDecimals),
|
|
67865
|
-
withdrawalMode:
|
|
68147
|
+
withdrawalMode: str7(meta.withdrawalMode),
|
|
67866
68148
|
withdrawalCooldownSeconds: num13(meta.withdrawalCooldownSeconds),
|
|
67867
68149
|
withdrawFeeBps: num13(meta.withdrawFeeBps),
|
|
67868
68150
|
fee: num13(rates.fee),
|
|
68151
|
+
managementFee: num13(meta.managementFee),
|
|
67869
68152
|
swapFeeRate: num13(meta.feeRate),
|
|
67870
68153
|
redemptionDiscountBps: num13(meta.redemptionDiscountBps),
|
|
67871
68154
|
instantRedeemEnabled: bool2(meta.instantRedeemEnabled),
|
|
67872
68155
|
yieldWarmupSeconds: num13(meta.yieldWarmupSeconds),
|
|
67873
|
-
accrual:
|
|
68156
|
+
accrual: str7(meta.accrual),
|
|
67874
68157
|
needsDepositApproval: bool2(meta.needsDepositApproval),
|
|
67875
68158
|
isMintable: bool2(meta.isMintable),
|
|
67876
|
-
depositCapacity:
|
|
67877
|
-
supplyCap:
|
|
68159
|
+
depositCapacity: str7(meta.depositCapacity) ?? str7(meta.maxDeposit),
|
|
68160
|
+
supplyCap: str7(meta.supplyCap),
|
|
67878
68161
|
paused: bool2(meta.paused) ?? bool2(meta.isPaused),
|
|
67879
68162
|
depositsPaused: bool2(meta.isDepositPaused),
|
|
67880
68163
|
withdrawalsPaused: bool2(meta.isWithdrawalPaused),
|
|
@@ -67882,13 +68165,13 @@ function vaultTermInputFromSourceRow(row, chainId) {
|
|
|
67882
68165
|
whitelisted: bool2(meta.whitelisted),
|
|
67883
68166
|
expiry: num13(meta.expiry) ?? num13(meta.maturity),
|
|
67884
68167
|
timelock: num13(meta.timelock),
|
|
67885
|
-
owner:
|
|
67886
|
-
curator:
|
|
67887
|
-
guardian:
|
|
67888
|
-
feeRecipient:
|
|
67889
|
-
solvency:
|
|
67890
|
-
navOracle:
|
|
67891
|
-
yieldProfile:
|
|
68168
|
+
owner: str7(meta.owner),
|
|
68169
|
+
curator: str7(meta.curator),
|
|
68170
|
+
guardian: str7(meta.guardian),
|
|
68171
|
+
feeRecipient: str7(meta.feeRecipient),
|
|
68172
|
+
solvency: str7(meta.solvency),
|
|
68173
|
+
navOracle: str7(meta.navOracle),
|
|
68174
|
+
yieldProfile: str7(info.yieldProfile),
|
|
67892
68175
|
exposures: Array.isArray(row.exposures) ? row.exposures : Array.isArray(meta.exposures) ? meta.exposures : void 0
|
|
67893
68176
|
};
|
|
67894
68177
|
}
|
|
@@ -70735,12 +71018,12 @@ var USER_SET_RATE_PREFIXES = [
|
|
|
70735
71018
|
function collateralSymbolsByVenue(rows, fallbackChainId) {
|
|
70736
71019
|
const byVenue = /* @__PURE__ */ new Map();
|
|
70737
71020
|
for (const row of rows) {
|
|
70738
|
-
const venue =
|
|
70739
|
-
const chainId =
|
|
71021
|
+
const venue = str6(row.lender) ?? str6(row.lenderKey);
|
|
71022
|
+
const chainId = str6(row.chainId) ?? fallbackChainId;
|
|
70740
71023
|
if (!venue || !chainId) continue;
|
|
70741
71024
|
const collateralActive = row.flags?.collateralActive ?? row.collateralActive;
|
|
70742
71025
|
if (collateralActive !== true) continue;
|
|
70743
|
-
const symbol =
|
|
71026
|
+
const symbol = str6(row.underlyingInfo?.asset?.symbol) ?? str6(row.asset?.symbol);
|
|
70744
71027
|
if (!symbol) continue;
|
|
70745
71028
|
const key3 = venueGroupKey(chainId, venue);
|
|
70746
71029
|
let set = byVenue.get(key3);
|
|
@@ -70753,7 +71036,7 @@ function venueGroupKey(chainId, venue) {
|
|
|
70753
71036
|
return `${chainId}::${venue}`;
|
|
70754
71037
|
}
|
|
70755
71038
|
function earnMarketFromPool(row, fallbackChainId, venueCollaterals) {
|
|
70756
|
-
const marketUid =
|
|
71039
|
+
const marketUid = str6(row.marketUid);
|
|
70757
71040
|
if (!marketUid) return void 0;
|
|
70758
71041
|
let earnUid;
|
|
70759
71042
|
try {
|
|
@@ -70761,8 +71044,8 @@ function earnMarketFromPool(row, fallbackChainId, venueCollaterals) {
|
|
|
70761
71044
|
} catch {
|
|
70762
71045
|
return void 0;
|
|
70763
71046
|
}
|
|
70764
|
-
const chainId =
|
|
70765
|
-
const venue =
|
|
71047
|
+
const chainId = str6(row.chainId) ?? fallbackChainId;
|
|
71048
|
+
const venue = str6(row.lender) ?? str6(row.lenderKey);
|
|
70766
71049
|
if (!chainId || !venue) return void 0;
|
|
70767
71050
|
const flags = row.flags ?? {};
|
|
70768
71051
|
const assetInfo = row.underlyingInfo?.asset ?? row.asset ?? {};
|
|
@@ -70799,32 +71082,32 @@ function earnMarketFromPool(row, fallbackChainId, venueCollaterals) {
|
|
|
70799
71082
|
// Same resolver as the vault half, so `protocol.key` means one thing
|
|
70800
71083
|
// across the listing: the STABLE family key, never the per-market venue.
|
|
70801
71084
|
// No lender publishes a curator today, hence the undefined.
|
|
70802
|
-
...resolveEarnIdentity(venue, void 0,
|
|
71085
|
+
...resolveEarnIdentity(venue, void 0, str6(row.lenderInfo?.protocol)),
|
|
70803
71086
|
// Pair-aware: "USDT · vs wstETH" for an isolated market, plain "USDC" for
|
|
70804
71087
|
// a shared pool. The fetcher's own name is only the fallback — it is the
|
|
70805
71088
|
// leg-local "Loan USDC", which a chain repeats across 300 markets and
|
|
70806
71089
|
// which says nothing about WHICH market this is. Identical to what the
|
|
70807
71090
|
// origin's SQL route builds, so both paths agree.
|
|
70808
71091
|
name: earnMarketLabel({
|
|
70809
|
-
assetSymbol:
|
|
70810
|
-
lenderMarketName:
|
|
70811
|
-
fetcherName:
|
|
71092
|
+
assetSymbol: str6(assetInfo.symbol),
|
|
71093
|
+
lenderMarketName: str6(row.lenderInfo?.name),
|
|
71094
|
+
fetcherName: str6(row.name),
|
|
70812
71095
|
venue,
|
|
70813
71096
|
// The venue's collaterals, UNFILTERED — the label removes this row's own
|
|
70814
71097
|
// leg itself. Filtering here made the collateral row of a 1-collateral
|
|
70815
71098
|
// market look like a 0-collateral one, so the two legs of one market
|
|
70816
71099
|
// disagreed about whether it was isolated.
|
|
70817
71100
|
collateralSymbols: venueCollaterals?.get(venueGroupKey(chainId, venue)),
|
|
70818
|
-
fallbackName:
|
|
71101
|
+
fallbackName: str6(row.name)
|
|
70819
71102
|
}),
|
|
70820
71103
|
// Never re-derived — the uid's third segment as the origin minted it.
|
|
70821
71104
|
ref: marketUid.split(":")[2],
|
|
70822
|
-
logoURI:
|
|
71105
|
+
logoURI: str6(assetInfo.logoURI),
|
|
70823
71106
|
asset: {
|
|
70824
71107
|
address: underlying,
|
|
70825
|
-
symbol:
|
|
71108
|
+
symbol: str6(assetInfo.symbol) ?? "",
|
|
70826
71109
|
decimals,
|
|
70827
|
-
assetGroup:
|
|
71110
|
+
assetGroup: str6(row.underlyingInfo?.assetGroup) ?? str6(row.asset?.assetGroup),
|
|
70828
71111
|
priceUsd
|
|
70829
71112
|
},
|
|
70830
71113
|
// A lending supply position is an aToken/cToken/eToken balance, but the
|
|
@@ -70854,7 +71137,7 @@ function earnMarketFromPool(row, fallbackChainId, venueCollaterals) {
|
|
|
70854
71137
|
availability,
|
|
70855
71138
|
risk: {
|
|
70856
71139
|
score: num12(row.risk?.score),
|
|
70857
|
-
label:
|
|
71140
|
+
label: str6(row.risk?.label),
|
|
70858
71141
|
illiquid: isIlliquid({
|
|
70859
71142
|
exitMode: "instant-capped",
|
|
70860
71143
|
tvlUsd: num12(row.totalDepositsUSD ?? row.totalDepositsUsd),
|
|
@@ -70869,7 +71152,7 @@ function earnMarketFromPool(row, fallbackChainId, venueCollaterals) {
|
|
|
70869
71152
|
// nothing else, and one may price its collateral off a feed that ignores
|
|
70870
71153
|
// a depeg in it.
|
|
70871
71154
|
oracle: addr2(row.oracleInfo?.feeds?.find((f) => f?.oracle)?.oracle),
|
|
70872
|
-
oracleDescription:
|
|
71155
|
+
oracleDescription: str6(
|
|
70873
71156
|
row.oracleInfo?.feeds?.find((f) => f?.priceDescription)?.priceDescription
|
|
70874
71157
|
),
|
|
70875
71158
|
borrowable: (flags.borrowingEnabled ?? row.borrowingEnabled) === true
|
|
@@ -71306,6 +71589,6 @@ function earnPositionTotals(items) {
|
|
|
71306
71589
|
};
|
|
71307
71590
|
}
|
|
71308
71591
|
|
|
71309
|
-
export { ApiBookSource, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_PROFILE_ID, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, EARN_DESCRIPTIONS, EARN_LABELS, EMPTY_BALANCE, EXACTLY_LENDER_KEY, FRACTION_RATE_PROVIDERS, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, HYPERCORE_VAULT_REGISTRY, IDLE_MARKET_ID, INTERFACE_IDS, LAGOON_API_URL, LAGOON_CHAIN_IDS, MORPHO_LENS, MULTICALL_FAILURE, MaxParamThresholds, PASSTHROUGH_RATE_EPSILON, PENDLE_ASSETS_URL, PENDLE_CHAIN_IDS, PENDLE_MARKETS_URL, SDK_FRACTION_RATE_PROVIDERS, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, TELLER_CALLS_PER_BID, TERMMAX_CALLS_PER_ACCOUNT, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, TERM_ADAPTERS, TERM_PROFILES, TERM_SHEET_SCHEMA_VERSION, TermMaxApiSource, TermSubgraphSource, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, VAULT_PROVIDERS, VAULT_PROVIDER_PROFILE, VAULT_PROVIDER_TRAITS, VAULT_SHARE_PRICE_PROBE, VAULT_VENUE_PREFIX, VOLATILE_VAULT_OVERRIDES, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, __resetResupplyUserCaches, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyPositionDelta, attachImplications, attachPricesToFlashLiquidity, borrowDescription, borrowFindings, borrowHeadline, buildExposures2 as buildExposures, buildFluidFTokensCall, buildLendingPositionUid, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildTermSheet, buildTermSheetsForGroup, buildVaultEarnUid, buildVaultLookup, buildVaultTermSheet, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, clearPendleMarketsCache, collateralSymbolsByVenue, collectFeedObservations, computeBorrowDelta2 as computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta2 as computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta2 as computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta2 as computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertDssMarketsToResponse, convertExactlyMarketsToResponse, convertFrankencoinMarketsToResponse, convertFraxlendPairsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, deriveBorrowTags, deriveSupplyTags, detectInterfaceKinds, disambiguateEarnNames, dssIlkBytes32, dssKeyParts, dssLenderKey, duration, earnDescription, earnLabel, earnMarketFromPool, earnMarketFromVault, earnMarketLabel, earnPositionFromLenderEntry, earnPositionFromVaultBalance, earnPositionTotals, earnRowSubtitle, earnUidFromMarketUid, earnVaultTerms, earnVenueKind, encodeBalanceFetcherCalldata, enrichTermSheet, enrichmentIndexFromRows, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feePhrase, feedKeyOf, feedStatKey, fetchDolomiteAccountNumbers, fetchDssMarkets, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFluidFTokens, fetchFrankencoinMarkets, fetchFraxlendPairs, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendleApiAssets, fetchPendleApiMarkets, fetchPendlePrices, fetchPendlePtMarkets, fetchResupplyMarkets, fetchRiverMarkets, fetchSiloVaults, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchYearnApiVaults, fetchYearnVaults, filterActiveLenders, filterLendersByProtocol, finalizeInfo, findingsFor, formatRaw, frankencoinKeyParts, frankencoinLenderKey, fraxlendAssetPerCollateral, fraxlendKeyParts, fraxlendLenderKey, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMorphoTypeMarketConverter, getReadFailurePolicy, getResolvedDolomiteAccountNumbers, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getTermProfile, getVaultPublicDataAll, getVaultWithdrawalRequests, hasCritical, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasPendleMarkets, hasUpshiftVaults, hasYearnVaults, ilkToKeySegment, implausibleRatePercent, inverseKeyParts, inverseLenderKey, isBoundNeed, isFailedCall, isIlliquid, isLendingPosition, isLiveMarket as isLivePendleMarket, isStablecoinSymbol, isVaultPosition, isVaultVenue, isYearnV3, keySegmentToIlk, keysFromMaps, lenderApiOnly, lenderFamily, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, llamaLendKeyParts, llamaLendLenderKey, mergeDeep, multicall3Abi2 as multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, parseBalanceFetcherResult, parseEarnUid, parseMergedResult, parseMulticallRpcResponses, parseExpirySeconds as parsePendleExpirySeconds, parseRawRpcBatchResponses, parseRawRpcResponses, parseTermMaxLtv, parseTokenBalanceResult, pct, assetKey as pendleAssetKey, positivePart2 as positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, pruneFeedStats, rankFindings, ratePercent, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, resolveAdapter, resolveDerivation, resolveEarnIdentity, resolveModeConfig, resolveStCeloDepositGroup, resolveVaultProfileId, resupplyKeyParts, resupplyLenderKey, resupplyMarketLabel, riverKeyParts, riverLenderKey, savingsAddresses, savingsBalanceKind, selectAssetGroupPrices, shortDate, splitChainScopedAddress as splitPendleChainScopedAddress, stampCapabilities, stampEarnSubtitles, stampVaultClassification, stampVaultTermSheets, stripLeadingBrand, supplyDescription, supplyFindings, supplyHeadline, swapRoutedProvidersArePriceConsistent, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, tickToAprNumber, tickToPrice, toDigest, toTermSheetInput, toVaultTermInput, trancheFromCounterparty, tryParseEarnUid, unflattenLenderData, updateFeedStats, usdValue, usddIlkBytes32, usddKeyParts, usddLenderKey, validateTermSheet, validateTermSheets, validateUserData, vaultSharesToAssets, vaultTermInputFromEarnMarket, vaultTermInputFromSourceRow, vaultTraits, vaultVenue, venueBrand, venueBrandKey, withMaturityLabel, withTrancheLabel };
|
|
71592
|
+
export { ApiBookSource, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_PROFILE_ID, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, EARN_DESCRIPTIONS, EARN_LABELS, EMPTY_BALANCE, EXACTLY_LENDER_KEY, FRACTION_RATE_PROVIDERS, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, HYPERCORE_VAULT_REGISTRY, IDLE_MARKET_ID, INTERFACE_IDS, LAGOON_API_URL, LAGOON_CHAIN_IDS, MORPHO_LENS, MULTICALL_FAILURE, MaxParamThresholds, PASSTHROUGH_RATE_EPSILON, PENDLE_ASSETS_URL, PENDLE_CHAIN_IDS, PENDLE_MARKETS_URL, SDK_FRACTION_RATE_PROVIDERS, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, TELLER_CALLS_PER_BID, TERMMAX_CALLS_PER_ACCOUNT, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, TERM_ADAPTERS, TERM_PROFILES, TERM_SHEET_SCHEMA_VERSION, TermMaxApiSource, TermSubgraphSource, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, VAULT_PROVIDERS, VAULT_PROVIDER_PROFILE, VAULT_PROVIDER_TRAITS, VAULT_SHARE_PRICE_PROBE, VAULT_VENUE_PREFIX, VOLATILE_VAULT_OVERRIDES, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, __resetResupplyUserCaches, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyPositionDelta, attachImplications, attachPricesToFlashLiquidity, borrowDescription, borrowFindings, borrowHeadline, buildExposures2 as buildExposures, buildFluidFTokensCall, buildLendingPositionUid, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildTermSheet, buildTermSheetsForGroup, buildVaultEarnUid, buildVaultLookup, buildVaultTermSheet, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, clearPendleMarketsCache, collateralSymbolsByVenue, collectFeedObservations, computeBorrowDelta2 as computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta2 as computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta2 as computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta2 as computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertDssMarketsToResponse, convertExactlyMarketsToResponse, convertFrankencoinMarketsToResponse, convertFraxlendPairsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, deriveBorrowTags, deriveSupplyTags, detectInterfaceKinds, dexResolverFor, disambiguateEarnNames, dssIlkBytes32, dssKeyParts, dssLenderKey, duration, earnDescription, earnLabel, earnMarketFromPool, earnMarketFromVault, earnMarketLabel, earnPositionFromLenderEntry, earnPositionFromVaultBalance, earnPositionTotals, earnRowSubtitle, earnUidFromMarketUid, earnVaultTerms, earnVenueKind, encodeBalanceFetcherCalldata, enrichTermSheet, enrichmentIndexFromRows, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feePhrase, feedKeyOf, feedStatKey, fetchDolomiteAccountNumbers, fetchDssMarkets, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFluidDexState, fetchFluidFTokens, fetchFrankencoinMarkets, fetchFraxlendPairs, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendleApiAssets, fetchPendleApiMarkets, fetchPendlePrices, fetchPendlePtMarkets, fetchResupplyMarkets, fetchRiverMarkets, fetchSiloVaults, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchYearnApiVaults, fetchYearnVaults, filterActiveLenders, filterLendersByProtocol, finalizeInfo, findingsFor, formatRaw, frankencoinKeyParts, frankencoinLenderKey, fraxlendAssetPerCollateral, fraxlendKeyParts, fraxlendLenderKey, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedFluidDexState, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMorphoTypeMarketConverter, getReadFailurePolicy, getResolvedDolomiteAccountNumbers, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getTermProfile, getVaultPublicDataAll, getVaultWithdrawalRequests, hasCritical, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasPendleMarkets, hasUpshiftVaults, hasYearnVaults, ilkToKeySegment, implausibleRatePercent, inverseKeyParts, inverseLenderKey, isBoundNeed, isFailedCall, isIlliquid, isLendingPosition, isLiveMarket as isLivePendleMarket, isStablecoinSymbol, isVaultPosition, isVaultVenue, isYearnV3, keySegmentToIlk, keysFromMaps, lenderApiOnly, lenderFamily, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, llamaLendKeyParts, llamaLendLenderKey, mergeDeep, multicall3Abi2 as multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, parseBalanceFetcherResult, parseEarnUid, parseMergedResult, parseMulticallRpcResponses, parseExpirySeconds as parsePendleExpirySeconds, parseRawRpcBatchResponses, parseRawRpcResponses, parseTermMaxLtv, parseTokenBalanceResult, pct, assetKey as pendleAssetKey, positivePart2 as positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, pruneFeedStats, rankFindings, ratePercent, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, resolveAdapter, resolveDerivation, resolveEarnIdentity, resolveModeConfig, resolveStCeloDepositGroup, resolveVaultProfileId, resupplyKeyParts, resupplyLenderKey, resupplyMarketLabel, riverKeyParts, riverLenderKey, savingsAddresses, savingsBalanceKind, selectAssetGroupPrices, shortDate, splitChainScopedAddress as splitPendleChainScopedAddress, stampCapabilities, stampEarnSubtitles, stampVaultClassification, stampVaultTermSheets, stripLeadingBrand, supplyDescription, supplyFindings, supplyHeadline, swapRoutedProvidersArePriceConsistent, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, tickToAprNumber, tickToPrice, toDigest, toTermSheetInput, toVaultTermInput, trancheFromCounterparty, tryParseEarnUid, unflattenLenderData, updateFeedStats, usdValue, usddIlkBytes32, usddKeyParts, usddLenderKey, validateTermSheet, validateTermSheets, validateUserData, vaultSharesToAssets, vaultTermInputFromEarnMarket, vaultTermInputFromSourceRow, vaultTraits, vaultVenue, venueBrand, venueBrandKey, withMaturityLabel, withTrancheLabel };
|
|
71310
71593
|
//# sourceMappingURL=index.js.map
|
|
71311
71594
|
//# sourceMappingURL=index.js.map
|