Test/configurator scenario#409
Open
vlad-woof-software wants to merge 228 commits intomainfrom
Open
Conversation
…s for extended pause
…nt-arg `supplyInternal` redundant argument removal
Lenders' illiquidity & Supply index grows in empty market
Utilization peaking impact & borrow indexes grow in empty market & Supply tests
…liquidateCF adjustment
Comment on lines
+145
to
+151
| if (assetConfig.borrowCollateralFactor != 0 && assetConfig.liquidateCollateralFactor == 0) { | ||
| revert CometMainInterface.BorrowCFTooLarge(); | ||
| } else if (assetConfig.borrowCollateralFactor != 0 && assetConfig.liquidateCollateralFactor != 0) { | ||
| // Ensure collateral factors are within range | ||
| if (assetConfig.borrowCollateralFactor > assetConfig.liquidateCollateralFactor) revert CometMainInterface.BorrowCFTooLarge(); | ||
| if (assetConfig.liquidateCollateralFactor > MAX_COLLATERAL_FACTOR) revert CometMainInterface.LiquidateCFTooLarge(); | ||
| } |
Comment on lines
+147
to
+151
| } else if (assetConfig.borrowCollateralFactor != 0 && assetConfig.liquidateCollateralFactor != 0) { | ||
| // Ensure collateral factors are within range | ||
| if (assetConfig.borrowCollateralFactor > assetConfig.liquidateCollateralFactor) revert CometMainInterface.BorrowCFTooLarge(); | ||
| if (assetConfig.liquidateCollateralFactor > MAX_COLLATERAL_FACTOR) revert CometMainInterface.LiquidateCFTooLarge(); | ||
| } |
Comment on lines
+160
to
+165
| if (borrowCollateralFactor != 0 && liquidateCollateralFactor == 0) { | ||
| revert CometMainInterface.BorrowCFTooLarge(); | ||
| } else if (borrowCollateralFactor != 0 && liquidateCollateralFactor != 0) { | ||
| // Be nice and check descaled values are still within range | ||
| if (borrowCollateralFactor >= liquidateCollateralFactor) revert CometMainInterface.BorrowCFTooLarge(); | ||
| } |
Comment on lines
+162
to
+165
| } else if (borrowCollateralFactor != 0 && liquidateCollateralFactor != 0) { | ||
| // Be nice and check descaled values are still within range | ||
| if (borrowCollateralFactor >= liquidateCollateralFactor) revert CometMainInterface.BorrowCFTooLarge(); | ||
| } |
| */ | ||
| 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); |
| */ | ||
| 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.