The CollateralDeposited event does not record which collateral token was deposited:
The engine supports multiple collateral tokens (WETH and WBTC), and internally keys deposits by [user][token]. But the emitted event carries only user and amount — not token_collateral_address. An off-chain indexer, accounting system, or liquidation bot consuming CollateralDeposited cannot tell whether a given deposit was WETH or WBTC, and therefore cannot reconstruct per-token balances from events alone.
This is inconsistent with the sibling event, which does include the token:
So redemptions are attributable to a token but deposits are not, making it impossible to reconcile the two sides purely from logs. (Separately, marking amount as indexed while omitting the token is a poor choice — indexing the token would be far more useful for filtering.)
Impact: Low. No funds are at risk and on-chain accounting (user_to_token_address_to_amount_deposited) remains correct; the defect is in observability. Off-chain consumers that rely on events for per-token deposit tracking, monitoring, or liquidation targeting will be unable to attribute deposits to a collateral asset.
Likelihood: High. Every deposit emits the incomplete event.
Include the collateral token in the event (and prefer indexing the token over the amount), mirroring CollateralRedeemed:
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.