#47087 [SC-Insight] CollateralTypesFacet.sol::deprecateCollateralType allows to break CollateralTypes.sol::initialize invariant because it allows to deprecate all token collateral vaults leading to ...
Description
Brief/Intro
Vulnerability Details
function initialize(
CollateralType.Data[] memory _data
)
internal
{
@>[0] require(_data.length >= 2, "at least two collaterals required");
// initial pool collateral token
@>[1] require(_data[0].collateralClass == CollateralType.Class.POOL, "not a pool collateral at 0");
_add(_data[0]);
// ...
for (uint256 i = 1; i < _data.length; i++) {
@>[2] require(_data[i].collateralClass == CollateralType.Class.VAULT, "not a vault collateral");Suggestion
Impact Details
References
Proof of Concept
Proof of Concept
Previous#47082 [SC-Low] Zero collateral payout despite burned fAssetsNext#47091 [SC-Insight] `setWorkAddress()` enables front-running attacks to hijack work addresses
Was this helpful?