diff --git a/subgraphs/llama-airforce/src/prices/common/constants.ts b/subgraphs/llama-airforce/src/prices/common/constants.ts index 0a0f16d46b..04c82e5acf 100644 --- a/subgraphs/llama-airforce/src/prices/common/constants.ts +++ b/subgraphs/llama-airforce/src/prices/common/constants.ts @@ -41,3 +41,10 @@ export const BIGDECIMAL_USD_PRICE = BigDecimal.fromString("1000000"); export const AAVE_ORACLE_DECIMALS = 8; export const DEFAULT_USDC_DECIMALS = 6; export const DEFAULT_DECIMALS = BigInt.fromI32(18); + +export const PIREX_CVX_ADDRESS = Address.fromString( + "0xbce0cf87f513102f22232436cca2ca49e815c3ac" +); +export const CONVEX_TOKEN_ADDRESS = Address.fromString( + "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b" +); diff --git a/subgraphs/llama-airforce/src/prices/index.ts b/subgraphs/llama-airforce/src/prices/index.ts index 3682441edc..7596971339 100644 --- a/subgraphs/llama-airforce/src/prices/index.ts +++ b/subgraphs/llama-airforce/src/prices/index.ts @@ -21,6 +21,10 @@ export function getUsdPricePerToken( tokenAddr: Address, block: ethereum.Block | null = null ): CustomPriceType { + if (tokenAddr.equals(constants.PIREX_CVX_ADDRESS)) { + tokenAddr = constants.CONVEX_TOKEN_ADDRESS; + } + if (tokenAddr.equals(constants.NULL.TYPE_ADDRESS)) { return new CustomPriceType(); }