File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -334,9 +334,11 @@ export async function getICMStatsData(days: number): Promise<{
334334 let totalOutgoing = 0 ;
335335
336336 for ( const [ chainName , counts ] of chains . entries ( ) ) {
337- const mc = counts . incoming + counts . outgoing ;
338- chainBreakdown [ chainName ] = mc ;
339- totalMessageCount += mc ;
337+ // Use only incoming (RECEIVE events) to avoid double-counting.
338+ // Each cross-chain message generates one SEND on the source chain and
339+ // one RECEIVE on the destination chain; counting both would double the total.
340+ chainBreakdown [ chainName ] = counts . incoming ;
341+ totalMessageCount += counts . incoming ;
340342 totalIncoming += counts . incoming ;
341343 totalOutgoing += counts . outgoing ;
342344 }
@@ -460,7 +462,8 @@ export async function getChainICMData(
460462 result . push ( {
461463 timestamp : dayToTimestamp ( day ) ,
462464 date : day ,
463- messageCount : counts . incoming + counts . outgoing ,
465+ // Use only incoming (RECEIVE events) to deduplicate cross-chain messages.
466+ messageCount : counts . incoming ,
464467 incomingCount : counts . incoming ,
465468 outgoingCount : counts . outgoing ,
466469 } ) ;
You can’t perform that action at this time.
0 commit comments