56365 sc critical liquidation fee overdraft drains pooled collateral
Description
Description
Vulnerability Mechanism
function _resolveRepaymentFee(uint256 accountId, uint256 repaidAmountInYield) internal returns (uint256 fee) {
Account storage account = _accounts[accountId];
fee = repaidAmountInYield * repaymentFee / BPS;
account.collateralBalance -= fee > account.collateralBalance ? account.collateralBalance : fee;
return fee; // Returns FULL fee
}Root Cause
Attack Scenario
Impact
Link to Proof of Concept
Proof of Concept
Proof of Concept
Step 1: Identify Vulnerable Account
Step 2: Execute Liquidation
Step 3: Observe Overdraft
Step 4: Repeat Attack
Expected Results
References
Previous57123 sc low incorrect 2 step ownership in alchemistcuratorNext58488 sc low tokeautousdstrategy claims rewards to itself automatically when deallocate is called but since reward token is tokemak the rewards remain permanently locked
Was this helpful?