Skip to main content

Coinpath® for EVM Networks

Account-based chains keep a balance per account. A transfer is a record that adds to one balance and subtracts from another. Coinpath® turns these records into a money flow as follows.

  • The algorithm is recursive. It starts at the initial address and computes the flow for each next level, going deeper into the graph.
  • At each level it looks at every incoming and outgoing transfer of the addresses on that level. It then applies a rule to associate incoming with outgoing transfers and to assign amounts to the edges.
  • Two common rules exist: last received, first spent (LRFS) and proportional. The Coinpath® API uses LRFS on account-based chains.

How last received, first spent works​

  1. Start at the initial address and compute the money flow for each next level.
  2. At each level, collect all incoming and outgoing transfers of the addresses on that level.
  3. Associate each incoming transfer with the first outgoing transfer that is equal to or smaller than the incoming amount.
  4. If several outgoing transfers qualify, prefer the one sent first.
  5. Repeat steps 3 and 4 until every incoming transfer is associated with outgoing transfers.

The result is the tracing amount you see in MoneyFlow Lite: the part of each outgoing transfer that is attributed to funds from the origin.

Tokens​

On EVM chains a MoneyFlow traces one currency at a time, chosen in the Currency dropdown when you create the MoneyFlow. The engine follows transfers of that token only. Swaps on a DEX change the token, so a trace of USDT stops where the funds are swapped to ETH. Create a second MoneyFlow for the new token from the swap address to continue.

Chains in MoneyFlow Lite that use this model: Algorand, Arbitrum One, Arc, Base, BNB Smart Chain, Ethereum Mainnet, Filecoin Mainnet, Optimism, Polygon, Robinhood Chain and TRON.

Build with Bitquery

Ready to run this in production?

Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.