Skip to content

Commit

Permalink
Merge branch 'staging' into fix/redundant-config-field
Browse files Browse the repository at this point in the history
  • Loading branch information
t0rbik committed Dec 20, 2024
2 parents cda6040 + 93970e0 commit 4726c76
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
27 changes: 23 additions & 4 deletions src/lib/config/metadataTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type ApiProvider =
| "jones"
| "dinero";

export interface VaultMetadata {
interface VaultMetadataBase {
label: string;
image: string;
synthAssetType: SynthAsset;
Expand All @@ -75,17 +75,36 @@ export interface VaultMetadata {
disabledDepositTokens: Address[];
disabledWithdrawTokens: Address[];
wethGateway?: Address;
gateway?: Address;
strategy?: string;
beta?: boolean;
}

interface VaultMetadataWithYieldTokenOverride extends VaultMetadataBase {
gateway: Address;
/**
* This is the address of the actual yield (bearing for aave) token,
* the regular yield token address in this case becomes a (static token adapter for aave or staking token for yearn),
* that we use for the vaults.
* If it exists, means the vault is using (static token adapter for aave or staking token for yearn).
*/
yieldTokenOverride?: Address;
beta?: boolean;
yieldTokenOverride: Address;
}

interface VaultMetadataWithoutYieldTokenOverride extends VaultMetadataBase {
gateway?: never;
/**
* This is the address of the actual yield (bearing for aave) token,
* the regular yield token address in this case becomes a (static token adapter for aave or staking token for yearn),
* that we use for the vaults.
* If it exists, means the vault is using (static token adapter for aave or staking token for yearn).
*/
yieldTokenOverride?: never;
}

export type VaultMetadata =
| VaultMetadataWithYieldTokenOverride
| VaultMetadataWithoutYieldTokenOverride;

/**
* Handle fetching APR data
*/
Expand Down
6 changes: 5 additions & 1 deletion src/lib/config/vaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const VAULTS: VaultsConfig = {
image: "aDAI.svg",
messages: [],
yieldTokenOverride: "0x028171bCA77440897B824Ca71D1c56caC55b68A3",
gateway: "0x67EC822A2F981Ef2db6Afce4E8dF57ff1439f4d3",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand All @@ -114,6 +115,7 @@ export const VAULTS: VaultsConfig = {
image: "aUSDC.svg",
messages: [],
yieldTokenOverride: "0xBcca60bB61934080951369a648Fb03DF4F96263C",
gateway: "0x67EC822A2F981Ef2db6Afce4E8dF57ff1439f4d3",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand All @@ -131,6 +133,7 @@ export const VAULTS: VaultsConfig = {
image: "aUSDT.svg",
messages: [],
yieldTokenOverride: "0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811",
gateway: "0x67EC822A2F981Ef2db6Afce4E8dF57ff1439f4d3",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand Down Expand Up @@ -212,6 +215,7 @@ export const VAULTS: VaultsConfig = {
image: "aFRAX.svg",
messages: [],
yieldTokenOverride: "0xd4937682df3C8aEF4FE912A96A74121C0829E664",
gateway: "0x67EC822A2F981Ef2db6Afce4E8dF57ff1439f4d3",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand Down Expand Up @@ -247,7 +251,6 @@ export const VAULTS: VaultsConfig = {
image: "wstETH.svg",
messages: [],
wethGateway: "0xA22a7ec2d82A471B1DAcC4B37345Cf428E76D67A",
gateway: "0xA22a7ec2d82A471B1DAcC4B37345Cf428E76D67A",
api: {
apr: getLidoApy,
yieldType: "APR",
Expand Down Expand Up @@ -283,6 +286,7 @@ export const VAULTS: VaultsConfig = {
messages: [],
wethGateway: "0xA22a7ec2d82A471B1DAcC4B37345Cf428E76D67A",
yieldTokenOverride: "0x030bA81f1c18d280636F32af80b9AAd02Cf0854e",
gateway: "0xA067C885d958aec176eC3D8dAdc847e0c9384809",
api: {
apr: getAaveApr,
yieldType: "APR",
Expand Down

0 comments on commit 4726c76

Please sign in to comment.