Skip to content

USDC blacklisting breaks liquidations #7

@Van0k

Description

@Van0k

Issue:
CreditManager.closeCreditAccount(), which is invoked during liquidations, has the following line:

   // transfer remaining funds to the borrower [liquidations only]
        if (remainingFunds > 1) {
            _safeTokenTransfer(
                creditAccount,
                underlying,
                borrower,
                remainingFunds,
                false
            ); // F:[CM-13,18]
        }

Since this is always executed when there are remaining funds, liquidations on an account will fail if the borrower cannot be transferred to - such as when the borrower is blacklisted by USDC. While the account can be liquidated after some time due to account value dropping relative to borrowed amount (which leads to remainingFunds = 0), this can lead to a temporary freezing of LP funds and break "Expirable" Credit Manager logic used for fixed rate loans.

There are two proposed solutions:

  1. Modify the USDC CreditFacade to check the borrower address being in the blacklist on liquidation. If the borrower is in the blacklist, the CF will transfer the Credit Account to the treasury / a treasury-controlled contract before liquidation - this will send the remaining funds to the treasury, so the borrower can recover them on a different address by contacting the DAO.
  2. Change the CreditManager logic so that the borrower retains their Credit Account after liquidation. Note that the borrower would be able to close their account normally, since they can pass a different recipient address for their USDC. In addition to solving this issue, this has UX benefits. However, this requires updating Credit Managers, which is more disruptive than updating the Credit Facade.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions