Potential failure in liquidation process due to blacklisted recipients #48
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-42
edited-by-warden
partial-75
Incomplete articulation of vulnerability; eligible for partial credit only (75%)
🤖_27_group
AI based duplicate group recommendation
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-05-predy/blob/a9246db5f874a91fb71c296aac6a66902289306a/src/libraries/logic/LiquidationLogic.sol#L93-L100
Vulnerability details
Impact
According to the
README.md
, amongst the ERC20 tokens used by the protocol are USDC and USDT.In the
LiquidationLogic
library, theliquidate
function attempts to transfer the remaining margin to the vault recipient using thesafeTransfer
method.If the recipient is blacklisted, as can happen with USDC and USDT, this transfer will fail, potentially halting the liquidation process.
Proof of Concept
The liquidation process relies on the
safeTransfer
function to transfer funds to the vault recipient.The
safeTransfer
method will revert the transaction if the recipient is blacklisted, causing the entire liquidation process to fail.The disruption of the liquidation process will potentially leave the vault in an under-collateralized state and expose the protocol to financial risk.
Tools Used
Manual review
Recommended Mitigation Steps
The contract should implement a check to verify whether the recipient address is blacklisted before attempting the
safeTransfer
.If the recipient is blacklisted, the contract could redirect the funds to a predefined backup address.
This ensures that the liquidation process can proceed smoothly despite the blacklisted status of the
vault.recipient
.Assessed type
Other
The text was updated successfully, but these errors were encountered: