Gearbox-protocol/core-v2

should update pausable admin in acl contract

Opened this issue · 0 comments

Hi, I've noticed an issue in the v2.1 of the Dai credit contract. The Credit Facade in this version has not been added as a pauseable admin in the ACL contract. This can be observed in the image linked below:
image
Due to this omission, liquidations cannot proceed without adding the Credit Facade contract (0x5BcB06c56e8F28da0b038a373199240ca3F5a2f4) to the ACL contract.

Additionally, there seems to be an inconsistency in the developer documentation found at https://dev.gearbox.fi/. The Credit Facade address listed there is outdated. Refer to the image for clarification:
image

The correct address should be updated as can be verified on Etherscan. The relevant Etherscan image is included for reference:
image

more detail:

When the cumulative loss from liquidation exceeds the limit, the Credit Facade attempts to pause the credit manager, as detailed in the code snippet from the Credit Facade contract:

if (loss > 0) {
params.isIncreaseDebtForbidden = true; // F: [FA-15A]
lossParams.currentCumulativeLoss += loss.toUint128();
if (
lossParams.currentCumulativeLoss > lossParams.maxCumulativeLoss
) {
_pauseCreditManager(); // F: [FA-15B]
}

However, as mentioned earlier, since the Credit Facade does not have the required permissions, this action results in the failure of the liquidation process.

This issue is evident in the simulation: the _pauseCreditManager() function cannot be executed because the Credit Facade at 0x5BcB06c56e8F28da0b038a373199240ca3F5a2f4 lacks the necessary permissions.
image