A critical integer overflow vulnerability exists in collateral value calculations due to unsafe uint256-to-int256 type casting. This allows large numeric values to wrap to negative numbers, leading to improper liquidation of valid positions and protocol accounting corruption.
Conversion Mechanics:
positionCollateralAmount (uint256) and collateralTokenPrice.min (uint256) cast to int256 without overflow checks
Values exceeding 2^255-1 (≈5.7e76) wrap to negative due to two's complement representation
Exploit Scenario:
False Negatives: Valid large positions marked as undercollateralized
False Positives: Undercollateralized positions appear solvent
All calculations using remainingCollateralUsd become unreliable
Manual review
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.