Skip to content

Wrong Aave V3 PoolDataProvider address in default.toml + fork.toml #419

@obchain

Description

@obchain

Symptom

Bot scans correctly post-#418, identifies all 4 demo borrowers as liquidatable on the BSC fork, but every flash-loan quote fails:

WARN charon_flashloan::router: source skipped: quote failed
  source=AaveV3
  err=Rpc("getReserveConfigurationData: ABI decoding failed: buffer overrun while deserializing")
WARN charon_flashloan::router: no flash-loan source could cover the borrow

Result: liquidatable=4 queued=0. Bot detects the opportunities but never builds calldata or broadcasts.

Root cause

The Aave V3 BSC PoolDataProvider address baked into both config/default.toml:78 and config/fork.toml:77 is 0x41393e5e337606dc3821075Af65AeE84D7688CBD. There is no contract at that address on BSC mainnet — cast code against the live BSC chain and against any forked block returns 0x. Calls go to an EOA / empty slot, get back zero bytes, and alloy reports buffer overrun because it expected a tuple worth of data.

The correct address can be resolved on-chain at any time via the configured addresses_provider:

$ cast call 0xff75B6da14FfbbfD355Daf7a2731456b3562Ba6D 'getPoolDataProvider()(address)' \
    --rpc-url http://127.0.0.1:8545 --block 91323624
0xc90Df74A7c16245c5F5C5870327Ceb38Fe5d5328

The Aave V3 Pool (0x6807dc923806fE8Fd134338EABCA509979a7e0cB) was correct — only the data provider drifted.

Proposed fix

Update both configs:

data_provider = "0xc90Df74A7c16245c5F5C5870327Ceb38Fe5d5328"

Add a startup probe (AaveFlashLoan::connect) that resolves addresses_provider.getPoolDataProvider() and warns if the configured data_provider does not match. Catches address drift before the first quote silently fails.

Impact

Hard blocker on every fork demo and every mainnet run alike — flash-loan routing has no working source, so nothing is ever broadcast. Surfaced while validating #412/#413/#414 + #418 end-to-end at the Notion demo block 91323624.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions