The liquidateAccounts()
function always reverts if a collateral token reverts on zero address transfer.
This is a list of tokens that the protocol uses for collateral:
WETH
WEETH
WSTETH
WBTC
USDC
USDT
USDE
SUSDE
The issue is that some tokens in this list, like USDT
and USDC
, revert when transferring to the ZERO ADDRESS. The liquidateAccounts()
function transfers order fees to the zero address, as seen in this line:
This issue can lead to revert in liquidations in these tokens and provides risk-free trades for users because they are never liquidated due to this issue.
Liquidation will revert for some collateral tokens, providing risk-free trades for users.
Manual Review
I recommend not transferring any tokens in the liquidation process to minimize any potential risk. Instead, consider accounting for fees and implementing claim functions for receiving fees.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.