Skip to content

Update non-USD based Comets on Mainnet to the service patch version#1128

Open
MishaShWoof wants to merge 255 commits into
compound-finance:mainfrom
woof-software:woof-software/update-to-new-factory-non-usd
Open

Update non-USD based Comets on Mainnet to the service patch version#1128
MishaShWoof wants to merge 255 commits into
compound-finance:mainfrom
woof-software:woof-software/update-to-new-factory-non-usd

Conversation

@MishaShWoof

Copy link
Copy Markdown
Contributor

No description provided.

MishaShWoof and others added 30 commits July 29, 2025 01:27
MishaShWoof and others added 11 commits May 14, 2026 13:32
…arios

- Updated test suite descriptions for clarity on asset liquidation conditions.
- Renamed variables to better reflect their purpose in the context of collateral factors.
- Enhanced readability and understanding of test cases related to asset absorption and liquidation factors.
…actors-validation

Fix: Price fetching for deactivated collaterals, optimized factors validation in AssetList + new tests
…actors-validation

Test: improved test cases description in absorb tests, added new tests for zero factors cases
…nto woof-software/update-to-new-factory-non-usd
Comment thread contracts/AssetList.sol
Comment on lines +141 to +142
if (assetConfig.borrowCollateralFactor >= assetConfig.liquidateCollateralFactor && assetConfig.borrowCollateralFactor != 0)
revert CometMainInterface.BorrowCFTooLarge();
Comment thread contracts/AssetList.sol
// Be nice and check descaled values are still within range
if (borrowCollateralFactor >= liquidateCollateralFactor) revert CometMainInterface.BorrowCFTooLarge();
// safety check duplicate sanity check on original values to ensure no values skewing after descaling and type conversion
if (borrowCollateralFactor >= liquidateCollateralFactor && borrowCollateralFactor != 0) revert CometMainInterface.BorrowCFTooLarge();
Comment thread contracts/CometExt.sol
*/
function pauseCollateralAssetSupply(uint24 assetIndex, bool paused) override external onlyGovernorOrPauseGuardian isValidAssetIndex(assetIndex) {
if ((collateralsSupplyPauseFlags & (uint24(1) << assetIndex) != 0) == paused) revert CollateralAssetOffsetStatusAlreadySet(collateralsSupplyPauseFlags, assetIndex, paused);
if (!paused && isCollateralDeactivated(assetIndex)) revert CollateralIsDeactivated(assetIndex);
Comment thread contracts/CometExt.sol
*/
function pauseCollateralAssetTransfer(uint24 assetIndex, bool paused) override external onlyGovernorOrPauseGuardian isValidAssetIndex(assetIndex) {
if ((collateralsTransferPauseFlags & (uint24(1) << assetIndex) != 0) == paused) revert CollateralAssetOffsetStatusAlreadySet(collateralsTransferPauseFlags, assetIndex, paused);
if (!paused && isCollateralDeactivated(assetIndex)) revert CollateralIsDeactivated(assetIndex);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants