Judge has assessed an item in Issue #49 as 2 risk. The relevant finding follows:
L-05 Some tokens revert on 0 amount transfer
ParticlePositionManager::liquidatePosition:
File: protocol/ParticlePositionManager.sol
376: // reward liquidator
377: TransferHelper.safeTransfer(closeCache.tokenFrom, msg.sender, liquidateCache.liquidationRewardFrom);
378: TransferHelper.safeTransfer(closeCache.tokenTo, msg.sender, liquidateCache.liquidationRewardTo);
Some tokens, like LEND revert on 0 amount transfer. If the liquidation amount is 0 for this token this would make liquidation impossible for this position.
Recommendation
Consider checking if the liquidationAmount > 0 before transferring liquidation reward.
The text was updated successfully, but these errors were encountered:
All reactions