Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: high
Invalid

Lack of onERC721Received implementation can prevent contract from NFT Liquidation.

Summary

The NFTLquidator contracts lacks an onERC721Received implementation which is required by the ERC721 standard for receiving NFTs via transferFrom function. The omision deprives the contract of accepting liquidated NFTs, effectively hauting the liquidation process.

Vulnerability Details

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/StabilityPool/NFTLiquidator.sol#L1-L185

In the liquidateNFT function, an NFT is transferred to the NFTLiquidator contract using nftContract.transferFrom(msg.sender, address(this), tokenId). Per the ERC721 standard, the token contract calls onERC721Received on the recepient(The NFTLiquidator). Since the NFTLiquidator lacks this implementation, the transferFrom call reverts, causing the entire NFTLiquidate function to fail.

Impact

The absence of onERC721Received renders the liquidation mechanism inoperable. NFT's cannot be transfered to the contract, preventing auctions and buybacks from proceeding. This undermines the contract's main functionality.

Tools Used

Manual review

Recommendations

Implement the onERC721Received function in NFTLiquidator to allow proper receipt of ERC721 tokens.

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.