code-423n4 / 2024-04-revert-mitigation-findings

1 stars 1 forks source link

H-06 MitigationConfirmed #27

Open c4-bot-5 opened 4 months ago

c4-bot-5 commented 4 months ago

Lines of code

Vulnerability details

C4 Issue

H-06: Owner of a position can prevent liquidation due to the 'onERC721Received' callback

Issue Details

Liquidating a position in V3Vault.sol used to directly send back the NFT to its owner in the same transaction. This allowed a malicious borrower contract to make its onERC721Received() function revert and prevent liquidation from happening

Mitigation

PR-8 successfully mitigates the original issue by implementing the pull over push pattern when returning position NFTs to their owners:

Due to the changes, liquidation() cannot be DOSed through this vector.

Conclusion

Mitigation Confirmed

c4-judge commented 4 months ago

jhsagd76 marked the issue as satisfactory