Aave — Part VII
Unraveling Complexity
Part VI closed with a simple demonstration of building collateral positions using a simple process: look for Supply events, then decode them to inspect the user address, the reserve address, and the amount supplied.
But that’s a naive approach that ignores a lot of detail. Critically, it scales poorly — every successive update would have to scan for new events since the last block, discover new users, add them to the previous users, then do a full re-scrape of all of the previous plus new positions.
So instead of rely on that structure, I built the updater from the ground up. Along the way, I dug through many layers of unexpected complexity. It required a lot of untangling, but yielded valuable information about how Aave handles position accounting, upgrades, and changing incentives.
I will cover several areas where position tracking required additional layers of decoding and tracking. This will be particularly useful if you need to understand how the Aave contracts are wired together across a particular market.

