Keeping a running total of RUNE depth per pool requires the handling of several events: stakes, swaps, adds, rewards, errata, gas, emissions (?).
Here I will go through the events one by one and describe how to update the pool depths based on their values.
Stake events are fired when an LP adds stake to a pool.