Low Tangerine Cod
High
params.optionFees is not being substructed from totalCdsDepositedAmountWithOptionFees like its happening everywhere in the project.
Here protocol doesn't substract params.optionFees like done everywhere in the project https://github.com/sherlock-audit/2024-11-autonomint/blob/main/Blockchain/Blockchian/contracts/lib/CDSLib.sol#L731
e.x. here params.returnAmount = cdsDepositDetails.depositedAmount + optionFees
https://github.com/sherlock-audit/2024-11-autonomint/blob/main/Blockchain/Blockchian/contracts/lib/CDSLib.sol#L885
or like here on the line above it
https://github.com/sherlock-audit/2024-11-autonomint/blob/main/Blockchain/Blockchian/contracts/lib/CDSLib.sol#L721
No response
No response
No response
omniChainData.totalCdsDepositedAmountWithOptionFees and totalCdsDepositedAmountWithOptionFees will be become not in sync which will lead to deposit and withdraw in CDS transactions reverts here. In current implementation from global variable fees substracted from local its not. https://github.com/sherlock-audit/2024-11-autonomint/blob/main/Blockchain/Blockchian/contracts/lib/CDSLib.sol#L72
No response
fix like this:
- totalCdsDepositedAmountWithOptionFees -= (params.cdsDepositDetails.depositedAmount - params.cdsDepositDetails.liquidationAmount + params.optionsFeesToGetFromOtherChain);
+ totalCdsDepositedAmountWithOptionFees -= (params.cdsDepositDetails.depositedAmount - params.cdsDepositDetails.liquidationAmount + params.optionsFeesToGetFromOtherChain + params.optionFees);
also params.optionsFeesToGetFromOtherChain
should be substracted and not added, but its another issue