src/dsc_engine.vy
The _get_account_collateral_value() function is expected to return the total USD value of a user's collateral by summing across all supported collateral tokens. It should only need to query the price oracle for tokens the user actually holds.
The function iterates over all entries in COLLATERAL_TOKENS (both WETH and WBTC) and calls _get_usd_value(token, amount) for each — regardless of whether amount is zero. This means every health factor check triggers oracle calls for both price feeds. If either oracle becomes stale (reverts at assert updated_at != 0 or assert seconds_since <= TIMEOUT), ALL operations gated on the health factor — minting, redeeming, burning DSC, and liquidating — revert for ALL users. A user with 100% WETH and 0% WBTC is frozen by a WBTC oracle failure they have zero exposure to.
Likelihood: Medium
Chainlink ZKsync Era feeds operate at 1-hour heartbeat; any infrastructure interruption to either WETH or WBTC feed causes 72h+ stale window (until D01 is fixed) or 1h+ window (even after D01 fix).
Only ONE of the two price feeds needs to fail to freeze the entire protocol.
Two independent oracle failure surfaces double the likelihood of a freeze event.
Impact: High
Zero DSC can be minted or burned while either oracle is stale.
No collateral can be deposited or redeemed by any user.
No liquidations can proceed — bad debt accumulates.
DSC holders cannot redeem underlying collateral — peg breaks.
Severity: High
A user holds only WETH collateral. The WBTC/USD oracle on ZKsync Era goes stale (1 hour without an update). The user tries to mint DSC against their WETH — the call reverts because the WBTC oracle call inside _get_account_collateral_value() fires and reverts.
Skip the oracle call entirely when a user's balance of that collateral token is zero. The result of _get_usd_value(token, 0) is always zero regardless of price — there is no reason to call the oracle.
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.