Lucene search

K
code423n4Code4renaCODE423N4:2023-12-PARTICLE-FINDINGS-ISSUES-66
HistoryDec 31, 2023 - 12:00 a.m.

Upgraded Q -> 2 from #49 [1704028025372]

2023-12-3100:00:00
Code4rena
github.com
3
issue assessment
token transfer
risk
particlepositionmanager
liquidation
recommendation

7.1 High

AI Score

Confidence

Low

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

7.1 High

AI Score

Confidence

Low