Normal behavior: the read-only price helpers get_usd_value and get_token_amount_from_usd should handle any ERC20 address gracefully — e.g. by reverting with an explicit "unsupported token" error for tokens the protocol does not support.
The issue: both view functions look up token_address_to_price_feed[token] and immediately call AggregatorV3Interface(price_feed).stale_check_latest_round_data(). For a token that was never registered as collateral, the mapping returns empty(address), so the call becomes a staticcall to address(0) which reverts with no error message. Off-chain callers, integrators, and users get a bare revert instead of a meaningful error.
Reason 1 // Anyone (integrator or UI) can pass an arbitrary ERC20 address that is not in token_address_to_price_feed.
Reason 2 // The zero-address staticcall reverts unconditionally — there is no fallback path for unsupported tokens.
Impact 1 // View-only revert: no state impact, no fund loss.
Impact 2 // Poor error UX: integrators cannot distinguish "unsupported token" from other failures without decoding internals.
Call get_usd_value(randomERC20, 1e18) where randomERC20 was never passed to the constructor's collateral/prices arrays: the call reverts on the address(0) staticcall instead of reverting with an explicit unsupported-token error.
Add an explicit check before the external call:
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.