Resolve the Aave v3 pool and oracle belonging to one market

One network can host several Aave markets. Combining a pool from one market with an oracle from another can produce a coherent-looking but incorrect incident report.

Anchor lookups to one verified provider

Obtain the PoolAddressesProvider for the intended deployment from its verified market configuration. Set PROVIDER, BLOCK and RPC, then use Foundry cast to read both addresses at the incident block. Record the provider address with the chain ID.

cast call "$PROVIDER" "getPool()(address)" --block "$BLOCK" --rpc-url "$RPC"
cast call "$PROVIDER" "getPriceOracle()(address)" --block "$BLOCK" --rpc-url "$RPC"

If an upgrade changed the pool implementation while leaving the pool proxy stable, logs still come from the proxy address. A separate oracle address update can change the price source even when the pool address remains unchanged. Track provider events as well as proxy implementation history.

Verify component roles before caching

Check that callers used these market components at the incident height. A configured address can change later, and another market on the same chain can reuse reserve symbols. Cache component addresses with the provider and the block range over which the mapping held. github.com PoolAddressesProvider.sol