You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/adding-new-chain.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,9 @@ Add your chain's contract addresses to the `_addressesRegistry` mapping:
61
61
},
62
62
```
63
63
64
+
Remember to register the USDC address if it supports ERC-2612 permit version 2, otherwise the signature will default to permit version 1 (if `hasSimplePermit` is set to true).
65
+
Also make sure to add the Permit2 contract (if available) to enable transactional flows using Permit2, otherwise the approval will default to the classic erc20 approval.
/** Profit (from the underlying asset's price variation) & Loss (from bad debt socialization) of all the user's vault positions, in USD. */
@@ -3471,9 +3489,9 @@ export type VaultPositionHistory = {
3471
3489
assets: Maybe<Array<BigIntDataPoint>>;
3472
3490
/** Value of the position since its inception, in USD. */
3473
3491
assetsUsd: Maybe<Array<FloatDataPoint>>;
3474
-
/** Profit (from the underlying asset's price variation) & Loss (from bad debt socialization) of the position since its inception, in underlying assets. */
3492
+
/** Profit & Loss of the position (due to the interest) of the position since its inception, in underlying assets. */
3475
3493
pnl: Maybe<Array<BigIntDataPoint>>;
3476
-
/** Profit (from the underlying asset's price variation) & Loss (from bad debt socialization) of the position since its inception, in USD for display purposes. */
3494
+
/** Profit & Loss of the position (due to the asset's price variation and interest) since its inception, in USD. */
3477
3495
pnlUsd: Maybe<Array<FloatDataPoint>>;
3478
3496
/** Return Over Equity of the position since its inception. */
3479
3497
roe: Maybe<Array<FloatDataPoint>>;
@@ -3532,7 +3550,7 @@ export type VaultPositionState = {
3532
3550
id: Scalars["ID"]["output"];
3533
3551
/** Profit & Loss of the position (due to the interest) since its inception, in loan assets. */
3534
3552
pnl: Maybe<Scalars["BigInt"]["output"]>;
3535
-
/** Profit & Loss of the position's supply side (due to the asset's price variation and interest) since its inception, in USD. */
3553
+
/** Profit & Loss of the position (due to the asset's price variation and interest) since its inception, in USD. */
3536
3554
pnlUsd: Maybe<Scalars["Float"]["output"]>;
3537
3555
/** Return Over Equity of the position since its inception. */
3538
3556
roe: Maybe<Scalars["Float"]["output"]>;
@@ -3742,9 +3760,9 @@ export type VaultV2 = {
3742
3760
address: Scalars["Address"]["output"];
3743
3761
allocators: Array<VaultV2Allocator>;
3744
3762
asset: Asset;
3745
-
/** 6hr average apy of the vault. At the moment, this is not the realized apy but the compounded weighted average apr of all adapters (capped by max rate) */
3763
+
/** Realized average APY of the vault, calculated from share price evolution over a predefined lookback period. Uses normalized timestamps (rounded to hour/day/week boundaries) for optimal caching and performance. Available periods: 1h, 6h (default), 1d, 7d, 30d, 90d, 1y, or 'inception' for all-time APY. */
3746
3764
avgApy: Maybe<Scalars["Float"]["output"]>;
3747
-
/** 6hr average apy of the vault. At the moment, this is not the realized apy but the compounded weighted average apr of all adapters (capped by max rate), minus vault V2 fees, plus the instantaneous rewards distributed to vault users */
3765
+
/** Realized average net APY of the vault (after fees, with rewards), calculated from share price evolution over a predefined lookback period. Uses normalized timestamps (rounded to hour/day/week boundaries) for optimal caching and performance. Available periods: 1h, 6h (default), 1d, 7d, 30d, 90d, 1y, or 'inception' for all-time net APY. */
3748
3766
avgNetApy: Maybe<Scalars["Float"]["output"]>;
3749
3767
caps: PaginatedVaultV2Caps;
3750
3768
chain: Chain;
@@ -3760,9 +3778,9 @@ export type VaultV2 = {
3760
3778
*/
3761
3779
historicalState: VaultV2History;
3762
3780
id: Scalars["ID"]["output"];
3763
-
/** The assets deposited to the vault that are not generating interests. */
3781
+
/** The assets deposited to the vault that are not generating interest. */
3764
3782
idleAssets: Scalars["BigInt"]["output"];
3765
-
/** The USD value of assets deposited to the vault that are not generating interests. */
3783
+
/** The USD value of assets deposited to the vault that are not generating interest. */
3766
3784
idleAssetsUsd: Maybe<Scalars["Float"]["output"]>;
3767
3785
/** The liquidity available from the liquidity adapter + idle assets. */
/** Relative cap limit for this cap, in vault asset units */
3944
+
relativeCap: Array<BigIntDataPoint>;
3945
+
};
3946
+
3902
3947
/** Vault V2 history */
3903
3948
exporttypeVaultV2History={
3904
3949
__typename?: "VaultV2History";
3905
3950
/** Average APY computed from share price evolution over a lookback period (1-24 hours). Returns annualized compound rate. */
3906
3951
avgApy: Array<FloatDataPoint>;
3907
3952
/** Average Net APY computed from share price evolution over a lookback period (1-24 hours). Returns annualized compound rate. Includes rewards and deductedfees. */
3908
3953
avgNetApy: Array<FloatDataPoint>;
3954
+
/** Historical allocation data grouped by caps. Returns allocation timeseries for requested caps within the requested timerange. */
3955
+
caps: PaginatedVaultV2HistoricalCaps;
3956
+
/** The assets deposited to the vault that are not generating interest. */
3957
+
idleAssets: Array<BigIntDataPoint>;
3958
+
/** Idle assets in USD for display purpose. */
3959
+
idleAssetsUsd: Array<FloatDataPoint>;
3909
3960
/** Real assets in the vault (excluding virtual accrual). */
3910
3961
realAssets: Array<BigIntDataPoint>;
3911
3962
/** Real assets in USD for display purpose. */
@@ -3932,6 +3983,22 @@ export type VaultV2HistoryAvgNetApyArgs = {
3932
3983
options?: InputMaybe<TimeseriesOptions>;
3933
3984
};
3934
3985
3986
+
/** Vault V2 history */
3987
+
exporttypeVaultV2HistoryCapsArgs={
3988
+
capType_in?: InputMaybe<Array<VaultV2CapType>>;
3989
+
options?: InputMaybe<TimeseriesOptions>;
3990
+
};
3991
+
3992
+
/** Vault V2 history */
3993
+
exporttypeVaultV2HistoryIdleAssetsArgs={
3994
+
options?: InputMaybe<TimeseriesOptions>;
3995
+
};
3996
+
3997
+
/** Vault V2 history */
3998
+
exporttypeVaultV2HistoryIdleAssetsUsdArgs={
3999
+
options?: InputMaybe<TimeseriesOptions>;
4000
+
};
4001
+
3935
4002
/** Vault V2 history */
3936
4003
exporttypeVaultV2HistoryRealAssetsArgs={
3937
4004
options?: InputMaybe<TimeseriesOptions>;
@@ -3962,6 +4029,26 @@ export type VaultV2HistoryTotalSupplyArgs = {
3962
4029
options?: InputMaybe<TimeseriesOptions>;
3963
4030
};
3964
4031
4032
+
/** Predefined lookback periods for vault APY calculations. Using these periods ensures better query performance through timestamp normalization and caching. */
4033
+
exportenumVaultV2LookbackPeriod{
4034
+
/** Since vault inception (all-time) */
4035
+
Inception="INCEPTION",
4036
+
/** 90 days (~3 months) lookback period */
4037
+
NinetyDays="NINETY_DAYS",
4038
+
/** 1 day (24 hours) lookback period */
4039
+
OneDay="ONE_DAY",
4040
+
/** 1 hour lookback period */
4041
+
OneHour="ONE_HOUR",
4042
+
/** 1 year (365 days) lookback period */
4043
+
OneYear="ONE_YEAR",
4044
+
/** 7 days (1 week) lookback period */
4045
+
SevenDays="SEVEN_DAYS",
4046
+
/** 6 hours lookback period (default) */
4047
+
SixHours="SIX_HOURS",
4048
+
/** 30 days (~1 month) lookback period */
4049
+
ThirtyDays="THIRTY_DAYS",
4050
+
}
4051
+
3965
4052
/** Vault V2 metadata */
3966
4053
exporttypeVaultV2Metadata={
3967
4054
__typename?: "VaultV2Metadata";
@@ -3981,13 +4068,77 @@ export type VaultV2Position = {
3981
4068
/** Value of vault shares held, in USD. */
3982
4069
assetsUsd: Maybe<Scalars["Float"]["output"]>;
3983
4070
chain: Chain;
4071
+
/** Timeseries history for each of this position's stats. */
4072
+
history: VaultV2PositionHistory;
3984
4073
id: Scalars["ID"]["output"];
4074
+
/** Profit & Loss of the position (due to the interest) since its inception, in loan assets. */
4075
+
pnl: Maybe<Scalars["BigInt"]["output"]>;
4076
+
/** Profit & Loss of the position (due to the asset's price variation and interest) since its inception, in USD. */
4077
+
pnlUsd: Maybe<Scalars["Float"]["output"]>;
4078
+
/** Return Over Equity of the position since its inception. */
4079
+
roe: Maybe<Scalars["Float"]["output"]>;
4080
+
/** Return Over Equity of the position since its inception, taking into account the underlying asset's price variation. */
4081
+
roeUsd: Maybe<Scalars["Float"]["output"]>;
3985
4082
/** Amount of vault shares */
3986
4083
shares: Scalars["BigInt"]["output"];
3987
4084
user: User;
3988
4085
vault: VaultV2;
3989
4086
};
3990
4087
4088
+
/** Vault V2 position history */
4089
+
exporttypeVaultV2PositionHistory={
4090
+
__typename?: "VaultV2PositionHistory";
4091
+
/** Value of the position since its inception, in underlying assets. */
4092
+
assets: Maybe<Array<BigIntDataPoint>>;
4093
+
/** Value of the position since its inception, in USD. */
4094
+
assetsUsd: Maybe<Array<FloatDataPoint>>;
4095
+
/** Profit & Loss of the position (due to the interest) of the position since its inception, in underlying assets. */
4096
+
pnl: Maybe<Array<BigIntDataPoint>>;
4097
+
/** Profit & Loss of the position (due to the asset's price variation and interest) since its inception, in USD. */
4098
+
pnlUsd: Maybe<Array<FloatDataPoint>>;
4099
+
/** Return Over Equity of the position since its inception. */
4100
+
roe: Maybe<Array<FloatDataPoint>>;
4101
+
/** Return Over Equity of the position since its inception, taking into account the underlying asset's price variation. */
4102
+
roeUsd: Maybe<Array<FloatDataPoint>>;
4103
+
/** Value of the position since its inception, in vault shares. */
0 commit comments