-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Q-23QA (Quality Assurance)Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxAssets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxbugSomething isn't workingSomething isn't workingdowngraded by judgeJudge downgraded the risk level of this issueJudge downgraded the risk level of this issuegrade-b
Description
Lines of code
Vulnerability details
Impact
The protocol can not be used with some collaterals.
Proof of Concept
In the initialization process, the protocol calculates the decimalsMultiplier that are used later to convert from the collateral token amount to cash token amount.
CashManager.sol
179: decimalsMultiplier =
180: 10 **
181: (IERC20Metadata(_cash).decimals() -
182: IERC20Metadata(_collateral).decimals());This implementation reverts for the collaterals with decimals greater than 18 and the protocol can not support some collaterals, it is an unnecessary contract level restriction for the future expansion.
Tools Used
Manual Review
Recommended Mitigation Steps
Add a new parameter to store the relationship between the two token decimals and use it properly for conversions.
Metadata
Metadata
Assignees
Labels
Q-23QA (Quality Assurance)Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxAssets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxbugSomething isn't workingSomething isn't workingdowngraded by judgeJudge downgraded the risk level of this issueJudge downgraded the risk level of this issuegrade-b