Submitted by Ch_301, also found by Ch_301
One of the key concepts in this protocol is Cross Lending when the contract will calculate the health-factor of the account. If it is unhealthy, the liquidator can repay the debt on behalf of the borrower and take their collateral assets at a certain discount price.
The protocol has two main factors to calculate the health-factor for users; the collateralFactor and liquidationThreshold values are unique for each pool and asset. Also, the PoolAdmin can update them at any time by triggering Configurator.sol#setAssetCollateralParams().
The responsibility for computing health-factor is GenericLogic.sol#calculateUserAccountData(), which calculates the user data across the reserves. However, the current logic uses liquidationThreshold value also to check if the asset will not be used as collateral (but still, users can supply/lend it to be borrowed and earn interest).
The issue is the PoolAdmin can call Configurator.sol#setAssetCollateralParams() at any time to disable accepting an asset as collateral by updating collateralFactor and liquidationThreshold to zero value. So, users suddenly will get liquidated directly by MEV bots.
Foundry PoC - Please copy the following POC in TestIntCrossLiquidateERC20.t.sol:
In case the PoolAdmin decides to no longer accept an asset as collateral, users who are using this asset as collateral should have a period of time to update their loans. You can use a buffer period or lock time to do this critical update.
thorseldon (BendDAO) disputed
0xTheC0der (judge) commented:
0xTheC0der (judge) commented:
thorseldon (BendDAO) commented:
0xTheC0der (judge) commented:
