Lines of code
<https://github.com/code-423n4/2023-11-betafinance/blob/0f1bb077afe8e8e03093c8f26dc0b7a2983c3e47/Omni_Protocol/src/OmniPool.sol#L303>
<https://github.com/code-423n4/2023-11-betafinance/blob/0f1bb077afe8e8e03093c8f26dc0b7a2983c3e47/Omni_Protocol/src/OmniToken.sol#L152>
<https://github.com/code-423n4/2023-11-betafinance/blob/0f1bb077afe8e8e03093c8f26dc0b7a2983c3e47/Omni_Protocol/src/OmniToken.sol#L180>
MEV bot can frontrun userβs repayment to liquidate user first when the OmniPool is unpaused
this report tries to combine a few issue
note that the repay function has WhenNotPaused modifier
if the OmniPool is paused for a long period of time,
then a malicious liquidator can keep calling accure to force user pay the interest
and when when admin unpause the contract, there is no time lock for user to repay the debt to reduce the borrow account, and the userβs is forced to enter the unhealthy state
liquidator cannot liquidate user when the contract is paused, but they can monitor the unpause transaction
MEV bot can frontrun userβs repayment to liquidate user first when OmniPool is unpaused
or it is possible during the pause period, the collateral asset price drops and when contract unpaused, before user repay, MEV bot liquidate and seize user asset first to capture liquidation reward
Manual Review
enable repayment even when contract is paused, applies a timelock window for user to repay the debt when contract is unpaused,
do not charge interest when contract is paused
Invalid Validation
The text was updated successfully, but these errors were encountered:
All reactions