Skip to main content
Wallet apps and portfolio trackers typically show users a raw list of transaction hashes with hex method IDs and token transfer logs. ParaLens turns each hash into a structured TxReport containing a human-readable intent label, the economic actor, token-in/out amounts, a USD net result, and DeFi-specific position context — everything you need to render a meaningful activity feed without writing your own decoder.

Intent-Based Labeling

Map classification.intent_kind to a friendly UI string for the activity feed. The table below covers the most common DeFi operations. For a complete list of intent_kind values see the Intent Kinds reference.
Prefer classification.intent_label from the API response for display — it is already human-readable and localization-ready, so you can render it directly without maintaining your own mapping table.

Position Effects

For lending, borrowing, and liquidity transactions, position_effects[] provides DeFi-specific context that goes beyond a simple send/receive summary. Each entry describes how the transaction changed a subject’s standing in a protocol.
Use these entries to add contextual tags to activity items — for example, “Collateral increased” next to a lending deposit, or “Liquidity added” next to a LiquidityProvision event. Filter position_effects by subject to scope context to the economic actor rather than protocol contracts.

Token Flow Summary

economics.token_in and economics.token_out give you the primary input and output tokens as a ready-to-render pair. Use them to build a compact send/receive card:
For multi-leg flows (e.g., liquidity provision involving two tokens) use inventory_deltas[] filtered by the actor’s address to enumerate all movements.

USD Net Result

economics.net_usd_before_gas carries the net economic value of the transaction before gas costs are subtracted. Always check the available flag before rendering it — the field is absent or unavailable for transactions where a USD price could not be resolved.

Handling Unknowns

When intent_kind is UnknownComplexFlow, ParaLens was unable to resolve the transaction into a named pattern. Rather than showing a blank entry, fall back to the raw evidence:
  1. Show inventory_deltas — list every asset movement grouped by direction (Inflow / Outflow) so the user still sees what tokens moved and the approximate USD value.
  2. Show motifs — list detected structural primitives (e.g., ProtocolSwap, FlashLoan) as tags. Even when intent resolution fails, motifs often reveal partial structure.
  3. Label the entry — use a neutral label such as “Complex transaction” or “Unknown interaction” rather than leaving it blank.

Example: Mapping Intent Kind and Rendering the Financial Summary

The snippet below shows how to map intent_kind to a display label and render a complete financial summary row for an activity feed.