Skip to content

Conversation

@royvardhan
Copy link

Track Hyperbridge evm volume by dapps.

@royvardhan
Copy link
Author

Hi. Quick question! (Wasn't answered in discord).

Our protocol enables cross-chain messages for things like cross-chain swaps (Intent Gateway), token teleports, and other dApp interactions.

To fit in the deposit/withdrawal terminology this pr tracks individual dapps, and stores volume data.

Is it possible to track token transfer volumes from cross-chain message events even if they don't follow the traditional bridge deposit/withdrawal model? Or does the bridges dashboard strictly require that semantic?

@vrtnd
Copy link
Member

vrtnd commented Nov 14, 2025

Is it possible to track token transfer volumes from cross-chain message events even if they don't follow the traditional bridge deposit/withdrawal model? Or does the bridges dashboard strictly require that semantic?

hi, yes u can track these messages. isDeposit field is simply a boolean directional indicator with zero semantic constrain

pr looks good, please resolve conflicts

@royvardhan
Copy link
Author

Is it possible to track token transfer volumes from cross-chain message events even if they don't follow the traditional bridge deposit/withdrawal model? Or does the bridges dashboard strictly require that semantic?

hi, yes u can track these messages. isDeposit field is simply a boolean directional indicator with zero semantic constrain

pr looks good, please resolve conflicts

So it is possible to track those events without the isDeposit field?

@royvardhan
Copy link
Author

It needs the field.
image

@royvardhan
Copy link
Author

@vrtnd I have fixed the conflicts

@Wizdave97
Copy link

@royvardhan since isDeposit is not a hard requirement, let's track transfer logs emitted from ismp events instead.

@royvardhan
Copy link
Author

@royvardhan since isDeposit is not a hard requirement, let's track transfer logs emitted from ismp events instead.

I have now removed the individual product tracking and added ISMP tracking instead, but without the isDeposit bool. @vrtnd Let me know what needs to be done to make the linter happy.

@Wizdave97
Copy link

Hi @vrtnd, can you please give this another review?

"event PostResponseEvent(string source, string dest, address indexed from, bytes to, uint256 nonce, uint256 timeoutTimestamp, bytes body, bytes response, uint256 responseTimeoutTimestamp, uint256 fee)",
],
logKeys: {
blockNumber: "blockNumber",
Copy link
Member

@vrtnd vrtnd Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing from and to in all events
please check by running tests npm run test hyperbridge 1000

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If from and to denotes the transfer direction then I don't think it fits what we are doing here.

These are messaging layer events, and inside these events the transfer of tokens can happen from any dapp integrating Hyperbridge.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A dapp at Chain A can dispatch a GetRequest to get some data from Chain B, and when GetResponse is received, there may or may not be events of transfer.

In simple terms, a dapp can integrate Hyperbridge, use the messaging functions to execute certain operations, and in these operations, there can be transfer events.

So if we look at these messaging layer events, we will find the transfer events.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but there is from and to in event abi event PostResponseEvent(string source, string dest, address indexed from, bytes to what do they mean?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The events in this PR are all ISMP (Hyperbridge's messaging protocol) events, and the from and to addresses in the event signatures are the contract addresses that send or receive the message.

Our methodology for tracking volume on Hyperbridge is to sum all token Transfer events from any transaction that emits any ISMP event. The core idea is that any token Transfer event found in a transaction that emits an ISMP event was triggered by the processing or dispatch of a cross-chain message on the Hyperbridge protocol.

Copy link
Author

@royvardhan royvardhan Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am now extracting from and to using the logs.

image

How do I avoid the isDeposit missing error?

@vrtnd

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of your events are missing the isDeposit param. can we figure out which event is related to deposit (user -> smart contract) and which is the opposite?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought isDeposit is not a strict requirement: #433 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we still need to track direction of transfers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suggest using api if possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants