@@ -19,7 +19,6 @@ import {
1919} from '@originprotocol/squid-utils'
2020import { getLatestExchangeRateForDate } from '@shared/post-processors/exchange-rates/exchange-rates'
2121import { baseAddresses } from '@utils/addresses-base'
22- import { plumeAddresses } from '@utils/addresses-plume'
2322import { ProductName , armProducts , otokenProducts } from '@utils/products'
2423
2524const startDate = '2022-01-01'
@@ -52,7 +51,7 @@ export const protocolProcessor = defineProcessor({
5251 const superTokenUpdatedDates = uniq ( [
5352 ...otherOTokenDetailsArrays
5453 . flat ( )
55- . filter ( ( d ) => d . product === 'superOETHb' || d . product === 'superOETHp' )
54+ . filter ( ( d ) => d . product === 'superOETHb' )
5655 . map ( ( d ) => d . date ) ,
5756 ] )
5857
@@ -173,13 +172,11 @@ const getOTokenDetails = async (
173172 const last = await getLatestProtocolDailyStatDetail ( ctx , product )
174173
175174 const lastDates = [ last ?. date ?? startDate ]
176- if ( product === 'OETH' || product === 'superOETHb' || product === 'superOETHp' ) {
175+ if ( product === 'OETH' || product === 'superOETHb' ) {
177176 const lastOETH = await getLatestProtocolDailyStatDetail ( ctx , 'OETH' )
178177 const lastSuperOETHb = await getLatestProtocolDailyStatDetail ( ctx , 'superOETHb' )
179- const lastSuperOETHp = await getLatestProtocolDailyStatDetail ( ctx , 'superOETHp' )
180178 lastDates . push ( lastOETH ?. date ?? startDate )
181179 lastDates . push ( lastSuperOETHb ?. date ?? startDate )
182- lastDates . push ( lastSuperOETHp ?. date ?? startDate )
183180 }
184181
185182 // For OETH variants, use the minimum date to ensure all interdependent records are recalculated
@@ -288,21 +285,6 @@ const calculateOTokenBasicStats = async (
288285 if ( oethTvl !== 0n ) {
289286 detail . revenue += ( oethRevenue * woethBalance ) / oethTvl
290287 }
291- } else if ( detail . product === 'superOETHp' ) {
292- // Prefer in-memory OETH data computed earlier in this run to avoid races
293- const detailOETH = opts ?. oethCacheByDate ?. [ date ] ?? ( await getProtocolDailyStatDetail ( ctx , date , 'OETH' ) )
294- const superOETHpWrappedOETH = await getLatestStrategyBalance (
295- ctx ,
296- plumeAddresses . superOETHp . strategies . bridgedWOETH ,
297- date ,
298- )
299- const woethBalance = superOETHpWrappedOETH ?. balanceETH ?? 0n
300- detail . bridgedTvl = woethBalance
301- const oethTvl = detailOETH ?. tvl ?? 0n
302- const oethRevenue = detailOETH ?. revenue ?? 0n
303- if ( oethTvl !== 0n ) {
304- detail . revenue += ( oethRevenue * woethBalance ) / oethTvl
305- }
306288 }
307289}
308290
@@ -312,16 +294,11 @@ const calculateOETHInheritedStats = async (ctx: Context, detail: ProtocolDailySt
312294 baseAddresses . superOETHb . strategies . bridgedWOETH ,
313295 date ,
314296 )
315- const superOETHpWrappedOETH = await getLatestStrategyBalance (
316- ctx ,
317- plumeAddresses . superOETHp . strategies . bridgedWOETH ,
318- date ,
319- )
320297
321- detail . inheritedTvl = ( superOETHbWrappedOETH ?. balanceETH ?? 0n ) + ( superOETHpWrappedOETH ?. balanceETH ?? 0n )
298+ detail . inheritedTvl = superOETHbWrappedOETH ?. balanceETH ?? 0n
322299 detail . inheritedYield = detail . earningTvl !== 0n ? ( detail . yield * detail . inheritedTvl ) / detail . earningTvl : 0n
323300 detail . inheritedRevenue = detail . earningTvl !== 0n ? ( detail . revenue * detail . inheritedTvl ) / detail . earningTvl : 0n
324- detail . bridgedTvl = ( superOETHbWrappedOETH ?. balanceETH ?? 0n ) + ( superOETHpWrappedOETH ?. balanceETH ?? 0n )
301+ detail . bridgedTvl = superOETHbWrappedOETH ?. balanceETH ?? 0n
325302}
326303
327304const calculateForDates = async (
0 commit comments