Divvi Protocol - KPI calculation functions / morph
Functions
calculateKpi()
- HyperSync: Transaction and gas usage data from Morph network via HyperSync client
- Block Data: Timestamps via
getBlockRange
utility for temporal filtering
- Transaction count accurately represents user engagement with the network
- All user-initiated transactions contribute equally to activity metrics regardless of value or purpose
- Higher transaction counts indicate more active user participation in the ecosystem
- Transaction frequency serves as a proxy for user adoption and platform utility
- Both successful and failed transactions represent legitimate user engagement attempts
- Queries all transactions initiated by user wallet within the specified time window on Morph
- Filters transactions by block timestamp to ensure they fall within the time range
- Counts the total number of transactions regardless of success status or transaction value
- Returns total transaction count representing user’s network engagement level
Parameters
params
Calculation parametersaddress
string
User wallet address to calculate transaction count for
endTimestampExclusive
Date
End of time window for transaction counting (exclusive)
redis?
RedisClientType
startTimestamp
Date
Start of time window for transaction counting (inclusive)
Returns
Promise
<KpiResult
<string
>>
Promise resolving to total number of transactions initiated by the user
Suggest changes to this pageLast updated: Aug 6, 2025, 3:51 PM