The README states that someone can fork the codebase and swap WETH and WBTC for any basket of assets. Collateral valuation should therefore normalize each collateral token according to its actual decimals.
_get_usd_value assumes the raw token amount is already scaled to 18 decimals. For collateral tokens with 6 or 8 decimals, the engine calculates the wrong USD value. This can make collateral unusable or can misprice mint, redeem, and liquidation logic depending on the asset decimals.
Likelihood:
This occurs when the codebase is forked with a collateral token whose decimals are not 18, such as many BTC-style or stablecoin-style tokens.
The README explicitly describes swapping WETH and WBTC for another basket of assets as an intended use case.
Impact:
The protocol uses incorrect collateral values for minting, redemption, and liquidation.
Users can receive incorrect borrow limits or become unexpectedly liquidatable due to incorrect accounting.
Store or read each collateral token's decimals and normalize token amounts to 18 decimals before converting to USD.
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.