Previous market-vault connections aren’t explicitly removed when new ones are added. Existing configurations remain in storage, leading to outdated credit capacity calculations. Vaults/markets will reference obsolete connections, corrupting financial calculations. There is another issue of DOS due to continuous addition without removal.
The contract manages connections between markets and vaults via (connectVaultsAndMarkets
) which Links a list of markets to a list of vaults by Looping through each market and calling _configureMarketConnectedVaults
.
Inside _configureMarketConnectedVaults
, the new vaults are added to the market’s connectedVaults
array:
Existing connections (old sets in connectedVaults
) are never removed. When new vaults are linked to a market, the previous connections remain in storage. This leads to:
Credit recalculation (Vault.recalculateVaultsCreditCapacity
) considering both old and new vaults, even when they’re no longer connected.
Another minor issue with the growing connections leading to DOS
Example:
Initial State:
Market 1 connected to [Vault A, Vault B].
Update Action:
Call connectVaultsAndMarkets([Market1], [Vault C, Vault D])
.
Result:
Market1.connectedVaults
becomes:
Both old (A, B) and new (C, D) vaults are tracked as "connected," causing recalculation logic to treat all four as active.
Vaults A and B no longer delegate collateral but are included in credit capacity calculations
Manual Review
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.