57346 sc low alchemistallocator compares incompatible units asset wei vs wad percentage
Description
Summary
Vulnerability Details
// Line 35 - In allocate():
uint256 adjusted = absoluteCap > relativeCap ? absoluteCap : relativeCap;
// Line 57 - In deallocate():
uint256 adjusted = absoluteCap < relativeCap ? absoluteCap : relativeCap;Why This Is Wrong
Understanding WAD Units
WAD Constant Definition
How RelativeCap Should Be Used
Impact
Example Calculation
Recommendations
Proof of Concept
Proof of Concept
Previous58280 sc critical repayment s fee is charged from other users causing the contract to fail when the myt total balance of a user cannot cover the feeNext58081 sc medium missing check in function alchemistv3 setminimumcollateralization could lead to set minimumcollateralization globalminimumcollateralization
Was this helpful?