@1delta/margin-fetcher 0.0.406 → 0.0.408
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 +4 -0
- package/dist/index.js +523 -74
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { parseAbi, keccak256, encodeAbiParameters, formatEther, BaseError, pad, encodeFunctionData, formatUnits, isAddress, getAddress, decodeFunctionResult, decodeAbiParameters, concat, AbiEncodingLengthMismatchError, concatHex, toBytes, slice, InvalidAddressError, stringToHex, boolToHex, integerRegex, numberToHex, bytesRegex, BytesSizeMismatchError, arrayRegex, UnsupportedPackedAbiType } from './chunk-SRWUFRRR.js';
|
|
2
2
|
import './chunk-BYTNVMX7.js';
|
|
3
3
|
import './chunk-PR4QN5HX.js';
|
|
4
|
-
import { Lender, LIQUITY_FAMILY_LENDERS, isAaveType, isCompoundV3, isMultiMarket, isSiloV2Type, isSiloV3Type, isDolomite, isMidnight, isTerm, isExactly, isLiquityFamily, isRiver, isTeller, isEulerType, isAaveV4Type, isInit, isMorphoType, isCompoundV2Type, isVenusType, isSumerType, AAVE_V3_LENDERS, AAVE_V2_LENDERS, isAaveV2Type, isAaveV32Type, isAaveV3Type, isFluid, isGearboxV3,
|
|
4
|
+
import { Lender, LIQUITY_FAMILY_LENDERS, isAaveType, isCompoundV3, isMultiMarket, isSiloV2Type, isSiloV3Type, isDolomite, isMidnight, isTerm, isExactly, isLiquityFamily, isRiver, isTeller, isInverse, isTermMax, isEulerType, isAaveV4Type, isInit, isMorphoType, isCompoundV2Type, isVenusType, isSumerType, AAVE_V3_LENDERS, AAVE_V2_LENDERS, isAaveV2Type, isAaveV32Type, isAaveV3Type, isFluid, isGearboxV3, isYLDR, isCompoundV3Type, isLista, isTectonicType, isKineticType, isBenqiType } from '@1delta/lender-registry';
|
|
5
5
|
export { isAaveType, isAaveV2Type, isAaveV32Type, isAaveV3Type, isCompoundV3, isCompoundV3Type, isInit, isMorphoType, isMultiMarket, isYLDR } from '@1delta/lender-registry';
|
|
6
|
-
import { fetchTokenLists, fetchTokenList, aavePools, compoundV3Pools, initConfig, morphoPools, compoundV2Pools, eulerVaults, siloMarkets, siloV2LenderKey, siloMarketsV3, siloV3LenderKey, aaveV4Spokes, aaveV4SpokeLenderKey, fluidResolvers, gearboxResolvers, dolomiteConfigs, midnightConfig, termConfig, termMarketsByChain, exactlyConfig, liquityLendersByChain, riverLendersByChain, inverseLendersByChain, tellerConfigByChain, tellerPoolsByChain, aaveReserves, compoundV3Reserves, liquityConfigFor, liquityBranchesByChain, riverConfigFor, riverChainData, termMaxApiBaseUrl,
|
|
6
|
+
import { fetchTokenLists, fetchTokenList, aavePools, compoundV3Pools, initConfig, morphoPools, compoundV2Pools, eulerVaults, siloMarkets, siloV2LenderKey, siloMarketsV3, siloV3LenderKey, aaveV4Spokes, aaveV4SpokeLenderKey, fluidResolvers, gearboxResolvers, dolomiteConfigs, midnightConfig, termConfig, termMarketsByChain, exactlyConfig, liquityLendersByChain, riverLendersByChain, inverseLendersByChain, tellerConfigByChain, tellerPoolsByChain, termMaxConfigByChain, aaveReserves, compoundV3Reserves, liquityConfigFor, liquityBranchesByChain, riverConfigFor, riverChainData, termMaxApiBaseUrl, termMaxLenderKey, inverseConfigFor, inverseChainData, aaveOracles, morphoTypeMarkets, resolveMidnightApiBase, resolveTermApiBase, getSiloV2MarketEntry, getSiloV3MarketEntry, dolomiteEmode, aaveTokens, morphoTypeVaults, eulerConfigs, gearboxMarketCompressor, gearboxMarketConfigurators, gearboxV3LenderKey, midnightMarketsByChain, parseAaveV4SpokeLenderKey, gearboxAccountCompressor, compoundV2Tokens, exactlyMarketsByChain, aaveOraclesConfig, compoundV2Oracles, compoundV2TokenArray, compoundV2OraclesConfig, compoundV3OraclesData, compoundV3BaseData, compoundV2Reserves, aaveV4Oracles } from '@1delta/data-sdk';
|
|
7
7
|
import lodash from 'lodash';
|
|
8
8
|
import { multicallRetryUniversal, getEvmClient, getEvmChain, getEvmClientUniversal } from '@1delta/providers';
|
|
9
9
|
import { LiquityTroveManagerAbi, LiquityActivePoolAbi, LiquityStabilityPoolAbi, LiquityPriceFeedAbi, LiquitySortedTrovesAbi, RiverTroveManagerAbi, RiverStabilityPoolAbi, TellerMarketRegistryAbi, TellerV2Abi, InverseMarketAbi, InverseOracleAbi, InverseDbrAbi, Erc20Abi, MetaMorphoAbi, ExactlyPreviewerAbi, ExactlyAuditorAbi, LenderCommitmentGroupAbi, FluidLendingResolverAbi, FluidVaultResolverAbi, FluidLiquidityResolverAbi, MoolahVaultAbi, MorphoLensAbi, AaveV4SpokeAbi, AaveV4OracleAbi, AaveV4HubAbi, DolomiteMarginAbi, GearboxMarketCompressorV310Abi, MorphoBlueAbi, MidnightAbi, TermRepoTokenAbi, TermRepoServicerAbi, TermRepoCollateralManagerAbi, LiquityTroveNFTAbi, LiquityCollSurplusPoolAbi, TellerCollateralManagerAbi, InverseEscrowAbi, GearboxCreditAccountCompressorV310Abi, TermPriceConsumerAbi, TermMaxOracleAggregatorV2Abi } from '@1delta/abis';
|
|
@@ -7522,6 +7522,9 @@ var getLendersForChain = (c) => {
|
|
|
7522
7522
|
if (tellerConfigByChain(c)?.tellerV2 && tellerPoolsByChain(c).length > 0) {
|
|
7523
7523
|
lenders.push(Lender.TELLER);
|
|
7524
7524
|
}
|
|
7525
|
+
if (termMaxConfigByChain(c)?.viewer) {
|
|
7526
|
+
lenders.push(Lender.TERMMAX);
|
|
7527
|
+
}
|
|
7525
7528
|
return lenders.filter((l) => !isExcludedLender(l));
|
|
7526
7529
|
};
|
|
7527
7530
|
var filterLendersByProtocol = (allLenders, protocolList) => {
|
|
@@ -23612,6 +23615,14 @@ function parseTermMaxLtv(v) {
|
|
|
23612
23615
|
return Number.isFinite(n) ? n / Number(DECIMAL_BASE) : 0;
|
|
23613
23616
|
}
|
|
23614
23617
|
}
|
|
23618
|
+
function termMaxLtvToWad(v) {
|
|
23619
|
+
if (v === void 0 || v === null || v === "") return "0";
|
|
23620
|
+
try {
|
|
23621
|
+
return (BigInt(v) * 10000000000n).toString();
|
|
23622
|
+
} catch {
|
|
23623
|
+
return "0";
|
|
23624
|
+
}
|
|
23625
|
+
}
|
|
23615
23626
|
|
|
23616
23627
|
// src/lending/public-data/termmax/convertPublic.ts
|
|
23617
23628
|
var nowSec4 = () => Math.floor(Date.now() / 1e3);
|
|
@@ -23773,7 +23784,9 @@ function convertTermMaxMarketsToResponse(raw, chainId, prices = {}, _additionalY
|
|
|
23773
23784
|
loanDecimals: config.debtDecimals,
|
|
23774
23785
|
collateralDecimals: config.collateralDecimals,
|
|
23775
23786
|
id: config.market,
|
|
23776
|
-
|
|
23787
|
+
// WAD-scaled to match Morpho/Midnight on this shared field — the raw
|
|
23788
|
+
// 1e8 values stay on `maxLtv` / `liquidationLtv` below.
|
|
23789
|
+
lltv: termMaxLtvToWad(config.liquidationLtv),
|
|
23777
23790
|
oracle: config.oracle ?? zeroAddress,
|
|
23778
23791
|
irm: zeroAddress,
|
|
23779
23792
|
collateralAddress: collAddr,
|
|
@@ -25025,6 +25038,8 @@ function lenderApiOnly(lender, chainId) {
|
|
|
25025
25038
|
if (isLiquityFamily(lender)) return true;
|
|
25026
25039
|
if (isRiver(lender)) return true;
|
|
25027
25040
|
if (isTeller(lender)) return true;
|
|
25041
|
+
if (isInverse(lender)) return true;
|
|
25042
|
+
if (isTermMax(lender)) return true;
|
|
25028
25043
|
return false;
|
|
25029
25044
|
}
|
|
25030
25045
|
function lenderApiWithOnChainFallback(lender, chainId) {
|
|
@@ -39682,6 +39697,218 @@ var reProtocolFetcher = {
|
|
|
39682
39697
|
}
|
|
39683
39698
|
};
|
|
39684
39699
|
|
|
39700
|
+
// src/yields/intrinsic/fetchers/threeJane.ts
|
|
39701
|
+
var USD3_KEY = "3JANE::USD3";
|
|
39702
|
+
var SUSD3_KEY = "3JANE::sUSD3";
|
|
39703
|
+
var USD3_GROUP_KEY = "3Jane USD3::USD3";
|
|
39704
|
+
var SUSD3_GROUP_KEY = "3Jane Staked USD3::SUSD3";
|
|
39705
|
+
var USD3_POOL = "f8cd444e-d99f-4132-b234-fd3482bf8806";
|
|
39706
|
+
var SUSD3_POOL = "a99bb965-ebaa-4d98-9ed2-fa18de52c605";
|
|
39707
|
+
var threeJaneFetcher = {
|
|
39708
|
+
label: "THREE_JANE",
|
|
39709
|
+
fetch: async () => {
|
|
39710
|
+
const [usd3, susd3] = await Promise.allSettled([
|
|
39711
|
+
fetchDefiLlamaApy(USD3_POOL),
|
|
39712
|
+
fetchDefiLlamaApy(SUSD3_POOL)
|
|
39713
|
+
]);
|
|
39714
|
+
const out = {};
|
|
39715
|
+
if (usd3.status === "fulfilled") {
|
|
39716
|
+
const apr = apyToAprPercent(usd3.value);
|
|
39717
|
+
out[USD3_KEY] = apr;
|
|
39718
|
+
out[USD3_GROUP_KEY] = apr;
|
|
39719
|
+
}
|
|
39720
|
+
if (susd3.status === "fulfilled") {
|
|
39721
|
+
const apr = apyToAprPercent(susd3.value);
|
|
39722
|
+
out[SUSD3_KEY] = apr;
|
|
39723
|
+
out[SUSD3_GROUP_KEY] = apr;
|
|
39724
|
+
}
|
|
39725
|
+
if (Object.keys(out).length === 0) {
|
|
39726
|
+
throw new Error("3Jane: DefiLlama returned no apy for either pool");
|
|
39727
|
+
}
|
|
39728
|
+
return out;
|
|
39729
|
+
}
|
|
39730
|
+
};
|
|
39731
|
+
|
|
39732
|
+
// src/yields/intrinsic/fetchers/tori.ts
|
|
39733
|
+
var TORI_APY_URL = "https://app.tori.finance/api/apy";
|
|
39734
|
+
var TORI_DEFILLAMA_POOL = "e7fdda30-ce71-5dea-8b3a-dd43de77ce55";
|
|
39735
|
+
var STRUSD_KEY = "STRUSD";
|
|
39736
|
+
var STRUSD_GROUP_KEY = "Tori Staked trUSD::STRUSD";
|
|
39737
|
+
var fetchToriApyPercent = async () => {
|
|
39738
|
+
const res = await fetch(TORI_APY_URL, {
|
|
39739
|
+
headers: { accept: "application/json" },
|
|
39740
|
+
signal: AbortSignal.timeout(8e3)
|
|
39741
|
+
});
|
|
39742
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
39743
|
+
const apy = Number((await res.json())?.apy);
|
|
39744
|
+
if (Number.isFinite(apy) && apy > 0) return apy;
|
|
39745
|
+
throw new Error("apy missing");
|
|
39746
|
+
};
|
|
39747
|
+
var toriFetcher = {
|
|
39748
|
+
label: "STRUSD",
|
|
39749
|
+
fetch: async () => {
|
|
39750
|
+
const apy = await fetchToriApyPercent().catch(
|
|
39751
|
+
() => fetchDefiLlamaApy(TORI_DEFILLAMA_POOL)
|
|
39752
|
+
);
|
|
39753
|
+
const apr = apyToAprPercent(apy);
|
|
39754
|
+
return { [STRUSD_KEY]: apr, [STRUSD_GROUP_KEY]: apr };
|
|
39755
|
+
}
|
|
39756
|
+
};
|
|
39757
|
+
var CHAIN_ID8 = Chain.ETHEREUM_MAINNET;
|
|
39758
|
+
var SNUSD = "0x08efcc2f3e61185d0ea7f8830b3fec9bfa2ee313";
|
|
39759
|
+
var YEAR_SECONDS6 = 31536000n;
|
|
39760
|
+
var ONE_E187 = 10n ** 18n;
|
|
39761
|
+
var SNUSD_KEY = "SNUSD";
|
|
39762
|
+
var SNUSD_GROUP_KEY = "Staked NUSD::sNUSD";
|
|
39763
|
+
var SNUSD_LEGACY_GROUP_KEY = "sNUSD::Staked NUSD";
|
|
39764
|
+
var STAKED_NUSD_ABI = [
|
|
39765
|
+
{
|
|
39766
|
+
name: "vestingAmount",
|
|
39767
|
+
type: "function",
|
|
39768
|
+
stateMutability: "view",
|
|
39769
|
+
inputs: [],
|
|
39770
|
+
outputs: [{ type: "uint256" }]
|
|
39771
|
+
},
|
|
39772
|
+
{
|
|
39773
|
+
name: "lastDistributionTimestamp",
|
|
39774
|
+
type: "function",
|
|
39775
|
+
stateMutability: "view",
|
|
39776
|
+
inputs: [],
|
|
39777
|
+
outputs: [{ type: "uint256" }]
|
|
39778
|
+
},
|
|
39779
|
+
{
|
|
39780
|
+
name: "vestingPeriod",
|
|
39781
|
+
type: "function",
|
|
39782
|
+
stateMutability: "view",
|
|
39783
|
+
inputs: [],
|
|
39784
|
+
outputs: [{ type: "uint256" }]
|
|
39785
|
+
},
|
|
39786
|
+
{
|
|
39787
|
+
name: "totalAssets",
|
|
39788
|
+
type: "function",
|
|
39789
|
+
stateMutability: "view",
|
|
39790
|
+
inputs: [],
|
|
39791
|
+
outputs: [{ type: "uint256" }]
|
|
39792
|
+
}
|
|
39793
|
+
];
|
|
39794
|
+
var fetchSnusdAprOnChain = async () => {
|
|
39795
|
+
const [vestingAmount, lastDistribution, vestingPeriod, totalAssets] = await multicallRetryUniversal({
|
|
39796
|
+
chain: CHAIN_ID8,
|
|
39797
|
+
abi: STAKED_NUSD_ABI,
|
|
39798
|
+
calls: [
|
|
39799
|
+
{ address: SNUSD, name: "vestingAmount", params: [] },
|
|
39800
|
+
{ address: SNUSD, name: "lastDistributionTimestamp", params: [] },
|
|
39801
|
+
{ address: SNUSD, name: "vestingPeriod", params: [] },
|
|
39802
|
+
{ address: SNUSD, name: "totalAssets", params: [] }
|
|
39803
|
+
],
|
|
39804
|
+
allowFailure: false
|
|
39805
|
+
});
|
|
39806
|
+
if (totalAssets === 0n) return 0;
|
|
39807
|
+
const elapsed = BigInt(Math.floor(Date.now() / 1e3)) - lastDistribution;
|
|
39808
|
+
const window = elapsed > vestingPeriod ? elapsed : vestingPeriod;
|
|
39809
|
+
if (window <= 0n) return 0;
|
|
39810
|
+
const perSecond = vestingAmount / window;
|
|
39811
|
+
return Number(perSecond * YEAR_SECONDS6 * ONE_E187 / totalAssets) / 1e16;
|
|
39812
|
+
};
|
|
39813
|
+
var snusdFetcher = {
|
|
39814
|
+
label: "SNUSD",
|
|
39815
|
+
fetch: async () => {
|
|
39816
|
+
const apr = await fetchSnusdAprOnChain().catch(() => 0);
|
|
39817
|
+
return {
|
|
39818
|
+
[SNUSD_KEY]: apr,
|
|
39819
|
+
[SNUSD_GROUP_KEY]: apr,
|
|
39820
|
+
[SNUSD_LEGACY_GROUP_KEY]: apr
|
|
39821
|
+
};
|
|
39822
|
+
}
|
|
39823
|
+
};
|
|
39824
|
+
var RAY4 = 10n ** 27n;
|
|
39825
|
+
var YEAR_SECONDS7 = 31536e3;
|
|
39826
|
+
var DSR_ABI = [
|
|
39827
|
+
{
|
|
39828
|
+
name: "dsr",
|
|
39829
|
+
type: "function",
|
|
39830
|
+
stateMutability: "view",
|
|
39831
|
+
inputs: [],
|
|
39832
|
+
outputs: [{ type: "uint256" }]
|
|
39833
|
+
}
|
|
39834
|
+
];
|
|
39835
|
+
var USDD_POTS = [
|
|
39836
|
+
{
|
|
39837
|
+
chainId: Chain.ETHEREUM_MAINNET,
|
|
39838
|
+
pot: "0xe789578252cc026ffb3413a1104ba223fdeca500",
|
|
39839
|
+
apiKey: "ethApy"
|
|
39840
|
+
},
|
|
39841
|
+
{
|
|
39842
|
+
chainId: Chain.BNB_SMART_CHAIN_MAINNET,
|
|
39843
|
+
pot: "0xf0c506e48383c1925c025ec9f4a9e1dd94ff8b18",
|
|
39844
|
+
apiKey: "bscApy"
|
|
39845
|
+
}
|
|
39846
|
+
];
|
|
39847
|
+
var USDD_EARN_APY_URL = "https://openapi.usdd.io/api/v1/external/earn-apy";
|
|
39848
|
+
var susddKey = (chainId) => `USDD::${chainId}::sUSDD`;
|
|
39849
|
+
var SUSDD_GROUP_KEY = "Savings Usdd::sUSDD";
|
|
39850
|
+
var aprFromDsr = (dsr) => {
|
|
39851
|
+
if (dsr <= RAY4) return 0;
|
|
39852
|
+
const perSecond = Number(dsr - RAY4) / 1e27;
|
|
39853
|
+
return perSecond * YEAR_SECONDS7 * 100;
|
|
39854
|
+
};
|
|
39855
|
+
var fetchChainDsr = async (chainId, pot) => {
|
|
39856
|
+
const [dsr] = await multicallRetryUniversal({
|
|
39857
|
+
chain: chainId,
|
|
39858
|
+
abi: DSR_ABI,
|
|
39859
|
+
calls: [{ address: pot, name: "dsr", params: [] }],
|
|
39860
|
+
allowFailure: false
|
|
39861
|
+
});
|
|
39862
|
+
if (typeof dsr !== "bigint" || dsr < RAY4) {
|
|
39863
|
+
throw new Error(`USDD: unreadable dsr() on chain ${chainId}`);
|
|
39864
|
+
}
|
|
39865
|
+
return aprFromDsr(dsr);
|
|
39866
|
+
};
|
|
39867
|
+
var fetchApiAprs = async () => {
|
|
39868
|
+
const res = await fetch(USDD_EARN_APY_URL, {
|
|
39869
|
+
method: "GET",
|
|
39870
|
+
headers: { Accept: "application/json" }
|
|
39871
|
+
}).then((r) => r.json());
|
|
39872
|
+
if (res?.code !== 0 || !res?.data) return {};
|
|
39873
|
+
const out = {};
|
|
39874
|
+
for (const key of ["ethApy", "bscApy"]) {
|
|
39875
|
+
const apy = Number(res.data[key]);
|
|
39876
|
+
if (Number.isFinite(apy) && apy > 0) out[key] = apyToApr(apy) * 100;
|
|
39877
|
+
}
|
|
39878
|
+
return out;
|
|
39879
|
+
};
|
|
39880
|
+
var usddFetcher = {
|
|
39881
|
+
label: "USDD_SUSDD",
|
|
39882
|
+
fetch: async () => {
|
|
39883
|
+
const settled = await Promise.allSettled(
|
|
39884
|
+
USDD_POTS.map(({ chainId, pot }) => fetchChainDsr(chainId, pot))
|
|
39885
|
+
);
|
|
39886
|
+
const out = {};
|
|
39887
|
+
const missed = [];
|
|
39888
|
+
USDD_POTS.forEach((p, i) => {
|
|
39889
|
+
const r = settled[i];
|
|
39890
|
+
if (r.status === "fulfilled") out[susddKey(p.chainId)] = r.value;
|
|
39891
|
+
else missed.push(p);
|
|
39892
|
+
});
|
|
39893
|
+
if (missed.length > 0) {
|
|
39894
|
+
try {
|
|
39895
|
+
const api = await fetchApiAprs();
|
|
39896
|
+
for (const p of missed) {
|
|
39897
|
+
const apr = api[p.apiKey];
|
|
39898
|
+
if (apr !== void 0) out[susddKey(p.chainId)] = apr;
|
|
39899
|
+
}
|
|
39900
|
+
} catch {
|
|
39901
|
+
}
|
|
39902
|
+
}
|
|
39903
|
+
if (Object.keys(out).length === 0) {
|
|
39904
|
+
throw new Error("USDD: no chain returned a readable savings rate");
|
|
39905
|
+
}
|
|
39906
|
+
const group = out[susddKey(Chain.ETHEREUM_MAINNET)] ?? out[susddKey(Chain.BNB_SMART_CHAIN_MAINNET)];
|
|
39907
|
+
if (group !== void 0) out[SUSDD_GROUP_KEY] = group;
|
|
39908
|
+
return out;
|
|
39909
|
+
}
|
|
39910
|
+
};
|
|
39911
|
+
|
|
39685
39912
|
// src/yields/intrinsic/fetchers/nativeCreditPool.ts
|
|
39686
39913
|
var nativeCreditPoolYieldKey = (chainId, underlying) => `${chainId}:${underlying.toLowerCase()}`;
|
|
39687
39914
|
var POOL_IDS = {
|
|
@@ -40782,6 +41009,7 @@ var NATIVE_WNLP_ENTRIES = Object.fromEntries(
|
|
|
40782
41009
|
underlying,
|
|
40783
41010
|
symbol,
|
|
40784
41011
|
brand: "Native",
|
|
41012
|
+
description: "Native Credit Pool: deposits fund a credit line that KYB'd market makers draw to quote on Native's order book, and yield is a rebate on their trading fees \u2014 not loan interest. The share price is operator-pushed with no on-chain solvency invariant; exit instantly at a fee (capped by the chain's CreditVault inventory) or free through the withdrawal queue.",
|
|
40785
41013
|
decimals,
|
|
40786
41014
|
isRebasing: false,
|
|
40787
41015
|
isMintable: true,
|
|
@@ -40802,6 +41030,7 @@ var stUsdGroup = {
|
|
|
40802
41030
|
base: {
|
|
40803
41031
|
symbol: "stUSD",
|
|
40804
41032
|
brand: "Angle",
|
|
41033
|
+
description: "USDA is Angle's overcollateralised USD stablecoin; stUSD stakes it and accrues a governance-managed savings rate funded by the yield on Angle's reserves (RWAs and DeFi lending). Instant permissionless stake and unstake.",
|
|
40805
41034
|
decimals: 18,
|
|
40806
41035
|
isRebasing: false,
|
|
40807
41036
|
isMintable: true,
|
|
@@ -40836,6 +41065,7 @@ var stEurGroup = {
|
|
|
40836
41065
|
base: {
|
|
40837
41066
|
symbol: "stEUR",
|
|
40838
41067
|
brand: "Angle",
|
|
41068
|
+
description: "EURA is Angle's overcollateralised euro stablecoin; stEUR stakes it and accrues a governance-managed savings rate funded by the yield on Angle's reserves. Instant permissionless stake and unstake.",
|
|
40839
41069
|
decimals: 18,
|
|
40840
41070
|
isRebasing: false,
|
|
40841
41071
|
isMintable: true,
|
|
@@ -40867,6 +41097,7 @@ var yUsdGroup = {
|
|
|
40867
41097
|
base: {
|
|
40868
41098
|
symbol: "yUSD",
|
|
40869
41099
|
brand: "YieldFi",
|
|
41100
|
+
description: "YieldFi's managed USD vault over USDC: deposits are allocated to curated DeFi and CeDeFi strategies and yield accrues into the share price (rewards vest over ~24h to smooth the curve). Instant exit.",
|
|
40870
41101
|
// 18-decimal share over 6-decimal USDC — see TIMELOCKS_AND_CHAINS.md.
|
|
40871
41102
|
decimals: 18,
|
|
40872
41103
|
underlyingDecimals: 6,
|
|
@@ -40896,6 +41127,7 @@ var sUsdcGroup = {
|
|
|
40896
41127
|
reader: "erc4626-idle",
|
|
40897
41128
|
symbol: "sUSDC",
|
|
40898
41129
|
brand: "Spark",
|
|
41130
|
+
description: "Not a standalone vault: a share is sUSDS held via Spark's PSM3, so sUSDC earns the Sky Savings Rate verbatim with USDC in and out routed through the PSM. Exits settle instantly but are capped by the PSM pocket's USDC balance \u2014 deep on Ethereum, materially thinner on the L2 deployments.",
|
|
40899
41131
|
decimals: 18,
|
|
40900
41132
|
underlyingDecimals: 6,
|
|
40901
41133
|
isRebasing: false,
|
|
@@ -40939,6 +41171,7 @@ var reUsdGroup = {
|
|
|
40939
41171
|
reader: "nav-oracle",
|
|
40940
41172
|
symbol: "reUSD",
|
|
40941
41173
|
brand: "Re Protocol",
|
|
41174
|
+
description: "Senior tranche of Re's reinsurance capital stack: deposits back insurance-linked programs and earn underwriting premium (the junior reUSDe absorbs losses first). The token is a bare ERC-20 priced by a daily NAV oracle; exits are instant (small fee) only while the redemption buffer holds, otherwise they queue \u2014 quarterly in the worst case.",
|
|
40942
41175
|
decimals: 18,
|
|
40943
41176
|
underlyingDecimals: 6,
|
|
40944
41177
|
isRebasing: false,
|
|
@@ -40991,6 +41224,7 @@ var sUsdpGroup = {
|
|
|
40991
41224
|
base: {
|
|
40992
41225
|
symbol: "sUSDp",
|
|
40993
41226
|
brand: "Parallel",
|
|
41227
|
+
description: "USDp is Parallel's (Angle-lineage) stablecoin; sUSDp accrues yield as keeper-minted USDp at a governance-set rate, with backing held in the Parallelizer reserves rather than enforced by an on-chain solvency invariant. Instant permissionless exit.",
|
|
40994
41228
|
decimals: 18,
|
|
40995
41229
|
isRebasing: false,
|
|
40996
41230
|
isMintable: true,
|
|
@@ -41024,6 +41258,7 @@ var cUsdoGroup = {
|
|
|
41024
41258
|
base: {
|
|
41025
41259
|
symbol: "cUSDO",
|
|
41026
41260
|
brand: "OpenEden",
|
|
41261
|
+
description: "USDO is OpenEden's rebasing, T-bill-backed yieldcoin (minting against fiat is KYC-gated at OpenEden); cUSDO is the permissionless non-rebasing wrapper that turns the rebase into an appreciating share price. Instant wrap and unwrap.",
|
|
41027
41262
|
decimals: 18,
|
|
41028
41263
|
isRebasing: false,
|
|
41029
41264
|
isMintable: true,
|
|
@@ -41047,6 +41282,32 @@ var cUsdoGroup = {
|
|
|
41047
41282
|
}
|
|
41048
41283
|
}
|
|
41049
41284
|
};
|
|
41285
|
+
var sUsddGroup = {
|
|
41286
|
+
base: {
|
|
41287
|
+
symbol: "sUSDD",
|
|
41288
|
+
brand: "USDD",
|
|
41289
|
+
description: "USDD 2.0 is the TRON-ecosystem, Maker-fork USD stablecoin; sUSDD is an sDAI-style vault accruing the USDD Savings Rate from its per-chain Pot. Instant exit; the Ethereum and BNB stacks are independent, with independent rates.",
|
|
41290
|
+
decimals: 18,
|
|
41291
|
+
isRebasing: false,
|
|
41292
|
+
isMintable: true,
|
|
41293
|
+
withdrawalMode: "instant",
|
|
41294
|
+
yieldFetcher: usddFetcher
|
|
41295
|
+
},
|
|
41296
|
+
chains: {
|
|
41297
|
+
"1": {
|
|
41298
|
+
address: "0xc5d6a7b61d18afa11435a889557b068bb9f29930",
|
|
41299
|
+
underlying: "0x4f8e5de400de08b164e7421b3ee387f461becd1a",
|
|
41300
|
+
// USDD 2.0
|
|
41301
|
+
yieldKey: susddKey("1")
|
|
41302
|
+
},
|
|
41303
|
+
"56": {
|
|
41304
|
+
address: "0x8ba9da757d1d66c58b1ae7e2ed6c04087348a82d",
|
|
41305
|
+
underlying: "0x45e51bc23d592eb2dba86da3985299f7895d66ba",
|
|
41306
|
+
// USDD 2.0
|
|
41307
|
+
yieldKey: susddKey("56")
|
|
41308
|
+
}
|
|
41309
|
+
}
|
|
41310
|
+
};
|
|
41050
41311
|
var MULTI_CHAIN_GROUPS = [
|
|
41051
41312
|
stUsdGroup,
|
|
41052
41313
|
stEurGroup,
|
|
@@ -41054,12 +41315,14 @@ var MULTI_CHAIN_GROUPS = [
|
|
|
41054
41315
|
sUsdcGroup,
|
|
41055
41316
|
reUsdGroup,
|
|
41056
41317
|
sUsdpGroup,
|
|
41057
|
-
cUsdoGroup
|
|
41318
|
+
cUsdoGroup,
|
|
41319
|
+
sUsddGroup
|
|
41058
41320
|
];
|
|
41059
41321
|
var sparkV2Base = (symbol, decimals) => ({
|
|
41060
41322
|
reader: "erc4626-idle",
|
|
41061
41323
|
symbol,
|
|
41062
41324
|
brand: "Spark",
|
|
41325
|
+
description: "Spark Vaults V2: deposits are lent out through the Spark Liquidity Layer and accrue an admin-set vault savings rate \u2014 the vault's assets are a claim on Spark, not cash in the contract, with no on-chain solvency invariant. Exits are instant up to the vault's idle balance; anything larger settles through Spark's withdrawal intents, typically within minutes.",
|
|
41063
41326
|
decimals,
|
|
41064
41327
|
underlyingDecimals: decimals,
|
|
41065
41328
|
isRebasing: false,
|
|
@@ -41075,6 +41338,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41075
41338
|
underlying: "0x4c9edd5852cd905f086c759e8383e09bff1e68b3",
|
|
41076
41339
|
symbol: "sUSDe",
|
|
41077
41340
|
brand: "Ethena",
|
|
41341
|
+
description: "USDe is Ethena's synthetic dollar \u2014 staked-ETH/BTC collateral hedged with short perpetual futures (delta-neutral). sUSDe stakes it and accrues the basis and staking revenue via an appreciating share price; unstaking requires a cooldown (7 days pinned here, governance-mutable).",
|
|
41078
41342
|
decimals: 18,
|
|
41079
41343
|
isRebasing: false,
|
|
41080
41344
|
isMintable: true,
|
|
@@ -41086,6 +41350,51 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41086
41350
|
yieldFetcher: susdeFetcher,
|
|
41087
41351
|
yieldKey: "SUSDE"
|
|
41088
41352
|
},
|
|
41353
|
+
{
|
|
41354
|
+
// Tori strUSD — StakedUSDeV2 clone over trUSD (delta-neutral
|
|
41355
|
+
// synthetic dollar). Cooldown verified on-chain 2026-08:
|
|
41356
|
+
// `cooldownDuration() = 604800`, silo = 0xF7c0d885…, direct
|
|
41357
|
+
// withdraw/redeem disabled while active.
|
|
41358
|
+
address: "0x280839980a7ed0d7717f64125fe241012e5f5815",
|
|
41359
|
+
underlying: "0xd0580192e98ea6ceb9c7b6191ed2e27560911697",
|
|
41360
|
+
// trUSD
|
|
41361
|
+
symbol: "strUSD",
|
|
41362
|
+
brand: "Tori",
|
|
41363
|
+
description: "trUSD is Tori's delta-neutral synthetic dollar \u2014 capital runs market-neutral money-market, futures-basis and calendar-spread strategies with off-chain custodians. strUSD stakes it with an appreciating share price (a 10% performance fee is already netted in); unstaking requires a 7-day cooldown claimed through the trUSD Silo.",
|
|
41364
|
+
decimals: 18,
|
|
41365
|
+
isRebasing: false,
|
|
41366
|
+
isMintable: true,
|
|
41367
|
+
withdrawalMode: "fixed-cooldown",
|
|
41368
|
+
withdrawalCooldownSeconds: 7 * 86400,
|
|
41369
|
+
yieldFetcher: toriFetcher,
|
|
41370
|
+
yieldKey: STRUSD_KEY
|
|
41371
|
+
},
|
|
41372
|
+
{
|
|
41373
|
+
// Neutrl sNUSD — StakedUSDeV2 clone over NUSD (market-neutral
|
|
41374
|
+
// OTC-discount arbitrage + funding-rate synthetic dollar).
|
|
41375
|
+
// Verified on-chain 2026-08: `cooldownDuration() = 864000` (10d,
|
|
41376
|
+
// governance-mutable), `vestingPeriod() = 604800`, maxWithdraw = 0
|
|
41377
|
+
// while active, exits park in the NUSD Silo 0x6cdfc009… and claim
|
|
41378
|
+
// via `unstake`. A docs-listed InstantUnstaking contract
|
|
41379
|
+
// (0x4Bb8F67D…, 1% fee) exists but held ~2k NUSD against $35M TVL
|
|
41380
|
+
// at integration — dust coverage, deliberately not modeled;
|
|
41381
|
+
// revisit as `fee-or-queued` if Neutrl ever funds the buffer.
|
|
41382
|
+
// Arbitrum/Plasma carry same-address LayerZero OFT bridges whose
|
|
41383
|
+
// 4626 surface reverts (bare ERC-20s) — Ethereum-only row.
|
|
41384
|
+
address: "0x08efcc2f3e61185d0ea7f8830b3fec9bfa2ee313",
|
|
41385
|
+
underlying: "0xe556aba6fe6036275ec1f87eda296be72c811bce",
|
|
41386
|
+
// NUSD
|
|
41387
|
+
symbol: "sNUSD",
|
|
41388
|
+
brand: "Neutrl",
|
|
41389
|
+
description: "NUSD is Neutrl's market-neutral synthetic dollar \u2014 capital runs hedged OTC-discount arbitrage (buying locked altcoin positions at a discount, shorting the exposure) plus funding-rate strategies. sNUSD stakes it with an appreciating share price; rewards vest linearly over 7 days and unstaking requires a 10-day cooldown claimed through the NUSD Silo.",
|
|
41390
|
+
decimals: 18,
|
|
41391
|
+
isRebasing: false,
|
|
41392
|
+
isMintable: true,
|
|
41393
|
+
withdrawalMode: "fixed-cooldown",
|
|
41394
|
+
withdrawalCooldownSeconds: 10 * 86400,
|
|
41395
|
+
yieldFetcher: snusdFetcher,
|
|
41396
|
+
yieldKey: SNUSD_KEY
|
|
41397
|
+
},
|
|
41089
41398
|
{
|
|
41090
41399
|
// Avant savETH — staked avETH (Ethereum, where avETH is native);
|
|
41091
41400
|
// StakedUSDeV2-style 24h cooldown.
|
|
@@ -41094,6 +41403,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41094
41403
|
// avETH
|
|
41095
41404
|
symbol: "savETH",
|
|
41096
41405
|
brand: "Avant",
|
|
41406
|
+
description: "avETH is Avant's ETH-denominated synthetic asset; savETH stakes it and accrues yield from Avant's market-neutral trading strategies via an appreciating share price, with a 24-hour unstake cooldown.",
|
|
41097
41407
|
decimals: 18,
|
|
41098
41408
|
isRebasing: false,
|
|
41099
41409
|
isMintable: true,
|
|
@@ -41107,6 +41417,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41107
41417
|
underlying: "0xdc035d45d973e3ec169d2276ddab16f1e407384f",
|
|
41108
41418
|
symbol: "sUSDS",
|
|
41109
41419
|
brand: "Sky",
|
|
41420
|
+
description: "USDS is Sky's (ex-MakerDAO) upgraded DAI; sUSDS accrues the Sky Savings Rate, funded by the protocol's collateralised lending and RWA revenue. Instant permissionless entry and exit.",
|
|
41110
41421
|
decimals: 18,
|
|
41111
41422
|
isRebasing: false,
|
|
41112
41423
|
isMintable: true,
|
|
@@ -41119,6 +41430,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41119
41430
|
underlying: "0xdc035d45d973e3ec169d2276ddab16f1e407384f",
|
|
41120
41431
|
symbol: "stUSDS",
|
|
41121
41432
|
brand: "Sky",
|
|
41433
|
+
description: "Sky's higher-yield staking module over USDS, with a utilisation-driven rate instead of the flat Sky Savings Rate. Withdrawals are instant but liquidity-dependent \u2014 the pool targets ~90% utilisation, so maxWithdraw can temporarily return less than your balance.",
|
|
41122
41434
|
decimals: 18,
|
|
41123
41435
|
isRebasing: false,
|
|
41124
41436
|
isMintable: true,
|
|
@@ -41136,6 +41448,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41136
41448
|
// frxUSD
|
|
41137
41449
|
symbol: "sfrxUSD",
|
|
41138
41450
|
brand: "Frax",
|
|
41451
|
+
description: "frxUSD is Frax's fiat-redeemable USD stablecoin; sfrxUSD accrues protocol revenue streamed to the vault, with the rate set by a distribution cap rather than utilisation (in practice the cap is the rate). Instant exit.",
|
|
41139
41452
|
decimals: 18,
|
|
41140
41453
|
isRebasing: false,
|
|
41141
41454
|
isMintable: true,
|
|
@@ -41153,6 +41466,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41153
41466
|
// FRAX
|
|
41154
41467
|
symbol: "sFRAX",
|
|
41155
41468
|
brand: "Frax",
|
|
41469
|
+
description: "The pre-rename sibling of sfrxUSD over legacy FRAX \u2014 same vault family, same cap-set rate mechanism. Instant exit.",
|
|
41156
41470
|
decimals: 18,
|
|
41157
41471
|
isRebasing: false,
|
|
41158
41472
|
isMintable: true,
|
|
@@ -41174,6 +41488,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41174
41488
|
// DOLA
|
|
41175
41489
|
symbol: "sDOLA",
|
|
41176
41490
|
brand: "Inverse",
|
|
41491
|
+
description: "DOLA is Inverse Finance's stablecoin; sDOLA compounds FiRM's DBR interest revenue, converted to DOLA by a continuous on-chain auction \u2014 deposits never leave the contract (no rehypothecation). Instant permissionless exit.",
|
|
41177
41492
|
decimals: 18,
|
|
41178
41493
|
isRebasing: false,
|
|
41179
41494
|
isMintable: true,
|
|
@@ -41186,6 +41501,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41186
41501
|
underlying: "0x6b175474e89094c44da98b954eedeac495271d0f",
|
|
41187
41502
|
symbol: "sDAI",
|
|
41188
41503
|
brand: "Maker",
|
|
41504
|
+
description: "DAI deposited into MakerDAO's Dai Savings Rate; the share price accrues the DSR. Instant entry and exit through the Pot.",
|
|
41189
41505
|
decimals: 18,
|
|
41190
41506
|
isRebasing: false,
|
|
41191
41507
|
isMintable: true,
|
|
@@ -41197,6 +41513,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41197
41513
|
underlying: "0x09d4214c03d01f49544c0448dbe3a27f768f2b34",
|
|
41198
41514
|
symbol: "wsrUSD",
|
|
41199
41515
|
brand: "Reservoir",
|
|
41516
|
+
description: "rUSD is Reservoir's asset-backed stablecoin; srUSD accrues the Reservoir savings rate funded by the protocol's RWA and credit portfolios, and wsrUSD is its non-rebasing wrapper. Instant exit, subject to PSM liquidity.",
|
|
41200
41517
|
decimals: 18,
|
|
41201
41518
|
isRebasing: false,
|
|
41202
41519
|
isMintable: true,
|
|
@@ -41209,6 +41526,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41209
41526
|
underlying: "0x6c8984bc7dbbedaf4f6b2fd766f16ebb7d10aab4",
|
|
41210
41527
|
symbol: "wstUSR",
|
|
41211
41528
|
brand: "Resolv",
|
|
41529
|
+
description: "USR is Resolv's delta-neutral synthetic dollar (ETH collateral hedged with perpetual shorts; the RLP insurance layer absorbs losses first). stUSR stakes it and rebases; wstUSR is the non-rebasing wrapper. Instant unwrap with no cooldown.",
|
|
41212
41530
|
decimals: 18,
|
|
41213
41531
|
// Wraps the rebasing stUSR — wstUSR itself does NOT rebase.
|
|
41214
41532
|
isRebasing: false,
|
|
@@ -41222,6 +41540,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41222
41540
|
underlying: "0xfa2b947eec368f42195f24f36d2af29f7c24cec2",
|
|
41223
41541
|
symbol: "sUSDf",
|
|
41224
41542
|
brand: "Falcon",
|
|
41543
|
+
description: "USDf is Falcon Finance's overcollateralised synthetic dollar; sUSDf stakes it and accrues yield from Falcon's diversified institutional trading strategies. The share exits instantly to USDf \u2014 the 7-day cooling period applies only to the downstream USDf \u2192 collateral redemption.",
|
|
41225
41544
|
decimals: 18,
|
|
41226
41545
|
isRebasing: false,
|
|
41227
41546
|
isMintable: true,
|
|
@@ -41237,6 +41556,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41237
41556
|
underlying: "0x48f9e38f3070ad8945dfeae3fa70987722e3d89c",
|
|
41238
41557
|
symbol: "siUSD",
|
|
41239
41558
|
brand: "InfiniFi",
|
|
41559
|
+
description: "iUSD is infiniFi's USD receipt token over USDC; siUSD accrues a blended rate from the protocol's laddered allocation across liquid and locked yield instruments. Instant exit while reserves cover it \u2014 the locked tier (liUSD) is a separate token.",
|
|
41240
41560
|
decimals: 18,
|
|
41241
41561
|
isRebasing: false,
|
|
41242
41562
|
isMintable: true,
|
|
@@ -41249,6 +41569,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41249
41569
|
underlying: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
41250
41570
|
symbol: "syrupUSDC",
|
|
41251
41571
|
brand: "Maple",
|
|
41572
|
+
description: "Deposits fund Maple's institutional credit book \u2014 collateralised loans to vetted trading firms \u2014 and yield is loan interest. The share price is managed by Maple with no on-chain solvency invariant; exits go through a cycle-based withdrawal queue (~7 days typical), though most process much faster via the instant buffer.",
|
|
41252
41573
|
decimals: 6,
|
|
41253
41574
|
isRebasing: false,
|
|
41254
41575
|
isMintable: true,
|
|
@@ -41262,6 +41583,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41262
41583
|
underlying: "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
41263
41584
|
symbol: "syrupUSDT",
|
|
41264
41585
|
brand: "Maple",
|
|
41586
|
+
description: "The USDT sibling of syrupUSDC \u2014 same Maple institutional credit book, same cycle-based withdrawal queue.",
|
|
41265
41587
|
decimals: 6,
|
|
41266
41588
|
isRebasing: false,
|
|
41267
41589
|
isMintable: true,
|
|
@@ -41276,6 +41598,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41276
41598
|
// USDG
|
|
41277
41599
|
symbol: "syrupUSDG",
|
|
41278
41600
|
brand: "Maple",
|
|
41601
|
+
description: "The USDG sibling of syrupUSDC \u2014 same Maple institutional credit book, same cycle-based withdrawal queue.",
|
|
41279
41602
|
decimals: 6,
|
|
41280
41603
|
isRebasing: false,
|
|
41281
41604
|
isMintable: true,
|
|
@@ -41298,6 +41621,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41298
41621
|
// wYLDS
|
|
41299
41622
|
symbol: "PRIME",
|
|
41300
41623
|
brand: "Hastra",
|
|
41624
|
+
description: "Hastra's Democratized PRIME: an ERC-4626 over wYLDS (itself a vault over USDC), with the rate published via Hastra's Proof-of-Reserve feed. Deposits are whitelist-gated; exit is a two-phase request-then-complete redemption.",
|
|
41301
41625
|
decimals: 6,
|
|
41302
41626
|
underlyingDecimals: 6,
|
|
41303
41627
|
isRebasing: false,
|
|
@@ -41306,6 +41630,64 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41306
41630
|
yieldFetcher: hastraPrimeFetcher,
|
|
41307
41631
|
yieldKey: "Hastra PRIME::PRIME"
|
|
41308
41632
|
},
|
|
41633
|
+
{
|
|
41634
|
+
// 3Jane USD3 — senior tranche of the credit-based money market
|
|
41635
|
+
// (docs.3jane.xyz): USDC funds unsecured fintech/crypto credit
|
|
41636
|
+
// lines through a MorphoCredit (Morpho Blue augmentation) market,
|
|
41637
|
+
// idle cash in Aave. Yearn-v3-strategy ERC-4626, 6-dec shares over
|
|
41638
|
+
// USDC, price accrues on-chain (`pricePerShare`). Exit is instant
|
|
41639
|
+
// but capped by real multi-source liquidity — idle USDC + what the
|
|
41640
|
+
// MorphoCredit market can redeem out of waEthUSDC — read via
|
|
41641
|
+
// `availableWithdrawLimit` (~4.7 % of the $75M TVL at 2026-08-04
|
|
41642
|
+
// integration), hence the `erc4626-withdraw-limit` reader. No
|
|
41643
|
+
// on-chain solvency invariant on the credit sleeves (Maple /
|
|
41644
|
+
// Spark-V2 trust class); unrealized losses zero the limit until
|
|
41645
|
+
// marked down. `isMintable: true` is structural — the whitelist is
|
|
41646
|
+
// disabled — but deposits are cap-gated (`USD3_SUPPLY_CAP`,
|
|
41647
|
+
// guarded-launch style) and the cap was FULL at integration time
|
|
41648
|
+
// (`availableDepositLimit = 0`), plus a 1,000-USDC minimum first
|
|
41649
|
+
// deposit; consult `maxDeposit` live before advertising the mint.
|
|
41650
|
+
reader: "erc4626-withdraw-limit",
|
|
41651
|
+
address: "0x056b269eb1f75477a8666ae8c7fe01b64dd55ecc",
|
|
41652
|
+
underlying: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
41653
|
+
// USDC
|
|
41654
|
+
symbol: "USD3",
|
|
41655
|
+
brand: "3Jane",
|
|
41656
|
+
description: "3Jane's senior tranche: USDC funds unsecured, credit-underwritten fintech and crypto credit lines through a MorphoCredit market, with idle cash parked in Aave. Yield is loan interest and the junior sUSD3 absorbs defaults first; exits are instant but capped by live liquidity, and deposits are supply-cap-gated.",
|
|
41657
|
+
decimals: 6,
|
|
41658
|
+
isRebasing: false,
|
|
41659
|
+
isMintable: true,
|
|
41660
|
+
withdrawalMode: "instant-capped",
|
|
41661
|
+
yieldFetcher: threeJaneFetcher,
|
|
41662
|
+
yieldKey: USD3_KEY
|
|
41663
|
+
},
|
|
41664
|
+
{
|
|
41665
|
+
// 3Jane sUSD3 — the junior, first-loss tranche: an ERC-4626 whose
|
|
41666
|
+
// underlying is USD3 itself (the reUSDe pattern — key the pair,
|
|
41667
|
+
// not the brand). Earns a fixed `TRANCHE_SHARE_VARIANT` slice of
|
|
41668
|
+
// pool interest over a much smaller base (~2x USD3's rate),
|
|
41669
|
+
// absorbs losses first, and its supply is capped by the
|
|
41670
|
+
// subordination ratio (deposits permissionless within it). Exit is
|
|
41671
|
+
// `startCooldown(shares)` → wait → `redeem` inside a withdrawal
|
|
41672
|
+
// window (+ a ProtocolConfig lock on new deposits, 0 at
|
|
41673
|
+
// integration time), so `request-based` with the cooldown pinned
|
|
41674
|
+
// from the live `cooldownDuration()` read (30 days, 2026-08-04;
|
|
41675
|
+
// governance-mutable via ProtocolConfig — the window read
|
|
41676
|
+
// ~100 years, i.e. effectively no expiry today).
|
|
41677
|
+
address: "0xf689555121e529ff0463e191f9bd9d1e496164a7",
|
|
41678
|
+
underlying: "0x056b269eb1f75477a8666ae8c7fe01b64dd55ecc",
|
|
41679
|
+
// USD3
|
|
41680
|
+
symbol: "sUSD3",
|
|
41681
|
+
brand: "3Jane",
|
|
41682
|
+
description: "3Jane's junior, first-loss tranche: an ERC-4626 over USD3 that earns a fixed share of pool interest on a smaller base (roughly 2x USD3's rate) and absorbs credit losses first. Exit requires a 30-day cooldown, then redeeming within the withdrawal window.",
|
|
41683
|
+
decimals: 6,
|
|
41684
|
+
isRebasing: false,
|
|
41685
|
+
isMintable: true,
|
|
41686
|
+
withdrawalMode: "request-based",
|
|
41687
|
+
withdrawalCooldownSeconds: 30 * 86400,
|
|
41688
|
+
yieldFetcher: threeJaneFetcher,
|
|
41689
|
+
yieldKey: SUSD3_KEY
|
|
41690
|
+
},
|
|
41309
41691
|
{
|
|
41310
41692
|
// Spark Vaults V2 — the mainnet book, and by far the largest of
|
|
41311
41693
|
// the family. Only the Ethereum rows carry the intents contract as
|
|
@@ -41361,6 +41743,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41361
41743
|
// ICL
|
|
41362
41744
|
symbol: "reUSDe",
|
|
41363
41745
|
brand: "Re Protocol",
|
|
41746
|
+
description: "Junior tranche of Re's reinsurance capital stack, denominated in USDe: it pays roughly double the senior reUSD rate because it absorbs underwriting losses first. Bare ERC-20 priced by a daily NAV oracle; exits are request-based, with a quarterly queue in the worst case.",
|
|
41364
41747
|
decimals: 18,
|
|
41365
41748
|
underlyingDecimals: 18,
|
|
41366
41749
|
isRebasing: false,
|
|
@@ -41398,6 +41781,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41398
41781
|
underlying: "0x4200000000000000000000000000000000000006",
|
|
41399
41782
|
symbol: "yoETH",
|
|
41400
41783
|
brand: "YO",
|
|
41784
|
+
description: "YO's ETH yield optimizer: WETH is allocated across curated on-chain strategies and yield accrues into the share price. Async ERC-7540 redemption \u2014 instant when idle liquidity covers it, up to ~24 hours when unwinding non-liquid strategies.",
|
|
41401
41785
|
decimals: 18,
|
|
41402
41786
|
isRebasing: false,
|
|
41403
41787
|
isMintable: true,
|
|
@@ -41412,6 +41796,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41412
41796
|
underlying: "0x24de8771bc5ddb3362db529fc3358f2df3a0e346",
|
|
41413
41797
|
symbol: "savUSD",
|
|
41414
41798
|
brand: "Avant",
|
|
41799
|
+
description: "avUSD is Avant's synthetic dollar; savUSD stakes it and accrues yield from Avant's market-neutral trading strategies via an appreciating share price, with a 24-hour unstake cooldown.",
|
|
41415
41800
|
decimals: 18,
|
|
41416
41801
|
isRebasing: false,
|
|
41417
41802
|
isMintable: true,
|
|
@@ -41427,6 +41812,7 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
41427
41812
|
// avBTC
|
|
41428
41813
|
symbol: "savBTC",
|
|
41429
41814
|
brand: "Avant",
|
|
41815
|
+
description: "avBTC is Avant's BTC-denominated synthetic asset; savBTC stakes it and accrues yield from Avant's market-neutral strategies via an appreciating share price, with a 24-hour unstake cooldown.",
|
|
41430
41816
|
decimals: 18,
|
|
41431
41817
|
isRebasing: false,
|
|
41432
41818
|
isMintable: true,
|
|
@@ -49405,7 +49791,7 @@ var Erc4626PreviewRedeemAbi = [
|
|
|
49405
49791
|
];
|
|
49406
49792
|
|
|
49407
49793
|
// src/vaults/lst/readers/shared.ts
|
|
49408
|
-
var
|
|
49794
|
+
var ONE_E188 = 10n ** 18n;
|
|
49409
49795
|
var rescaleDecimals = (v, fromDec, toDec) => toDec >= fromDec ? v * 10n ** BigInt(toDec - fromDec) : v / 10n ** BigInt(fromDec - toDec);
|
|
49410
49796
|
var MULTICALL3_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
49411
49797
|
var Multicall3BalanceAbi = [
|
|
@@ -49448,7 +49834,7 @@ var readerBeetsStS = (entry) => ({
|
|
|
49448
49834
|
}
|
|
49449
49835
|
const liquidity = toBigInt13(pool);
|
|
49450
49836
|
return {
|
|
49451
|
-
totalAssets: totalSupply * exchangeRate /
|
|
49837
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
49452
49838
|
totalSupply,
|
|
49453
49839
|
exchangeRate,
|
|
49454
49840
|
liquidity
|
|
@@ -49481,7 +49867,7 @@ var readerBenqiSavax = (entry) => ({
|
|
|
49481
49867
|
{
|
|
49482
49868
|
address: entry.address,
|
|
49483
49869
|
name: "getPooledAvaxByShares",
|
|
49484
|
-
params: [
|
|
49870
|
+
params: [ONE_E188]
|
|
49485
49871
|
},
|
|
49486
49872
|
{ address: entry.address, name: "totalPooledAvax", params: [] }
|
|
49487
49873
|
],
|
|
@@ -49492,7 +49878,7 @@ var readerBenqiSavax = (entry) => ({
|
|
|
49492
49878
|
if (totalSupply === void 0 || exchangeRate === void 0) {
|
|
49493
49879
|
return void 0;
|
|
49494
49880
|
}
|
|
49495
|
-
const totalAssets = toBigInt13(totalPooled) ?? totalSupply * exchangeRate /
|
|
49881
|
+
const totalAssets = toBigInt13(totalPooled) ?? totalSupply * exchangeRate / ONE_E188;
|
|
49496
49882
|
return {
|
|
49497
49883
|
totalAssets,
|
|
49498
49884
|
totalSupply,
|
|
@@ -49511,7 +49897,7 @@ var readerBgtWrapper1to1 = (entry) => ({
|
|
|
49511
49897
|
return {
|
|
49512
49898
|
totalAssets: totalSupply,
|
|
49513
49899
|
totalSupply,
|
|
49514
|
-
exchangeRate:
|
|
49900
|
+
exchangeRate: ONE_E188
|
|
49515
49901
|
};
|
|
49516
49902
|
}
|
|
49517
49903
|
});
|
|
@@ -49541,7 +49927,7 @@ var readerDineroBeraEth = (entry) => ({
|
|
|
49541
49927
|
return void 0;
|
|
49542
49928
|
}
|
|
49543
49929
|
return {
|
|
49544
|
-
totalAssets: totalSupply * exchangeRate /
|
|
49930
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
49545
49931
|
totalSupply,
|
|
49546
49932
|
exchangeRate
|
|
49547
49933
|
};
|
|
@@ -49553,7 +49939,7 @@ var readerErc4626 = (entry) => ({
|
|
|
49553
49939
|
calls: [
|
|
49554
49940
|
{ address: entry.address, name: "totalAssets", params: [] },
|
|
49555
49941
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
49556
|
-
{ address: entry.address, name: "convertToAssets", params: [
|
|
49942
|
+
{ address: entry.address, name: "convertToAssets", params: [ONE_E188] }
|
|
49557
49943
|
],
|
|
49558
49944
|
abis: [Erc4626ReadAbi, TotalSupplyAbi, Erc4626ReadAbi],
|
|
49559
49945
|
parse: ([assets, supply, rate]) => {
|
|
@@ -49570,7 +49956,7 @@ var readerErc4626PreviewRedeem = (entry) => ({
|
|
|
49570
49956
|
calls: [
|
|
49571
49957
|
{ address: entry.address, name: "totalAssets", params: [] },
|
|
49572
49958
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
49573
|
-
{ address: entry.address, name: "previewRedeem", params: [
|
|
49959
|
+
{ address: entry.address, name: "previewRedeem", params: [ONE_E188] }
|
|
49574
49960
|
],
|
|
49575
49961
|
abis: [Erc4626PreviewRedeemAbi, TotalSupplyAbi, Erc4626PreviewRedeemAbi],
|
|
49576
49962
|
parse: ([assets, supply, rate]) => {
|
|
@@ -49650,7 +50036,7 @@ var readerEtherFiWeEth = (entry) => {
|
|
|
49650
50036
|
}
|
|
49651
50037
|
}
|
|
49652
50038
|
return {
|
|
49653
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50039
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
49654
50040
|
totalSupply,
|
|
49655
50041
|
exchangeRate,
|
|
49656
50042
|
liquidity
|
|
@@ -49683,7 +50069,7 @@ var readerHyperbeatBeHype = (entry) => {
|
|
|
49683
50069
|
return {
|
|
49684
50070
|
totalAssets: totalSupply,
|
|
49685
50071
|
totalSupply,
|
|
49686
|
-
exchangeRate:
|
|
50072
|
+
exchangeRate: ONE_E188
|
|
49687
50073
|
};
|
|
49688
50074
|
}
|
|
49689
50075
|
};
|
|
@@ -49691,7 +50077,7 @@ var readerHyperbeatBeHype = (entry) => {
|
|
|
49691
50077
|
return {
|
|
49692
50078
|
calls: [
|
|
49693
50079
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
49694
|
-
{ address: stakingCore, name: "BeHYPEToHYPE", params: [
|
|
50080
|
+
{ address: stakingCore, name: "BeHYPEToHYPE", params: [ONE_E188] }
|
|
49695
50081
|
],
|
|
49696
50082
|
abis: [TotalSupplyAbi, HyperbeatStakingCoreAbi],
|
|
49697
50083
|
parse: ([supply, rate]) => {
|
|
@@ -49701,7 +50087,7 @@ var readerHyperbeatBeHype = (entry) => {
|
|
|
49701
50087
|
return void 0;
|
|
49702
50088
|
}
|
|
49703
50089
|
return {
|
|
49704
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50090
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
49705
50091
|
totalSupply,
|
|
49706
50092
|
exchangeRate
|
|
49707
50093
|
};
|
|
@@ -49733,7 +50119,7 @@ var readerKelpRsEth = (entry) => {
|
|
|
49733
50119
|
return {
|
|
49734
50120
|
totalAssets: totalSupply,
|
|
49735
50121
|
totalSupply,
|
|
49736
|
-
exchangeRate:
|
|
50122
|
+
exchangeRate: ONE_E188
|
|
49737
50123
|
};
|
|
49738
50124
|
}
|
|
49739
50125
|
};
|
|
@@ -49751,7 +50137,7 @@ var readerKelpRsEth = (entry) => {
|
|
|
49751
50137
|
return void 0;
|
|
49752
50138
|
}
|
|
49753
50139
|
return {
|
|
49754
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50140
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
49755
50141
|
totalSupply,
|
|
49756
50142
|
exchangeRate
|
|
49757
50143
|
};
|
|
@@ -49783,7 +50169,7 @@ var readerKinetiqKHype = (entry) => {
|
|
|
49783
50169
|
return {
|
|
49784
50170
|
totalAssets: totalSupply,
|
|
49785
50171
|
totalSupply,
|
|
49786
|
-
exchangeRate:
|
|
50172
|
+
exchangeRate: ONE_E188
|
|
49787
50173
|
};
|
|
49788
50174
|
}
|
|
49789
50175
|
};
|
|
@@ -49791,7 +50177,7 @@ var readerKinetiqKHype = (entry) => {
|
|
|
49791
50177
|
return {
|
|
49792
50178
|
calls: [
|
|
49793
50179
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
49794
|
-
{ address: accountant, name: "kHYPEToHYPE", params: [
|
|
50180
|
+
{ address: accountant, name: "kHYPEToHYPE", params: [ONE_E188] }
|
|
49795
50181
|
],
|
|
49796
50182
|
abis: [TotalSupplyAbi, KinetiqStakingAccountantAbi],
|
|
49797
50183
|
parse: ([supply, rate]) => {
|
|
@@ -49801,7 +50187,7 @@ var readerKinetiqKHype = (entry) => {
|
|
|
49801
50187
|
return void 0;
|
|
49802
50188
|
}
|
|
49803
50189
|
return {
|
|
49804
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50190
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
49805
50191
|
totalSupply,
|
|
49806
50192
|
exchangeRate
|
|
49807
50193
|
};
|
|
@@ -49841,7 +50227,7 @@ var readerLairStKaia = (entry) => ({
|
|
|
49841
50227
|
if (totalSupply === void 0 || exchangeRate === void 0) {
|
|
49842
50228
|
return void 0;
|
|
49843
50229
|
}
|
|
49844
|
-
const totalAssets = toBigInt13(totalStaking) ?? totalSupply * exchangeRate /
|
|
50230
|
+
const totalAssets = toBigInt13(totalStaking) ?? totalSupply * exchangeRate / ONE_E188;
|
|
49845
50231
|
return {
|
|
49846
50232
|
totalAssets,
|
|
49847
50233
|
totalSupply,
|
|
@@ -49875,7 +50261,7 @@ var readerLidoWstEth = (entry) => ({
|
|
|
49875
50261
|
return void 0;
|
|
49876
50262
|
}
|
|
49877
50263
|
return {
|
|
49878
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50264
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
49879
50265
|
totalSupply,
|
|
49880
50266
|
exchangeRate
|
|
49881
50267
|
};
|
|
@@ -49913,7 +50299,7 @@ var readerListaSlisBnb = (entry) => {
|
|
|
49913
50299
|
return {
|
|
49914
50300
|
totalAssets: totalSupply,
|
|
49915
50301
|
totalSupply,
|
|
49916
|
-
exchangeRate:
|
|
50302
|
+
exchangeRate: ONE_E188
|
|
49917
50303
|
};
|
|
49918
50304
|
}
|
|
49919
50305
|
};
|
|
@@ -49921,7 +50307,7 @@ var readerListaSlisBnb = (entry) => {
|
|
|
49921
50307
|
return {
|
|
49922
50308
|
calls: [
|
|
49923
50309
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
49924
|
-
{ address: manager, name: "convertSnBnbToBnb", params: [
|
|
50310
|
+
{ address: manager, name: "convertSnBnbToBnb", params: [ONE_E188] },
|
|
49925
50311
|
{ address: manager, name: "getTotalPooledBnb", params: [] }
|
|
49926
50312
|
],
|
|
49927
50313
|
abis: [TotalSupplyAbi, ListaStakeManagerReadAbi, ListaStakeManagerReadAbi],
|
|
@@ -49932,7 +50318,7 @@ var readerListaSlisBnb = (entry) => {
|
|
|
49932
50318
|
return void 0;
|
|
49933
50319
|
}
|
|
49934
50320
|
const pooledBnb = toBigInt13(pooled);
|
|
49935
|
-
const totalAssets = pooledBnb ?? totalSupply * exchangeRate /
|
|
50321
|
+
const totalAssets = pooledBnb ?? totalSupply * exchangeRate / ONE_E188;
|
|
49936
50322
|
return { totalAssets, totalSupply, exchangeRate };
|
|
49937
50323
|
}
|
|
49938
50324
|
};
|
|
@@ -49962,7 +50348,7 @@ var readerMantleMEth = (entry) => {
|
|
|
49962
50348
|
return {
|
|
49963
50349
|
totalAssets: totalSupply,
|
|
49964
50350
|
totalSupply,
|
|
49965
|
-
exchangeRate:
|
|
50351
|
+
exchangeRate: ONE_E188
|
|
49966
50352
|
};
|
|
49967
50353
|
}
|
|
49968
50354
|
};
|
|
@@ -49970,7 +50356,7 @@ var readerMantleMEth = (entry) => {
|
|
|
49970
50356
|
return {
|
|
49971
50357
|
calls: [
|
|
49972
50358
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
49973
|
-
{ address: staking, name: "mETHToETH", params: [
|
|
50359
|
+
{ address: staking, name: "mETHToETH", params: [ONE_E188] }
|
|
49974
50360
|
],
|
|
49975
50361
|
abis: [TotalSupplyAbi, MantleStakingAbi],
|
|
49976
50362
|
parse: ([supply, rate]) => {
|
|
@@ -49980,7 +50366,7 @@ var readerMantleMEth = (entry) => {
|
|
|
49980
50366
|
return void 0;
|
|
49981
50367
|
}
|
|
49982
50368
|
return {
|
|
49983
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50369
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
49984
50370
|
totalSupply,
|
|
49985
50371
|
exchangeRate
|
|
49986
50372
|
};
|
|
@@ -50001,7 +50387,7 @@ var readerOffChain = (entry) => {
|
|
|
50001
50387
|
return {
|
|
50002
50388
|
totalAssets: rescaleDecimals(totalSupply, shareDec, underlyingDec),
|
|
50003
50389
|
totalSupply,
|
|
50004
|
-
exchangeRate:
|
|
50390
|
+
exchangeRate: ONE_E188
|
|
50005
50391
|
};
|
|
50006
50392
|
}
|
|
50007
50393
|
};
|
|
@@ -50035,7 +50421,7 @@ var readerRenzoEzEth = (entry) => {
|
|
|
50035
50421
|
return {
|
|
50036
50422
|
totalAssets: totalSupply,
|
|
50037
50423
|
totalSupply,
|
|
50038
|
-
exchangeRate:
|
|
50424
|
+
exchangeRate: ONE_E188
|
|
50039
50425
|
};
|
|
50040
50426
|
}
|
|
50041
50427
|
};
|
|
@@ -50054,7 +50440,7 @@ var readerRenzoEzEth = (entry) => {
|
|
|
50054
50440
|
return {
|
|
50055
50441
|
totalAssets: totalTvl,
|
|
50056
50442
|
totalSupply,
|
|
50057
|
-
exchangeRate: totalTvl *
|
|
50443
|
+
exchangeRate: totalTvl * ONE_E188 / totalSupply
|
|
50058
50444
|
};
|
|
50059
50445
|
}
|
|
50060
50446
|
};
|
|
@@ -50110,7 +50496,7 @@ var readerRocketReth = (entry) => {
|
|
|
50110
50496
|
}
|
|
50111
50497
|
const liquidity = depositPool ? toBigInt13(slice2[2]) : void 0;
|
|
50112
50498
|
return {
|
|
50113
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50499
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
50114
50500
|
totalSupply,
|
|
50115
50501
|
exchangeRate,
|
|
50116
50502
|
liquidity
|
|
@@ -50152,7 +50538,7 @@ var readerStaderEthx = (entry) => {
|
|
|
50152
50538
|
return {
|
|
50153
50539
|
totalAssets: totalSupply,
|
|
50154
50540
|
totalSupply,
|
|
50155
|
-
exchangeRate:
|
|
50541
|
+
exchangeRate: ONE_E188
|
|
50156
50542
|
};
|
|
50157
50543
|
}
|
|
50158
50544
|
};
|
|
@@ -50170,7 +50556,7 @@ var readerStaderEthx = (entry) => {
|
|
|
50170
50556
|
return void 0;
|
|
50171
50557
|
}
|
|
50172
50558
|
return {
|
|
50173
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50559
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
50174
50560
|
totalSupply,
|
|
50175
50561
|
exchangeRate
|
|
50176
50562
|
};
|
|
@@ -50187,7 +50573,7 @@ var readerStaderMaticX = (entry) => {
|
|
|
50187
50573
|
{
|
|
50188
50574
|
address: rateAddress,
|
|
50189
50575
|
name: "convertMaticXToMatic",
|
|
50190
|
-
params: [
|
|
50576
|
+
params: [ONE_E188],
|
|
50191
50577
|
chainId: homeChainId
|
|
50192
50578
|
}
|
|
50193
50579
|
],
|
|
@@ -50202,7 +50588,7 @@ var readerStaderMaticX = (entry) => {
|
|
|
50202
50588
|
}
|
|
50203
50589
|
const isCrossChain = homeContract !== void 0;
|
|
50204
50590
|
return {
|
|
50205
|
-
totalAssets: isCrossChain ? totalSupply * amountInMatic /
|
|
50591
|
+
totalAssets: isCrossChain ? totalSupply * amountInMatic / ONE_E188 : totalPooledMatic ?? totalSupply * amountInMatic / ONE_E188,
|
|
50206
50592
|
totalSupply,
|
|
50207
50593
|
exchangeRate: amountInMatic
|
|
50208
50594
|
};
|
|
@@ -50234,7 +50620,7 @@ var readerStakeWiseOsEth = (entry) => {
|
|
|
50234
50620
|
return {
|
|
50235
50621
|
totalAssets: totalSupply,
|
|
50236
50622
|
totalSupply,
|
|
50237
|
-
exchangeRate:
|
|
50623
|
+
exchangeRate: ONE_E188
|
|
50238
50624
|
};
|
|
50239
50625
|
}
|
|
50240
50626
|
};
|
|
@@ -50242,7 +50628,7 @@ var readerStakeWiseOsEth = (entry) => {
|
|
|
50242
50628
|
return {
|
|
50243
50629
|
calls: [
|
|
50244
50630
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
50245
|
-
{ address: controller, name: "convertToAssets", params: [
|
|
50631
|
+
{ address: controller, name: "convertToAssets", params: [ONE_E188] }
|
|
50246
50632
|
],
|
|
50247
50633
|
abis: [TotalSupplyAbi, StakeWiseOsTokenAbi],
|
|
50248
50634
|
parse: ([supply, rate]) => {
|
|
@@ -50252,7 +50638,7 @@ var readerStakeWiseOsEth = (entry) => {
|
|
|
50252
50638
|
return void 0;
|
|
50253
50639
|
}
|
|
50254
50640
|
return {
|
|
50255
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50641
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
50256
50642
|
totalSupply,
|
|
50257
50643
|
exchangeRate
|
|
50258
50644
|
};
|
|
@@ -50284,7 +50670,7 @@ var readerStCelo = (entry) => {
|
|
|
50284
50670
|
return {
|
|
50285
50671
|
totalAssets: totalSupply,
|
|
50286
50672
|
totalSupply,
|
|
50287
|
-
exchangeRate:
|
|
50673
|
+
exchangeRate: ONE_E188
|
|
50288
50674
|
};
|
|
50289
50675
|
}
|
|
50290
50676
|
};
|
|
@@ -50292,7 +50678,7 @@ var readerStCelo = (entry) => {
|
|
|
50292
50678
|
return {
|
|
50293
50679
|
calls: [
|
|
50294
50680
|
{ address: entry.address, name: "totalSupply", params: [] },
|
|
50295
|
-
{ address: manager, name: "toCelo", params: [
|
|
50681
|
+
{ address: manager, name: "toCelo", params: [ONE_E188] }
|
|
50296
50682
|
],
|
|
50297
50683
|
abis: [TotalSupplyAbi, StCeloManagerAbi],
|
|
50298
50684
|
parse: ([supply, rate]) => {
|
|
@@ -50302,7 +50688,7 @@ var readerStCelo = (entry) => {
|
|
|
50302
50688
|
return void 0;
|
|
50303
50689
|
}
|
|
50304
50690
|
return {
|
|
50305
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50691
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
50306
50692
|
totalSupply,
|
|
50307
50693
|
exchangeRate
|
|
50308
50694
|
};
|
|
@@ -50335,7 +50721,7 @@ var readerSwellGetRate = (entry) => ({
|
|
|
50335
50721
|
return void 0;
|
|
50336
50722
|
}
|
|
50337
50723
|
return {
|
|
50338
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50724
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
50339
50725
|
totalSupply,
|
|
50340
50726
|
exchangeRate
|
|
50341
50727
|
};
|
|
@@ -50366,7 +50752,7 @@ var readerValantisWstHype = (entry) => {
|
|
|
50366
50752
|
return {
|
|
50367
50753
|
totalAssets: totalSupply,
|
|
50368
50754
|
totalSupply,
|
|
50369
|
-
exchangeRate:
|
|
50755
|
+
exchangeRate: ONE_E188
|
|
50370
50756
|
};
|
|
50371
50757
|
}
|
|
50372
50758
|
};
|
|
@@ -50384,7 +50770,7 @@ var readerValantisWstHype = (entry) => {
|
|
|
50384
50770
|
return void 0;
|
|
50385
50771
|
}
|
|
50386
50772
|
return {
|
|
50387
|
-
totalAssets: totalSupply * exchangeRate /
|
|
50773
|
+
totalAssets: totalSupply * exchangeRate / ONE_E188,
|
|
50388
50774
|
totalSupply,
|
|
50389
50775
|
exchangeRate
|
|
50390
50776
|
};
|
|
@@ -50418,7 +50804,7 @@ var readerVedaAccountant = (entry) => {
|
|
|
50418
50804
|
return {
|
|
50419
50805
|
totalAssets: rescaleDecimals(totalSupply, shareDec, underlyingDec),
|
|
50420
50806
|
totalSupply,
|
|
50421
|
-
exchangeRate:
|
|
50807
|
+
exchangeRate: ONE_E188
|
|
50422
50808
|
};
|
|
50423
50809
|
}
|
|
50424
50810
|
};
|
|
@@ -50437,7 +50823,7 @@ var readerVedaAccountant = (entry) => {
|
|
|
50437
50823
|
const exchangeRate = rawRate * scale;
|
|
50438
50824
|
return {
|
|
50439
50825
|
totalAssets: rescaleDecimals(
|
|
50440
|
-
totalSupply * exchangeRate /
|
|
50826
|
+
totalSupply * exchangeRate / ONE_E188,
|
|
50441
50827
|
shareDec,
|
|
50442
50828
|
underlyingDec
|
|
50443
50829
|
),
|
|
@@ -50473,9 +50859,9 @@ var readerAnkrRatio = (entry) => ({
|
|
|
50473
50859
|
return void 0;
|
|
50474
50860
|
}
|
|
50475
50861
|
return {
|
|
50476
|
-
totalAssets: totalSupply *
|
|
50862
|
+
totalAssets: totalSupply * ONE_E188 / r,
|
|
50477
50863
|
totalSupply,
|
|
50478
|
-
exchangeRate:
|
|
50864
|
+
exchangeRate: ONE_E188 * ONE_E188 / r
|
|
50479
50865
|
};
|
|
50480
50866
|
}
|
|
50481
50867
|
});
|
|
@@ -50519,7 +50905,7 @@ var readerCoreEarnRate = (entry) => {
|
|
|
50519
50905
|
return {
|
|
50520
50906
|
totalAssets: totalSupply * r / CORE_RATE_DENOM,
|
|
50521
50907
|
totalSupply,
|
|
50522
|
-
exchangeRate: r *
|
|
50908
|
+
exchangeRate: r * ONE_E188 / CORE_RATE_DENOM
|
|
50523
50909
|
};
|
|
50524
50910
|
}
|
|
50525
50911
|
};
|
|
@@ -50541,7 +50927,7 @@ var readerCoreStakedRatio = (entry) => {
|
|
|
50541
50927
|
return {
|
|
50542
50928
|
totalAssets: totalStaked,
|
|
50543
50929
|
totalSupply,
|
|
50544
|
-
exchangeRate: totalStaked *
|
|
50930
|
+
exchangeRate: totalStaked * ONE_E188 / totalSupply
|
|
50545
50931
|
};
|
|
50546
50932
|
}
|
|
50547
50933
|
};
|
|
@@ -50572,7 +50958,7 @@ var readerStellaStDot = (entry) => ({
|
|
|
50572
50958
|
{
|
|
50573
50959
|
address: entry.address,
|
|
50574
50960
|
name: "getPooledTokenByShares",
|
|
50575
|
-
params: [
|
|
50961
|
+
params: [ONE_E188]
|
|
50576
50962
|
},
|
|
50577
50963
|
{ address: entry.address, name: "getTotalPooledToken", params: [] }
|
|
50578
50964
|
],
|
|
@@ -50583,7 +50969,7 @@ var readerStellaStDot = (entry) => ({
|
|
|
50583
50969
|
if (totalSupply === void 0 || exchangeRate === void 0) {
|
|
50584
50970
|
return void 0;
|
|
50585
50971
|
}
|
|
50586
|
-
const totalAssets = toBigInt13(pooled) ?? totalSupply * exchangeRate /
|
|
50972
|
+
const totalAssets = toBigInt13(pooled) ?? totalSupply * exchangeRate / ONE_E188;
|
|
50587
50973
|
return {
|
|
50588
50974
|
totalAssets,
|
|
50589
50975
|
totalSupply,
|
|
@@ -50621,7 +51007,7 @@ var readerKintsuSMon = (entry) => ({
|
|
|
50621
51007
|
const totalAssets = toBigInt13(pooled);
|
|
50622
51008
|
const totalSupply = toBigInt13(shares);
|
|
50623
51009
|
if (totalAssets === void 0 || totalSupply === void 0) return void 0;
|
|
50624
|
-
const exchangeRate = totalSupply > 0n ? totalAssets *
|
|
51010
|
+
const exchangeRate = totalSupply > 0n ? totalAssets * ONE_E188 / totalSupply : ONE_E188;
|
|
50625
51011
|
return { totalAssets, totalSupply, exchangeRate };
|
|
50626
51012
|
}
|
|
50627
51013
|
});
|
|
@@ -51057,7 +51443,7 @@ var getLstValidators = async (chainId, shareToken) => {
|
|
|
51057
51443
|
};
|
|
51058
51444
|
|
|
51059
51445
|
// src/vaults/lst/fetchPublic.ts
|
|
51060
|
-
var
|
|
51446
|
+
var ONE_E189 = 10n ** 18n;
|
|
51061
51447
|
var ERC20_BALANCE_ABI = parseAbi([
|
|
51062
51448
|
"function balanceOf(address) view returns (uint256)"
|
|
51063
51449
|
]);
|
|
@@ -51172,8 +51558,8 @@ var fetchLstShareTokens = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
51172
51558
|
const underlyingUnit = 10n ** BigInt(underlyingDec);
|
|
51173
51559
|
const totalAssetsFormatted = Number(state.totalAssets) / 10 ** underlyingDec;
|
|
51174
51560
|
const totalAssetsUsd = priceUsd !== void 0 ? totalAssetsFormatted * priceUsd : 0;
|
|
51175
|
-
const convertToAssets = state.exchangeRate * underlyingUnit /
|
|
51176
|
-
const convertToShares = state.exchangeRate > 0n ?
|
|
51561
|
+
const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E189;
|
|
51562
|
+
const convertToShares = state.exchangeRate > 0n ? ONE_E189 * shareUnit / state.exchangeRate : 0n;
|
|
51177
51563
|
let liquidityRaw;
|
|
51178
51564
|
if (state.liquidity !== void 0) {
|
|
51179
51565
|
liquidityRaw = state.liquidity;
|
|
@@ -54230,7 +54616,7 @@ var NavOracleReadAbi = [
|
|
|
54230
54616
|
];
|
|
54231
54617
|
|
|
54232
54618
|
// src/vaults/savings/readers/shared.ts
|
|
54233
|
-
var
|
|
54619
|
+
var ONE_E1810 = 10n ** 18n;
|
|
54234
54620
|
var toBigInt15 = (v) => {
|
|
54235
54621
|
if (v === void 0 || v === null) return void 0;
|
|
54236
54622
|
if (typeof v === "bigint") return v;
|
|
@@ -54271,7 +54657,7 @@ var readerErc46262 = (entry) => {
|
|
|
54271
54657
|
return {
|
|
54272
54658
|
totalAssets,
|
|
54273
54659
|
totalSupply,
|
|
54274
|
-
exchangeRate: convertToAssetsRaw *
|
|
54660
|
+
exchangeRate: convertToAssetsRaw * ONE_E1810 / underlyingUnit
|
|
54275
54661
|
};
|
|
54276
54662
|
}
|
|
54277
54663
|
};
|
|
@@ -54340,6 +54726,17 @@ var NativeWithdrawQueueReadAbi = [
|
|
|
54340
54726
|
}
|
|
54341
54727
|
];
|
|
54342
54728
|
|
|
54729
|
+
// src/vaults/savings/abis/yearnStrategy.ts
|
|
54730
|
+
var AvailableWithdrawLimitAbi = [
|
|
54731
|
+
{
|
|
54732
|
+
name: "availableWithdrawLimit",
|
|
54733
|
+
type: "function",
|
|
54734
|
+
stateMutability: "view",
|
|
54735
|
+
inputs: [{ type: "address", name: "owner" }],
|
|
54736
|
+
outputs: [{ type: "uint256" }]
|
|
54737
|
+
}
|
|
54738
|
+
];
|
|
54739
|
+
|
|
54343
54740
|
// src/vaults/savings/readers/erc4626Idle.ts
|
|
54344
54741
|
var readerErc4626Idle = (entry) => {
|
|
54345
54742
|
const shareUnit = 10n ** BigInt(entry.decimals);
|
|
@@ -54368,7 +54765,7 @@ var readerErc4626Idle = (entry) => {
|
|
|
54368
54765
|
return {
|
|
54369
54766
|
totalAssets,
|
|
54370
54767
|
totalSupply,
|
|
54371
|
-
exchangeRate: convertToAssetsRaw *
|
|
54768
|
+
exchangeRate: convertToAssetsRaw * ONE_E1810 / underlyingUnit,
|
|
54372
54769
|
...capacity !== void 0 ? {
|
|
54373
54770
|
instantRedeemCapacity: capacity,
|
|
54374
54771
|
instantRedeemEnabled: true,
|
|
@@ -54380,6 +54777,54 @@ var readerErc4626Idle = (entry) => {
|
|
|
54380
54777
|
};
|
|
54381
54778
|
};
|
|
54382
54779
|
|
|
54780
|
+
// src/vaults/savings/readers/withdrawLimit.ts
|
|
54781
|
+
var NEUTRAL_PROBE = "0x000000000000000000000000000000000000dead";
|
|
54782
|
+
var readerErc4626WithdrawLimit = (entry) => {
|
|
54783
|
+
const shareUnit = 10n ** BigInt(entry.decimals);
|
|
54784
|
+
const underlyingUnit = 10n ** BigInt(entry.underlyingDecimals ?? entry.decimals);
|
|
54785
|
+
return {
|
|
54786
|
+
calls: [
|
|
54787
|
+
{ address: entry.address, name: "totalAssets", params: [] },
|
|
54788
|
+
{ address: entry.address, name: "totalSupply", params: [] },
|
|
54789
|
+
{
|
|
54790
|
+
address: entry.address,
|
|
54791
|
+
name: "convertToAssets",
|
|
54792
|
+
params: [shareUnit]
|
|
54793
|
+
},
|
|
54794
|
+
{
|
|
54795
|
+
address: entry.address,
|
|
54796
|
+
name: "availableWithdrawLimit",
|
|
54797
|
+
params: [NEUTRAL_PROBE]
|
|
54798
|
+
}
|
|
54799
|
+
],
|
|
54800
|
+
abis: [
|
|
54801
|
+
Erc4626ReadAbi2,
|
|
54802
|
+
TotalSupplyAbi2,
|
|
54803
|
+
Erc4626ReadAbi2,
|
|
54804
|
+
AvailableWithdrawLimitAbi
|
|
54805
|
+
],
|
|
54806
|
+
parse: ([assets, supply, rate, withdrawLimit]) => {
|
|
54807
|
+
const totalAssets = toBigInt15(assets);
|
|
54808
|
+
const totalSupply = toBigInt15(supply);
|
|
54809
|
+
const convertToAssetsRaw = toBigInt15(rate);
|
|
54810
|
+
if (totalAssets === void 0 || totalSupply === void 0 || convertToAssetsRaw === void 0) {
|
|
54811
|
+
return void 0;
|
|
54812
|
+
}
|
|
54813
|
+
const capacity = toBigInt15(withdrawLimit);
|
|
54814
|
+
return {
|
|
54815
|
+
totalAssets,
|
|
54816
|
+
totalSupply,
|
|
54817
|
+
exchangeRate: convertToAssetsRaw * ONE_E1810 / underlyingUnit,
|
|
54818
|
+
...capacity !== void 0 ? {
|
|
54819
|
+
instantRedeemCapacity: capacity,
|
|
54820
|
+
instantRedeemEnabled: true,
|
|
54821
|
+
withdrawFeeBps: 0
|
|
54822
|
+
} : {}
|
|
54823
|
+
};
|
|
54824
|
+
}
|
|
54825
|
+
};
|
|
54826
|
+
};
|
|
54827
|
+
|
|
54383
54828
|
// src/vaults/savings/readers/navOracle.ts
|
|
54384
54829
|
var readerNavOracle = (entry) => {
|
|
54385
54830
|
const shareUnit = 10n ** BigInt(entry.decimals);
|
|
@@ -54401,7 +54846,7 @@ var readerNavOracle = (entry) => {
|
|
|
54401
54846
|
const exchangeRate = toBigInt15(raw);
|
|
54402
54847
|
if (exchangeRate === void 0 || exchangeRate <= 0n) return void 0;
|
|
54403
54848
|
return {
|
|
54404
|
-
totalAssets: totalSupply * exchangeRate * underlyingUnit / (
|
|
54849
|
+
totalAssets: totalSupply * exchangeRate * underlyingUnit / (ONE_E1810 * shareUnit),
|
|
54405
54850
|
totalSupply,
|
|
54406
54851
|
exchangeRate
|
|
54407
54852
|
};
|
|
@@ -54415,7 +54860,7 @@ var readerNativeWnlp = (entry) => {
|
|
|
54415
54860
|
return {
|
|
54416
54861
|
calls: [
|
|
54417
54862
|
{ address, name: "totalSupply", params: [] },
|
|
54418
|
-
{ address, name: "getNlpByWnlp", params: [
|
|
54863
|
+
{ address, name: "getNlpByWnlp", params: [ONE_E1810] },
|
|
54419
54864
|
{ address, name: "instantRedeemFeeBips", params: [] },
|
|
54420
54865
|
{ address, name: "instantRedeemEnabled", params: [] },
|
|
54421
54866
|
// Falls back to the vault itself when no CreditVault is pinned —
|
|
@@ -54449,7 +54894,7 @@ var readerNativeWnlp = (entry) => {
|
|
|
54449
54894
|
const windowSeconds = toBigInt15(window);
|
|
54450
54895
|
const bips = toBigInt15(feeBips);
|
|
54451
54896
|
return {
|
|
54452
|
-
totalAssets: totalSupply * exchangeRate /
|
|
54897
|
+
totalAssets: totalSupply * exchangeRate / ONE_E1810,
|
|
54453
54898
|
totalSupply,
|
|
54454
54899
|
exchangeRate,
|
|
54455
54900
|
// `instantRedeemFeeBips` on-chain is already basis points, so it
|
|
@@ -54475,6 +54920,8 @@ var buildReader2 = (entry) => {
|
|
|
54475
54920
|
return readerNavOracle(entry);
|
|
54476
54921
|
case "erc4626-idle":
|
|
54477
54922
|
return readerErc4626Idle(entry);
|
|
54923
|
+
case "erc4626-withdraw-limit":
|
|
54924
|
+
return readerErc4626WithdrawLimit(entry);
|
|
54478
54925
|
case "erc4626":
|
|
54479
54926
|
case void 0:
|
|
54480
54927
|
return readerErc46262(entry);
|
|
@@ -54485,7 +54932,7 @@ var buildReader2 = (entry) => {
|
|
|
54485
54932
|
var resolveYieldApr2 = async (entries) => (await resolveEntryApr(entries)).apr;
|
|
54486
54933
|
|
|
54487
54934
|
// src/vaults/savings/fetchPublic.ts
|
|
54488
|
-
var
|
|
54935
|
+
var ONE_E1811 = 10n ** 18n;
|
|
54489
54936
|
var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList = {}) => {
|
|
54490
54937
|
const entries = getSavingsRegistry(chainId);
|
|
54491
54938
|
if (entries.length === 0) return {};
|
|
@@ -54534,8 +54981,8 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
54534
54981
|
1,
|
|
54535
54982
|
Number(liquidityAmount * 1000000n / state.totalAssets) / 1e6
|
|
54536
54983
|
) : 1;
|
|
54537
|
-
const convertToAssets = state.exchangeRate * underlyingUnit /
|
|
54538
|
-
const convertToShares = state.exchangeRate > 0n ?
|
|
54984
|
+
const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E1811;
|
|
54985
|
+
const convertToShares = state.exchangeRate > 0n ? ONE_E1811 * shareUnit / state.exchangeRate : 0n;
|
|
54539
54986
|
const displayName = composeVaultDisplayName(
|
|
54540
54987
|
entry.brand,
|
|
54541
54988
|
entry.brand,
|
|
@@ -54553,6 +55000,7 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
54553
55000
|
displayName,
|
|
54554
55001
|
brand: entry.brand,
|
|
54555
55002
|
curatorName: entry.brand,
|
|
55003
|
+
description: entry.description,
|
|
54556
55004
|
decimals: entry.decimals,
|
|
54557
55005
|
assetDecimals: underlyingDec,
|
|
54558
55006
|
totalAssets: state.totalAssets.toString(),
|
|
@@ -54565,11 +55013,12 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
54565
55013
|
depositRate,
|
|
54566
55014
|
// Opt-IN, not opt-out: a new bespoke reader exists precisely
|
|
54567
55015
|
// because its token is not a conforming vault, so the default for
|
|
54568
|
-
// an unlisted reader must be `false`. `erc4626-idle`
|
|
54569
|
-
//
|
|
54570
|
-
//
|
|
54571
|
-
//
|
|
54572
|
-
|
|
55016
|
+
// an unlisted reader must be `false`. `erc4626-idle` and
|
|
55017
|
+
// `erc4626-withdraw-limit` are the plain 4626 surface plus one
|
|
55018
|
+
// extra read (an inventory balance / the strategy's limit view),
|
|
55019
|
+
// so they count; Native's wNLP and Re's NAV-oracle tokens revert
|
|
55020
|
+
// on `asset()`/`totalAssets()`/`convertToAssets()` and do not.
|
|
55021
|
+
isErc4626: entry.reader === void 0 || entry.reader === "erc4626" || entry.reader === "erc4626-idle" || entry.reader === "erc4626-withdraw-limit",
|
|
54573
55022
|
isRebasing: entry.isRebasing,
|
|
54574
55023
|
isMintable: entry.isMintable,
|
|
54575
55024
|
mintContract: entry.mintContract?.toLowerCase() ?? addressLc,
|
|
@@ -56866,7 +57315,7 @@ var readVaultSharePrices = async (chainId, addresses, multicallRetry) => {
|
|
|
56866
57315
|
};
|
|
56867
57316
|
|
|
56868
57317
|
// src/vaults/yield/annualize.ts
|
|
56869
|
-
var
|
|
57318
|
+
var YEAR_SECONDS8 = 365 * 24 * 60 * 60;
|
|
56870
57319
|
var SCALE = 10n ** 18n;
|
|
56871
57320
|
var appendSnapshot = (points, snap, options) => {
|
|
56872
57321
|
const maxPoints = options?.maxPoints ?? 90;
|
|
@@ -56895,7 +57344,7 @@ var computeVaultApr = (points, options) => {
|
|
|
56895
57344
|
if (pThen === 0n) return void 0;
|
|
56896
57345
|
const ratioScaled = BigInt(now.p) * SCALE / pThen;
|
|
56897
57346
|
const ratio = Number(ratioScaled) / 1e18;
|
|
56898
|
-
const apr = (ratio - 1) * (
|
|
57347
|
+
const apr = (ratio - 1) * (YEAR_SECONDS8 / windowSeconds);
|
|
56899
57348
|
return {
|
|
56900
57349
|
apr,
|
|
56901
57350
|
sharePriceNow: now.p,
|