Monitor Pool Total Value Locked
Say you have a swap, and you want to monitor its Total Value Locked. You can do it by periodically access account resources. For example, you can do the following:
The program will fetch account resources for the given address and trigger syncPools
Every 24 * 60 minutes when backfill of historical data.
Every 60 minutes when processing the real-time data.
In syncPools, you could fetch the pools and compute the TVL
See this file for more context.
Last updated