Trace Asset Flows Through a Transaction
Combine Balance Changes, Token Flow, and Execution Trace to reconstruct asset paths and final net changes with exact amounts.
Case objective
Identify whose assets increased or decreased, which contracts the assets passed through, and which calls triggered the critical transfers.
Example transaction and context
This Ethereum transaction combines a flash loan, token round trips, WETH unwrapping, and ETH distribution:
0xbdec39a74e620fc624f90483aff067b17044f81138e6c30038daf7f873159db4Open the transaction in Skylens
Key participants include executor 0x64dc84...5999, pool 0x58e278...e163, staker 0x444156...1423, sender 0x269ff4...f46c, and fee recipient 0x952222...afe5.
Questions to answer
- How much XPEPE did the pool send and receive?
- Where was WETH unwrapped into ETH?
- Who received the unwrapped ETH?
Investigation steps
- Start in Balance Changes and record each address's final net change without double-counting intermediate round trips.
- In Token Flow, follow each token and direction. Open Raws to verify unaggregated amounts.
- In Execution Trace, search the WETH, pool, and executor addresses to establish the order of
flash,stake,withdrawAll,swap, andwithdraw. - For every critical edge, verify call parameters, token decimals, and the trace index.
- Confirm that all inputs and outputs explain the net Balance Changes.
Key evidence
| Trace | Asset path | Raw amount | Formatted amount |
|---|---|---|---|
39 | Pool → executor, XPEPE | 49498286779167448503344113631 | 49,498,286,779.167448503344113631 XPEPE |
70 | Executor → staker, XPEPE | 49498286779167448503344113631 | 49,498,286,779.167448503344113631 XPEPE |
100 | Staker → executor, XPEPE | 49498286779167448503344113631 | 49,498,286,779.167448503344113631 XPEPE |
486 | Executor → pool, XPEPE | 199373286778715393708823565786 | 199,373,286,778.715393708823565786 XPEPE |
610–616 | Pool/WETH → executor | 680568466516036487 wei | 0.680568466516036487 ETH |
618 | Executor → fee recipient | 1000000000000000 wei | 0.001 ETH |
619 | Executor → sender | 679568466516036487 wei | 0.679568466516036487 ETH |
The final two ETH transfers add up exactly to the unwrapped amount:
0.001 + 0.679568466516036487 = 0.680568466516036487 ETHThis conservation check connects the visual Token Flow, the execution order in Execution Trace, and the final balance result.
Conclusion
The executor borrowed XPEPE from the pool, completed a round trip through the staking contract, and returned more XPEPE to the pool. The pool delivered
0.680568466516036487 WETH, which was unwrapped and split into a0.001 ETHfee and0.679568466516036487 ETHfor the sender. The two outputs exactly equal the unwrapped amount.
Caveats
- Contracts emit events themselves; a nonstandard token can log values that disagree with actual balances.
- Token Flow shows movement, but does not label profit, loss, or malicious behavior.
- Always apply token decimals to large raw values.
- Classify mints, burns, wraps, unwraps, and reverted internal transfers separately.
